Perform system actions on focused display.
Flag: EXEMPT bugfix Fix: 401575811 Test: go/testedequals Change-Id: I29743c98499d04f080f2628b7db7f123ec396585
This commit is contained in:
1 parent
ddc72547d4
commit
8fc585ff6b
1 file changed
+6
-3
@@ -554,8 +554,7 @@ public class TaskbarManager {
|
||||
*/
|
||||
private void showTaskbarFromBroadcast(Intent intent) {
|
||||
debugPrimaryTaskbar("destroyTaskbarForDisplay");
|
||||
// TODO: make this code displayId specific
|
||||
TaskbarActivityContext taskbar = getTaskbarForDisplay(getDefaultDisplayId());
|
||||
TaskbarActivityContext taskbar = getTaskbarForDisplay(getFocusedDisplayId());
|
||||
if (ACTION_SHOW_TASKBAR.equals(intent.getAction()) && taskbar != null) {
|
||||
taskbar.showTaskbarFromBroadcast();
|
||||
}
|
||||
@@ -575,7 +574,7 @@ public class TaskbarManager {
|
||||
* Toggles All Apps for Taskbar or Launcher depending on the current state.
|
||||
*/
|
||||
public void toggleAllAppsSearch() {
|
||||
TaskbarActivityContext taskbar = getTaskbarForDisplay(getDefaultDisplayId());
|
||||
TaskbarActivityContext taskbar = getTaskbarForDisplay(getFocusedDisplayId());
|
||||
if (taskbar == null) {
|
||||
// Home All Apps should be toggled from this class, because the controllers are not
|
||||
// initialized when Taskbar is disabled (i.e. TaskbarActivityContext is null).
|
||||
@@ -1670,6 +1669,10 @@ public class TaskbarManager {
|
||||
return mBaseContext.getDisplayId();
|
||||
}
|
||||
|
||||
private int getFocusedDisplayId() {
|
||||
return SystemUiProxy.INSTANCE.get(mBaseContext).getFocusState().getFocusedDisplayId();
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs debug information about the TaskbarManager for primary display.
|
||||
* @param debugReason A string describing the reason for the debug log.
|
||||
|
||||
Reference in new issue
Block a user