Skip to content

Commit

Permalink
Prevent ANR
Browse files Browse the repository at this point in the history
  • Loading branch information
Sentaroh committed Mar 5, 2021
1 parent 696cddd commit 7bf535f
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 72 deletions.
1 change: 1 addition & 0 deletions SMBSync2/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@
android:name=".ActivityNotification"
android:theme="@android:style/Theme.Translucent"
android:launchMode="singleTop"
android:taskAffinity=".ActivityNotification"
android:process=":Notify"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|layoutDirection|fontScale"
android:screenOrientation="unspecified"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,6 @@ protected void onPause() {
super.onPause();
mUtil.addDebugMsg(1, "I", CommonUtilities.getExecutedMethodName() + " entered " + ",currentView=" + mCurrentTab +
", getChangingConfigurations=" + String.format("0x%08x", getChangingConfigurations()));
setActivityForeground(false);
if (!isTaskTermination) saveTaskData();
CommonUtilities.saveMsgList(mGp);//Save last updated message tab list
}
Expand All @@ -464,6 +463,7 @@ protected void onPause() {
protected void onStop() {
super.onStop();
mUtil.addDebugMsg(1, "I", CommonUtilities.getExecutedMethodName() + " entered");
setActivityForeground(false);
}

@Override
Expand Down Expand Up @@ -5272,6 +5272,7 @@ public void run() {

private void openService(final NotifyEvent p_ntfy) {
mUtil.addDebugMsg(1, "I", CommonUtilities.getExecutedMethodName() + " entered");
mGp.activityIsBackground=false;
mSvcConnection = new ServiceConnection() {
public void onServiceConnected(ComponentName arg0, IBinder service) {
mUtil.addDebugMsg(1, "I", CommonUtilities.getExecutedMethodName() + " entered");
Expand Down
Loading

0 comments on commit 7bf535f

Please sign in to comment.