diff options
author | Daniel Sandler <dsandler@google.com> | 2010-08-20 10:57:17 -0400 |
---|---|---|
committer | Daniel Sandler <dsandler@google.com> | 2010-08-20 10:57:52 -0400 |
commit | fb970e920413e7f3a6159056fa698bb9c6b04056 (patch) | |
tree | 8880a64eb365df848a9ef3994c3f52943515898a /packages | |
parent | 2338f48ddb3d1746c2d46df85fdc4dcd6cfa240b (diff) | |
download | frameworks_base-fb970e920413e7f3a6159056fa698bb9c6b04056.zip frameworks_base-fb970e920413e7f3a6159056fa698bb9c6b04056.tar.gz frameworks_base-fb970e920413e7f3a6159056fa698bb9c6b04056.tar.bz2 |
Notification.fullScreenIntent support.
Bug: 2911617
Change-Id: I1b4cd6ff0f760bad721a3a8eed61209b44b64c02
Diffstat (limited to 'packages')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBarService.java | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBarService.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBarService.java index 022470e..18b9b41 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBarService.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBarService.java @@ -54,7 +54,7 @@ import com.android.systemui.statusbar.*; import com.android.systemui.R; public class TabletStatusBarService extends StatusBarService { - public static final boolean DEBUG = true; + public static final boolean DEBUG = false; public static final String TAG = "TabletStatusBar"; @@ -234,7 +234,26 @@ public class TabletStatusBarService extends StatusBarService { public void addNotification(IBinder key, StatusBarNotification notification) { if (DEBUG) Slog.d(TAG, "addNotification(" + key + " -> " + notification + ")"); addNotificationViews(key, notification); - // tick() + + boolean immersive = false; + try { + immersive = ActivityManagerNative.getDefault().isTopActivityImmersive(); + Slog.d(TAG, "Top activity is " + (immersive?"immersive":"not immersive")); + } catch (RemoteException ex) { + } + if (immersive) { + // TODO: immersive mode popups for tablet + } else if (notification.notification.fullScreenIntent != null) { + // not immersive & a full-screen alert should be shown + Slog.d(TAG, "Notification has fullScreenIntent and activity is not immersive;" + + " sending fullScreenIntent"); + try { + notification.notification.fullScreenIntent.send(); + } catch (PendingIntent.CanceledException e) { + } + } else { + // tick() + } } public void updateNotification(IBinder key, StatusBarNotification notification) { |