Merge "Add a function to get the secondary split screen bounds" into pi-dev
am: 427e41bd07
Change-Id: I15b75499f92747cf7772eccada58887d40d98a06
This commit is contained in:
@@ -49,4 +49,9 @@ interface ISystemUiProxy {
|
||||
* Notifies SystemUI that Overview is shown.
|
||||
*/
|
||||
void onOverviewShown(boolean fromHome) = 6;
|
||||
|
||||
/**
|
||||
* Get the secondary split screen app's rectangle when not minimized.
|
||||
*/
|
||||
Rect getNonMinimizedSplitScreenSecondaryBounds() = 7;
|
||||
}
|
||||
|
||||
@@ -22,7 +22,6 @@ import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.content.ServiceConnection;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.graphics.Rect;
|
||||
import android.os.Binder;
|
||||
import android.os.Handler;
|
||||
@@ -42,6 +41,7 @@ import com.android.systemui.shared.recents.IOverviewProxy;
|
||||
import com.android.systemui.shared.recents.ISystemUiProxy;
|
||||
import com.android.systemui.shared.system.ActivityManagerWrapper;
|
||||
import com.android.systemui.shared.system.GraphicBufferCompat;
|
||||
import com.android.systemui.stackdivider.Divider;
|
||||
import com.android.systemui.statusbar.phone.StatusBar;
|
||||
import com.android.systemui.statusbar.policy.CallbackController;
|
||||
import com.android.systemui.statusbar.policy.DeviceProvisionedController;
|
||||
@@ -147,6 +147,19 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis
|
||||
Binder.restoreCallingIdentity(token);
|
||||
}
|
||||
}
|
||||
|
||||
public Rect getNonMinimizedSplitScreenSecondaryBounds() {
|
||||
long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
Divider divider = ((SystemUIApplication) mContext).getComponent(Divider.class);
|
||||
if (divider != null) {
|
||||
return divider.getView().getNonMinimizedSplitScreenSecondaryBounds();
|
||||
}
|
||||
return null;
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(token);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
private final BroadcastReceiver mLauncherStateChangedReceiver = new BroadcastReceiver() {
|
||||
|
||||
@@ -378,6 +378,23 @@ public class DividerView extends FrameLayout implements OnTouchListener,
|
||||
return mWindowManagerProxy;
|
||||
}
|
||||
|
||||
public Rect getNonMinimizedSplitScreenSecondaryBounds() {
|
||||
calculateBoundsForPosition(mSnapTargetBeforeMinimized.position,
|
||||
DockedDividerUtils.invertDockSide(mDockSide), mOtherTaskRect);
|
||||
switch (mDockSide) {
|
||||
case WindowManager.DOCKED_LEFT:
|
||||
mOtherTaskRect.right -= mStableInsets.right;
|
||||
break;
|
||||
case WindowManager.DOCKED_RIGHT:
|
||||
mOtherTaskRect.left -= mStableInsets.left;
|
||||
break;
|
||||
case WindowManager.DOCKED_TOP:
|
||||
mOtherTaskRect.bottom -= mStableInsets.bottom;
|
||||
break;
|
||||
}
|
||||
return mOtherTaskRect;
|
||||
}
|
||||
|
||||
public boolean startDragging(boolean animate, boolean touching) {
|
||||
cancelFlingAnimation();
|
||||
if (touching) {
|
||||
|
||||
Reference in New Issue
Block a user