Deliver/pop on started instead of resumed

https://developer.android.com/guide/components/activities/activity-lifecycle#onstart
This commit is contained in:
M66B
2019-07-27 08:02:00 +02:00
parent 9d234aa9a4
commit 0191240a27
13 changed files with 56 additions and 56 deletions

View File

@@ -349,7 +349,7 @@ public class ActivitySetup extends ActivityBase implements FragmentManager.OnBac
switch (item.getItemId()) {
case android.R.id.home:
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.RESUMED))
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED))
getSupportFragmentManager().popBackStack();
return true;
}
@@ -407,7 +407,7 @@ public class ActivitySetup extends ActivityBase implements FragmentManager.OnBac
}
private void onMenuOrder(int title, Class clazz) {
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.RESUMED))
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED))
getSupportFragmentManager().popBackStack("order", FragmentManager.POP_BACK_STACK_INCLUSIVE);
Bundle args = new Bundle();
@@ -450,7 +450,7 @@ public class ActivitySetup extends ActivityBase implements FragmentManager.OnBac
}
private void onMenuContacts() {
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.RESUMED))
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED))
getSupportFragmentManager().popBackStack("contacts", FragmentManager.POP_BACK_STACK_INCLUSIVE);
FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
@@ -459,7 +459,7 @@ public class ActivitySetup extends ActivityBase implements FragmentManager.OnBac
}
private void onMenuLegend() {
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.RESUMED))
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED))
getSupportFragmentManager().popBackStack("legend", FragmentManager.POP_BACK_STACK_INCLUSIVE);
FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
@@ -480,7 +480,7 @@ public class ActivitySetup extends ActivityBase implements FragmentManager.OnBac
}
private void onMenuAbout() {
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.RESUMED))
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED))
getSupportFragmentManager().popBackStack("about", FragmentManager.POP_BACK_STACK_INCLUSIVE);
FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
@@ -1091,7 +1091,7 @@ public class ActivitySetup extends ActivityBase implements FragmentManager.OnBac
private BroadcastReceiver receiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.RESUMED)) {
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED)) {
String action = intent.getAction();
if (ACTION_QUICK_SETUP.equals(action))
onViewQuickSetup(intent);