Move default pip position to right above the shelf (Pt. Launcher)
SysUI change: ag/3721784, ag/3793664
- Track LauncherState and launcher activity state through callbacks.
- Devise logic to send shelf visibility and height signal to SysUI based
on LauncherState and Launcher activity state.
Bug: 73961893
Test:
- By default, pip shows up right above the shelf.
- Transitioning to all apps moves the pip down as the shelf becomes
invisible.
- Going to any specific app moves pip down. Hitting home moves pip
right above the shelf again.
- Dismissing IME should push PIP down but above the shelf on home
screen, bottom if not.
Change-Id: I1ab6ceb8007a5a7b5d932a456efa0a07f586ea4c
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index ed94aa43..985e096 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -379,6 +379,7 @@
}
mOldConfig.setTo(newConfig);
+ UiFactory.onLauncherStateOrResumeChanged(this);
super.onConfigurationChanged(newConfig);
}
@@ -820,6 +821,7 @@
if (mLauncherCallbacks != null) {
mLauncherCallbacks.onResume();
}
+ UiFactory.onLauncherStateOrResumeChanged(this);
TraceHelper.endSection("ON_RESUME");
}
@@ -839,6 +841,12 @@
}
@Override
+ protected void onUserLeaveHint() {
+ super.onUserLeaveHint();
+ UiFactory.onLauncherStateOrResumeChanged(this);
+ }
+
+ @Override
public void onWindowFocusChanged(boolean hasFocus) {
super.onWindowFocusChanged(hasFocus);
mStateManager.onWindowFocusChanged();