Add Home Recents Transition Animations
b/27349208
Change-Id: I2f97954aad8671eb8dc006f3b949abc8025f4c33
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tv/TvStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/tv/TvStatusBar.java
index f9bb5e3..450001f 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tv/TvStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tv/TvStatusBar.java
@@ -19,6 +19,7 @@
import android.content.ComponentName;
import android.graphics.Rect;
import android.os.IBinder;
+import android.os.RemoteException;
import android.service.notification.NotificationListenerService.RankingMap;
import android.service.notification.StatusBarNotification;
import android.view.View;
@@ -29,12 +30,22 @@
import com.android.systemui.statusbar.NotificationData;
import com.android.systemui.tv.pip.PipManager;
-/*
+/**
* Status bar implementation for "large screen" products that mostly present no on-screen nav
*/
public class TvStatusBar extends BaseStatusBar {
+ /**
+ * Tracking calls to View.setSystemUiVisibility().
+ */
+ int mSystemUiVisibility = View.SYSTEM_UI_FLAG_VISIBLE;
+
+ /**
+ * Last value sent to window manager.
+ */
+ private int mLastDispatchedSystemUiVisibility = ~View.SYSTEM_UI_FLAG_VISIBLE;
+
@Override
public void setIcon(String slot, StatusBarIcon icon) {
}
@@ -207,4 +218,30 @@
@Override
public void clickTile(ComponentName tile) {
}
+
+ @Override
+ public void start() {
+ super.start();
+ putComponent(TvStatusBar.class, this);
+ }
+
+ public void updateRecentsVisibility(boolean visible) {
+ // Update the recents visibility flag
+ if (visible) {
+ mSystemUiVisibility |= View.RECENT_APPS_VISIBLE;
+ } else {
+ mSystemUiVisibility &= ~View.RECENT_APPS_VISIBLE;
+ }
+ notifyUiVisibilityChanged(mSystemUiVisibility);
+ }
+
+ private void notifyUiVisibilityChanged(int vis) {
+ try {
+ if (mLastDispatchedSystemUiVisibility != vis) {
+ mWindowManagerService.statusBarVisibilityChanged(vis);
+ mLastDispatchedSystemUiVisibility = vis;
+ }
+ } catch (RemoteException ex) {
+ }
+ }
}