fix: Invert condition for lifecycle method calls (#6401)
This commit is contained in:
1 parent
5cb2e99626
commit
2d45cd2e2c
1 file changed
+7
-7
@@ -261,7 +261,7 @@ public abstract class BaseActivity extends Activity implements ActivityContext,
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
if (Utilities.ATLEAST_Q) {
|
||||
if (!Utilities.ATLEAST_Q) {
|
||||
mLifecycleHelper.onActivityCreated(this, savedInstanceState);
|
||||
}
|
||||
registerBackDispatcher();
|
||||
@@ -272,7 +272,7 @@ public abstract class BaseActivity extends Activity implements ActivityContext,
|
||||
protected void onStart() {
|
||||
addActivityFlags(ACTIVITY_STATE_STARTED);
|
||||
super.onStart();
|
||||
if (Utilities.ATLEAST_Q) {
|
||||
if (!Utilities.ATLEAST_Q) {
|
||||
mLifecycleHelper.onActivityStarted(this);
|
||||
}
|
||||
mEventCallbacks[EVENT_STARTED].executeAllAndClear();
|
||||
@@ -282,7 +282,7 @@ public abstract class BaseActivity extends Activity implements ActivityContext,
|
||||
protected void onResume() {
|
||||
setResumed();
|
||||
super.onResume();
|
||||
if (Utilities.ATLEAST_Q) {
|
||||
if (!Utilities.ATLEAST_Q) {
|
||||
mLifecycleHelper.onActivityResumed(this);
|
||||
}
|
||||
mEventCallbacks[EVENT_RESUMED].executeAllAndClear();
|
||||
@@ -307,7 +307,7 @@ public abstract class BaseActivity extends Activity implements ActivityContext,
|
||||
removeActivityFlags(ACTIVITY_STATE_STARTED | ACTIVITY_STATE_USER_ACTIVE);
|
||||
mForceInvisible = 0;
|
||||
super.onStop();
|
||||
if (Utilities.ATLEAST_Q) {
|
||||
if (!Utilities.ATLEAST_Q) {
|
||||
mLifecycleHelper.onActivityStopped(this);
|
||||
}
|
||||
mEventCallbacks[EVENT_STOPPED].executeAllAndClear();
|
||||
@@ -321,7 +321,7 @@ public abstract class BaseActivity extends Activity implements ActivityContext,
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
if (Utilities.ATLEAST_Q) {
|
||||
if (!Utilities.ATLEAST_Q) {
|
||||
mLifecycleHelper.onActivityDestroyed(this);
|
||||
}
|
||||
mEventCallbacks[EVENT_DESTROYED].executeAllAndClear();
|
||||
@@ -332,7 +332,7 @@ public abstract class BaseActivity extends Activity implements ActivityContext,
|
||||
protected void onPause() {
|
||||
setPaused();
|
||||
super.onPause();
|
||||
if (Utilities.ATLEAST_Q) {
|
||||
if (!Utilities.ATLEAST_Q) {
|
||||
mLifecycleHelper.onActivityPaused(this);
|
||||
}
|
||||
|
||||
@@ -346,7 +346,7 @@ public abstract class BaseActivity extends Activity implements ActivityContext,
|
||||
@Override
|
||||
protected void onSaveInstanceState(Bundle outState) {
|
||||
super.onSaveInstanceState(outState);
|
||||
if (Utilities.ATLEAST_Q) {
|
||||
if (!Utilities.ATLEAST_Q) {
|
||||
mLifecycleHelper.onActivitySaveInstanceState(this, outState);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user