mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-28 15:56:49 +00:00
Clean up device profile change listeners for AllApps.
Test: https://b.corp.google.com/issues/260177372#comment1 Bug: 260177372 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:d17261029af89ef03b860686d1d3c6651e7c8e13) Merged-In: Ic7417980e8280bf2fcb110e5de74ea2ae59d9b74 Change-Id: Ic7417980e8280bf2fcb110e5de74ea2ae59d9b74
This commit is contained in:
@@ -191,7 +191,6 @@ public class ActivityAllAppsContainerView<T extends Context & ActivityContext>
|
||||
onAppsUpdated);
|
||||
}
|
||||
mAllAppsStore.addUpdateListener(onAppsUpdated);
|
||||
mActivityContext.addOnDeviceProfileChangeListener(this);
|
||||
|
||||
// This is a focus listener that proxies focus from a view into the list view. This is to
|
||||
// work around the search box from getting first focus and showing the cursor.
|
||||
@@ -262,6 +261,18 @@ public class ActivityAllAppsContainerView<T extends Context & ActivityContext>
|
||||
mSearchUiManager.initializeSearch(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onAttachedToWindow() {
|
||||
super.onAttachedToWindow();
|
||||
mActivityContext.addOnDeviceProfileChangeListener(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow();
|
||||
mActivityContext.removeOnDeviceProfileChangeListener(this);
|
||||
}
|
||||
|
||||
public SearchUiManager getSearchUiManager() {
|
||||
return mSearchUiManager;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user