Loading packages/SystemUI/shared/src/com/android/systemui/shared/system/ActivityManagerWrapper.java +14 −0 Original line number Diff line number Diff line Loading @@ -341,6 +341,20 @@ public class ActivityManagerWrapper { } } /** * Moves an already resumed task to the side of the screen to initiate split screen. */ public boolean setTaskWindowingModeSplitScreenPrimary(int taskId, int createMode, Rect initialBounds) { try { return ActivityTaskManager.getService().setTaskWindowingModeSplitScreenPrimary(taskId, createMode, true /* onTop */, false /* animate */, initialBounds, true /* showRecents */); } catch (RemoteException e) { return false; } } /** * Registers a task stack listener with the system. * This should be called on the main thread. Loading packages/SystemUI/shared/src/com/android/systemui/shared/system/WindowManagerWrapper.java +19 −0 Original line number Diff line number Diff line Loading @@ -151,6 +151,25 @@ public class WindowManagerWrapper { } } public void setPipVisibility(final boolean visible) { try { WindowManagerGlobal.getWindowManagerService().setPipVisibility(visible); } catch (RemoteException e) { Log.e(TAG, "Unable to reach window manager", e); } } /** * @return whether there is a soft nav bar. */ public boolean hasSoftNavigationBar() { try { return WindowManagerGlobal.getWindowManagerService().hasNavigationBar(); } catch (RemoteException e) { return false; } } /** * @return The side of the screen where navigation bar is positioned. * @see #NAV_BAR_POS_RIGHT Loading packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +3 −4 Original line number Diff line number Diff line Loading @@ -86,9 +86,8 @@ import com.android.internal.telephony.TelephonyIntents; import com.android.internal.util.Preconditions; import com.android.internal.widget.LockPatternUtils; import com.android.settingslib.WirelessUtils; import com.android.systemui.recents.misc.SysUiTaskStackChangeListener; import com.android.systemui.shared.system.ActivityManagerWrapper; import com.android.systemui.shared.system.TaskStackChangeListener; import com.google.android.collect.Lists; import java.io.FileDescriptor; Loading Loading @@ -2218,8 +2217,8 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { } } private final SysUiTaskStackChangeListener mTaskStackListener = new SysUiTaskStackChangeListener() { private final TaskStackChangeListener mTaskStackListener = new TaskStackChangeListener() { @Override public void onTaskStackChangedBackground() { try { Loading packages/SystemUI/src/com/android/systemui/OverviewProxyService.java +10 −13 Original line number Diff line number Diff line Loading @@ -16,6 +16,11 @@ package com.android.systemui; import static android.content.pm.PackageManager.MATCH_DIRECT_BOOT_UNAWARE; import static com.android.systemui.shared.system.NavigationBarCompat.FLAG_DISABLE_SWIPE_UP; import static com.android.systemui.shared.system.NavigationBarCompat.FLAG_SHOW_OVERVIEW_BUTTON; import static com.android.systemui.shared.system.NavigationBarCompat.InteractionType; import android.content.BroadcastReceiver; import android.content.ComponentName; import android.content.Context; Loading @@ -33,11 +38,7 @@ import android.os.UserHandle; import android.provider.Settings; import android.util.Log; import android.view.MotionEvent; import com.android.systemui.OverviewProxyService.OverviewProxyListener; import com.android.systemui.recents.events.EventBus; import com.android.systemui.recents.events.activity.DockedFirstAnimationFrameEvent; import com.android.systemui.recents.misc.SystemServicesProxy; import com.android.systemui.shared.recents.IOverviewProxy; import com.android.systemui.shared.recents.ISystemUiProxy; import com.android.systemui.shared.system.ActivityManagerWrapper; Loading @@ -46,17 +47,11 @@ import com.android.systemui.statusbar.phone.StatusBar; import com.android.systemui.statusbar.policy.CallbackController; import com.android.systemui.statusbar.policy.DeviceProvisionedController; import com.android.systemui.statusbar.policy.DeviceProvisionedController.DeviceProvisionedListener; import java.io.FileDescriptor; import java.io.PrintWriter; import java.util.ArrayList; import java.util.List; import static android.content.pm.PackageManager.MATCH_DIRECT_BOOT_UNAWARE; import static com.android.systemui.shared.system.NavigationBarCompat.FLAG_DISABLE_SWIPE_UP; import static com.android.systemui.shared.system.NavigationBarCompat.FLAG_SHOW_OVERVIEW_BUTTON; import static com.android.systemui.shared.system.NavigationBarCompat.InteractionType; /** * Class to send information from overview to launcher with a binder. */ Loading Loading @@ -133,7 +128,10 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis } long token = Binder.clearCallingIdentity(); try { EventBus.getDefault().post(new DockedFirstAnimationFrameEvent()); Divider divider = SysUiServiceProvider.getComponent(mContext, Divider.class); if (divider != null) { divider.onDockedFirstAnimationFrame(); } } finally { Binder.restoreCallingIdentity(token); } Loading Loading @@ -314,8 +312,7 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis getDefaultInteractionFlags()); // Listen for the package update changes. if (SystemServicesProxy.getInstance(context) .isSystemUser(mDeviceProvisionedController.getCurrentUser())) { if (mDeviceProvisionedController.getCurrentUser() == UserHandle.USER_SYSTEM) { updateEnabledState(); mDeviceProvisionedController.addCallback(mDeviceProvisionedCallback); IntentFilter filter = new IntentFilter(Intent.ACTION_PACKAGE_ADDED); Loading packages/SystemUI/src/com/android/systemui/RecentsComponent.java +1 −18 Original line number Diff line number Diff line Loading @@ -22,27 +22,10 @@ import android.view.View; public interface RecentsComponent { void showRecentApps(boolean triggeredFromAltTab); void showNextAffiliatedTask(); void showPrevAffiliatedTask(); /** * Docks the top-most task and opens recents. */ boolean splitPrimaryTask(int dragMode, int stackCreateMode, Rect initialBounds, boolean splitPrimaryTask(int stackCreateMode, Rect initialBounds, int metricsDockAction); /** * Called during a drag-from-navbar-in gesture. * * @param distanceFromTop the distance of the current drag in gesture from the top of the * screen */ void onDraggingInRecents(float distanceFromTop); /** * Called when the gesture to drag in recents ended. * * @param velocity the velocity of the finger when releasing it in pixels per second */ void onDraggingInRecentsEnded(float velocity); } Loading
packages/SystemUI/shared/src/com/android/systemui/shared/system/ActivityManagerWrapper.java +14 −0 Original line number Diff line number Diff line Loading @@ -341,6 +341,20 @@ public class ActivityManagerWrapper { } } /** * Moves an already resumed task to the side of the screen to initiate split screen. */ public boolean setTaskWindowingModeSplitScreenPrimary(int taskId, int createMode, Rect initialBounds) { try { return ActivityTaskManager.getService().setTaskWindowingModeSplitScreenPrimary(taskId, createMode, true /* onTop */, false /* animate */, initialBounds, true /* showRecents */); } catch (RemoteException e) { return false; } } /** * Registers a task stack listener with the system. * This should be called on the main thread. Loading
packages/SystemUI/shared/src/com/android/systemui/shared/system/WindowManagerWrapper.java +19 −0 Original line number Diff line number Diff line Loading @@ -151,6 +151,25 @@ public class WindowManagerWrapper { } } public void setPipVisibility(final boolean visible) { try { WindowManagerGlobal.getWindowManagerService().setPipVisibility(visible); } catch (RemoteException e) { Log.e(TAG, "Unable to reach window manager", e); } } /** * @return whether there is a soft nav bar. */ public boolean hasSoftNavigationBar() { try { return WindowManagerGlobal.getWindowManagerService().hasNavigationBar(); } catch (RemoteException e) { return false; } } /** * @return The side of the screen where navigation bar is positioned. * @see #NAV_BAR_POS_RIGHT Loading
packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +3 −4 Original line number Diff line number Diff line Loading @@ -86,9 +86,8 @@ import com.android.internal.telephony.TelephonyIntents; import com.android.internal.util.Preconditions; import com.android.internal.widget.LockPatternUtils; import com.android.settingslib.WirelessUtils; import com.android.systemui.recents.misc.SysUiTaskStackChangeListener; import com.android.systemui.shared.system.ActivityManagerWrapper; import com.android.systemui.shared.system.TaskStackChangeListener; import com.google.android.collect.Lists; import java.io.FileDescriptor; Loading Loading @@ -2218,8 +2217,8 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { } } private final SysUiTaskStackChangeListener mTaskStackListener = new SysUiTaskStackChangeListener() { private final TaskStackChangeListener mTaskStackListener = new TaskStackChangeListener() { @Override public void onTaskStackChangedBackground() { try { Loading
packages/SystemUI/src/com/android/systemui/OverviewProxyService.java +10 −13 Original line number Diff line number Diff line Loading @@ -16,6 +16,11 @@ package com.android.systemui; import static android.content.pm.PackageManager.MATCH_DIRECT_BOOT_UNAWARE; import static com.android.systemui.shared.system.NavigationBarCompat.FLAG_DISABLE_SWIPE_UP; import static com.android.systemui.shared.system.NavigationBarCompat.FLAG_SHOW_OVERVIEW_BUTTON; import static com.android.systemui.shared.system.NavigationBarCompat.InteractionType; import android.content.BroadcastReceiver; import android.content.ComponentName; import android.content.Context; Loading @@ -33,11 +38,7 @@ import android.os.UserHandle; import android.provider.Settings; import android.util.Log; import android.view.MotionEvent; import com.android.systemui.OverviewProxyService.OverviewProxyListener; import com.android.systemui.recents.events.EventBus; import com.android.systemui.recents.events.activity.DockedFirstAnimationFrameEvent; import com.android.systemui.recents.misc.SystemServicesProxy; import com.android.systemui.shared.recents.IOverviewProxy; import com.android.systemui.shared.recents.ISystemUiProxy; import com.android.systemui.shared.system.ActivityManagerWrapper; Loading @@ -46,17 +47,11 @@ import com.android.systemui.statusbar.phone.StatusBar; import com.android.systemui.statusbar.policy.CallbackController; import com.android.systemui.statusbar.policy.DeviceProvisionedController; import com.android.systemui.statusbar.policy.DeviceProvisionedController.DeviceProvisionedListener; import java.io.FileDescriptor; import java.io.PrintWriter; import java.util.ArrayList; import java.util.List; import static android.content.pm.PackageManager.MATCH_DIRECT_BOOT_UNAWARE; import static com.android.systemui.shared.system.NavigationBarCompat.FLAG_DISABLE_SWIPE_UP; import static com.android.systemui.shared.system.NavigationBarCompat.FLAG_SHOW_OVERVIEW_BUTTON; import static com.android.systemui.shared.system.NavigationBarCompat.InteractionType; /** * Class to send information from overview to launcher with a binder. */ Loading Loading @@ -133,7 +128,10 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis } long token = Binder.clearCallingIdentity(); try { EventBus.getDefault().post(new DockedFirstAnimationFrameEvent()); Divider divider = SysUiServiceProvider.getComponent(mContext, Divider.class); if (divider != null) { divider.onDockedFirstAnimationFrame(); } } finally { Binder.restoreCallingIdentity(token); } Loading Loading @@ -314,8 +312,7 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis getDefaultInteractionFlags()); // Listen for the package update changes. if (SystemServicesProxy.getInstance(context) .isSystemUser(mDeviceProvisionedController.getCurrentUser())) { if (mDeviceProvisionedController.getCurrentUser() == UserHandle.USER_SYSTEM) { updateEnabledState(); mDeviceProvisionedController.addCallback(mDeviceProvisionedCallback); IntentFilter filter = new IntentFilter(Intent.ACTION_PACKAGE_ADDED); Loading
packages/SystemUI/src/com/android/systemui/RecentsComponent.java +1 −18 Original line number Diff line number Diff line Loading @@ -22,27 +22,10 @@ import android.view.View; public interface RecentsComponent { void showRecentApps(boolean triggeredFromAltTab); void showNextAffiliatedTask(); void showPrevAffiliatedTask(); /** * Docks the top-most task and opens recents. */ boolean splitPrimaryTask(int dragMode, int stackCreateMode, Rect initialBounds, boolean splitPrimaryTask(int stackCreateMode, Rect initialBounds, int metricsDockAction); /** * Called during a drag-from-navbar-in gesture. * * @param distanceFromTop the distance of the current drag in gesture from the top of the * screen */ void onDraggingInRecents(float distanceFromTop); /** * Called when the gesture to drag in recents ended. * * @param velocity the velocity of the finger when releasing it in pixels per second */ void onDraggingInRecentsEnded(float velocity); }