mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 18:58:19 +00:00
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
This commit is contained in:
@@ -39,6 +39,7 @@ public abstract class BaseActivity extends Activity {
|
||||
protected SystemUiController mSystemUiController;
|
||||
|
||||
private boolean mStarted;
|
||||
private boolean mUserActive;
|
||||
|
||||
public DeviceProfile getDeviceProfile() {
|
||||
return mDeviceProfile;
|
||||
@@ -84,6 +85,18 @@ public abstract class BaseActivity extends Activity {
|
||||
super.onStart();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
mUserActive = true;
|
||||
super.onResume();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onUserLeaveHint() {
|
||||
mUserActive = false;
|
||||
super.onUserLeaveHint();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStop() {
|
||||
mStarted = false;
|
||||
@@ -94,6 +107,10 @@ public abstract class BaseActivity extends Activity {
|
||||
return mStarted;
|
||||
}
|
||||
|
||||
public boolean isUserActive() {
|
||||
return mUserActive;
|
||||
}
|
||||
|
||||
public void addOnDeviceProfileChangeListener(OnDeviceProfileChangeListener listener) {
|
||||
mDPChangeListeners.add(listener);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user