[Launcher Jank] Avoid SimpleBroadcastReceiver making binder calls on main thread
Fix: 348649441 Flag: NONE - jank fix Test: manual - presubmit Change-Id: Ie97713f3f0b1f117662d49c6d6a65651c593d424
This commit is contained in:
1 parent
264a7e3336
commit
1f87d94e59
13 files changed
+106
-49
No files matched your search
@@ -132,11 +132,11 @@ public class DisplayController implements ComponentCallbacks, SafeCloseable {
|
||||
mWindowContext.registerComponentCallbacks(this);
|
||||
} else {
|
||||
mWindowContext = null;
|
||||
mReceiver.register(mContext, ACTION_CONFIGURATION_CHANGED);
|
||||
mReceiver.registerAsync(mContext, ACTION_CONFIGURATION_CHANGED);
|
||||
}
|
||||
|
||||
// Initialize navigation mode change listener
|
||||
mReceiver.registerPkgActions(mContext, TARGET_OVERLAY_PACKAGE, ACTION_OVERLAY_CHANGED);
|
||||
mReceiver.registerPkgActionsAsync(mContext, TARGET_OVERLAY_PACKAGE, ACTION_OVERLAY_CHANGED);
|
||||
|
||||
WindowManagerProxy wmProxy = WindowManagerProxy.INSTANCE.get(context);
|
||||
Context displayInfoContext = getDisplayInfoContext(display);
|
||||
@@ -218,6 +218,7 @@ public class DisplayController implements ComponentCallbacks, SafeCloseable {
|
||||
} else {
|
||||
// TODO: unregister broadcast receiver
|
||||
}
|
||||
mReceiver.unregisterReceiverSafelyAsync(mContext);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user