Refctor DisplayController#handleInfoChange
Test: Presubmit Bug: 369140181 Flag: EXEMPT refactor DisplayController#handleInfoChange Change-Id: I196fe0e843a60c518d882c25f9fbdcd3cb775ba6
This commit is contained in:
1 parent
f0123c9129
commit
94c9fb7cf5
4 files changed
+9
-24
No files matched your search
@@ -152,7 +152,7 @@ public class DisplayController implements ComponentCallbacks, SafeCloseable {
|
||||
&& mInfo.mIsTaskbarPinnedInDesktopMode != prefs.get(
|
||||
TASKBAR_PINNING_IN_DESKTOP_MODE);
|
||||
if (isTaskbarPinningChanged || isTaskbarPinningDesktopModeChanged) {
|
||||
handleInfoChange();
|
||||
notifyConfigChange();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -178,20 +178,6 @@ public class DisplayController implements ComponentCallbacks, SafeCloseable {
|
||||
return INSTANCE.get(context).getInfo().isTransientTaskbar();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles info change for desktop mode.
|
||||
*/
|
||||
public static void handleInfoChangeForDesktopMode(Context context) {
|
||||
INSTANCE.get(context).handleInfoChange();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles info change for launcher visibility.
|
||||
*/
|
||||
public static void handleInfoChangeForLauncherVisibilityChanged(Context context) {
|
||||
INSTANCE.get(context).handleInfoChange();
|
||||
}
|
||||
|
||||
/**
|
||||
* Enables transient taskbar status for tests.
|
||||
*/
|
||||
@@ -259,7 +245,7 @@ public class DisplayController implements ComponentCallbacks, SafeCloseable {
|
||||
}
|
||||
if (ACTION_OVERLAY_CHANGED.equals(intent.getAction())) {
|
||||
Log.d(TAG, "Overlay changed, notifying listeners");
|
||||
handleInfoChange();
|
||||
notifyConfigChange();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -272,7 +258,7 @@ public class DisplayController implements ComponentCallbacks, SafeCloseable {
|
||||
|| !mInfo.mScreenSizeDp.equals(
|
||||
new PortraitSize(config.screenHeightDp, config.screenWidthDp))
|
||||
|| mWindowContext.getDisplay().getRotation() != mInfo.rotation) {
|
||||
handleInfoChange();
|
||||
notifyConfigChange();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -296,8 +282,7 @@ public class DisplayController implements ComponentCallbacks, SafeCloseable {
|
||||
}
|
||||
|
||||
@AnyThread
|
||||
@VisibleForTesting
|
||||
public void handleInfoChange() {
|
||||
public void notifyConfigChange() {
|
||||
WindowManagerProxy wmProxy = WindowManagerProxy.INSTANCE.get(mContext);
|
||||
Info oldInfo = mInfo;
|
||||
|
||||
|
||||
Reference in new issue
Block a user