Indicate PiP animation type from Launcher to SysUI
Also, need callback from SysUI to Launcher once the pip animation is
started to keep back compatibility.
Bug: 146594635
Test: manually
Merged-In: I617a17fd5f6049d9f1d49f9f834623a2bb49f6ca
Change-Id: I617a17fd5f6049d9f1d49f9f834623a2bb49f6ca
(cherry picked from commit a1a91b0c50)
This commit is contained in:
@@ -29,6 +29,7 @@ import android.util.Log;
|
||||
import android.view.MotionEvent;
|
||||
|
||||
import com.android.launcher3.util.MainThreadInitializedObject;
|
||||
import com.android.systemui.shared.recents.IPinnedStackAnimationListener;
|
||||
import com.android.systemui.shared.recents.ISystemUiProxy;
|
||||
|
||||
/**
|
||||
@@ -268,9 +269,7 @@ public class SystemUiProxy implements ISystemUiProxy {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* See SharedApiCompat#setShelfHeight()
|
||||
*/
|
||||
@Override
|
||||
public void setShelfHeight(boolean visible, int shelfHeight) {
|
||||
boolean changed = visible != mLastShelfVisible || shelfHeight != mLastShelfHeight;
|
||||
if (mSystemUiProxy != null && changed) {
|
||||
@@ -306,4 +305,32 @@ public class SystemUiProxy implements ISystemUiProxy {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Notifies that swipe-to-home action is finished.
|
||||
*/
|
||||
@Override
|
||||
public void notifySwipeToHomeFinished() {
|
||||
if (mSystemUiProxy != null) {
|
||||
try {
|
||||
mSystemUiProxy.notifySwipeToHomeFinished();
|
||||
} catch (RemoteException e) {
|
||||
Log.w(TAG, "Failed call setPinnedStackAnimationType", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets listener to get pinned stack animation callbacks.
|
||||
*/
|
||||
@Override
|
||||
public void setPinnedStackAnimationListener(IPinnedStackAnimationListener listener) {
|
||||
if (mSystemUiProxy != null) {
|
||||
try {
|
||||
mSystemUiProxy.setPinnedStackAnimationListener(listener);
|
||||
} catch (RemoteException e) {
|
||||
Log.w(TAG, "Failed call setPinnedStackAnimationListener", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user