From 222afb970434c7972589adfc509bd2c256ca6556 Mon Sep 17 00:00:00 2001 From: Hongwei Wang Date: Fri, 2 Oct 2020 13:51:36 -0700 Subject: [PATCH] Comply with the ISystemUiProxy.aidl change Two methods are added to support communications between Launcher and SysUI when user swipes an auto PiP-able Activity to home. Bug: 143965596 Test: N/A Change-Id: I2c73a287a094e882bde3cd71c27f9f66ae20e64a (cherry picked from commit 88ddae38db924f700082a113670ce5a719116a95) --- .../com/android/quickstep/SystemUiProxy.java | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/quickstep/src/com/android/quickstep/SystemUiProxy.java b/quickstep/src/com/android/quickstep/SystemUiProxy.java index 2666869136..a214d81e76 100644 --- a/quickstep/src/com/android/quickstep/SystemUiProxy.java +++ b/quickstep/src/com/android/quickstep/SystemUiProxy.java @@ -17,7 +17,10 @@ package com.android.quickstep; import static com.android.launcher3.util.Executors.MAIN_EXECUTOR; +import android.app.PictureInPictureParams; +import android.content.ComponentName; import android.content.Context; +import android.content.pm.ActivityInfo; import android.graphics.Bitmap; import android.graphics.Insets; import android.graphics.Rect; @@ -380,4 +383,29 @@ public class SystemUiProxy implements ISystemUiProxy { } } } + + @Override + public Rect startSwipePipToHome(ComponentName componentName, ActivityInfo activityInfo, + PictureInPictureParams pictureInPictureParams, int launcherRotation, int shelfHeight) { + if (mSystemUiProxy != null) { + try { + return mSystemUiProxy.startSwipePipToHome(componentName, activityInfo, + pictureInPictureParams, launcherRotation, shelfHeight); + } catch (RemoteException e) { + Log.w(TAG, "Failed call startSwipePipToHome", e); + } + } + return null; + } + + @Override + public void stopSwipePipToHome(ComponentName componentName, Rect destinationBounds) { + if (mSystemUiProxy != null) { + try { + mSystemUiProxy.stopSwipePipToHome(componentName, destinationBounds); + } catch (RemoteException e) { + Log.w(TAG, "Failed call stopSwipePipToHome"); + } + } + } }