mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 16:26:47 +00:00
Merge "Revert "Make sure TAPL waits for Launcher activity to stop each time it stops"" into main
This commit is contained in:
@@ -411,8 +411,6 @@ public class Launcher extends StatefulActivity<LauncherState>
|
||||
private final SettingsCache.OnChangeListener mNaturalScrollingChangedListener =
|
||||
enabled -> mIsNaturalScrollingEnabled = enabled;
|
||||
|
||||
private int mActivityStopCount; // Used only by tests
|
||||
|
||||
public static Launcher getLauncher(Context context) {
|
||||
return fromContext(context);
|
||||
}
|
||||
@@ -1054,18 +1052,10 @@ public class Launcher extends StatefulActivity<LauncherState>
|
||||
mAppWidgetHolder.setActivityStarted(false);
|
||||
NotificationListener.removeNotificationsChangedListener(getPopupDataProvider());
|
||||
FloatingIconView.resetIconLoadResult();
|
||||
++mActivityStopCount;
|
||||
AccessibilityManagerCompat.sendTestProtocolEventToTest(
|
||||
this, LAUNCHER_ACTIVITY_STOPPED_MESSAGE);
|
||||
}
|
||||
|
||||
/** Return activity stop count and reset it. Used only by tests. */
|
||||
public int getAndResetActivityStopCount() {
|
||||
final int activityStopCount = mActivityStopCount;
|
||||
mActivityStopCount = 0;
|
||||
return activityStopCount;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStart() {
|
||||
TraceHelper.INSTANCE.beginSection(ON_START_EVT);
|
||||
|
||||
@@ -214,16 +214,6 @@ public class TestInformationHandler implements ResourceBasedOverride {
|
||||
.forceAllowRotationForTesting(Boolean.parseBoolean(arg)));
|
||||
return response;
|
||||
|
||||
case TestProtocol.REQUEST_GET_AND_RESET_ACTIVITY_STOP_COUNT: {
|
||||
final Bundle bundle = getLauncherUIProperty(Bundle::putInt,
|
||||
launcher -> launcher.getAndResetActivityStopCount());
|
||||
if (bundle != null) return bundle;
|
||||
|
||||
// If Launcher activity wasn't created, 'it' was stopped 0 times.
|
||||
response.putInt(TestProtocol.TEST_INFO_RESPONSE_FIELD, 0);
|
||||
return response;
|
||||
}
|
||||
|
||||
case TestProtocol.REQUEST_WORKSPACE_CELL_LAYOUT_SIZE:
|
||||
return getLauncherUIProperty(Bundle::putIntArray, launcher -> {
|
||||
final Workspace<?> workspace = launcher.getWorkspace();
|
||||
|
||||
Reference in New Issue
Block a user