blob: 0deff08367f05ccc5e7a7323d698d77714a77bb6 [file] [log] [blame]
Joe Onorato0cbda992010-05-02 16:28:15 -07001/*
2 * Copyright (C) 2010 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
Joe Onorato79de0c52010-05-26 17:03:26 -040017package com.android.systemui.statusbar;
Joe Onorato0cbda992010-05-02 16:28:15 -070018
19import android.os.Handler;
Joe Onoratoa0c56fe2010-05-20 10:21:52 -070020import android.os.IBinder;
Joe Onorato0cbda992010-05-02 16:28:15 -070021import android.os.Message;
Jorim Jaggi24bec7c2015-02-04 12:40:14 +010022import android.util.Pair;
John Spurlockde84f0e2013-06-12 12:41:00 -040023
Joe Onorato0cbda992010-05-02 16:28:15 -070024import com.android.internal.statusbar.IStatusBar;
25import com.android.internal.statusbar.StatusBarIcon;
26import com.android.internal.statusbar.StatusBarIconList;
27
Joe Onoratof3f0e052010-05-14 18:49:29 -070028/**
29 * This class takes the functions from IStatusBar that come in on
30 * binder pool threads and posts messages to get them onto the main
31 * thread, and calls onto Callbacks. It also takes care of
Joe Onorato4762c2d2010-05-17 15:42:59 -070032 * coalescing these calls so they don't stack up. For the calls
33 * are coalesced, note that they are all idempotent.
Joe Onoratof3f0e052010-05-14 18:49:29 -070034 */
Joe Onorato808182d2010-07-09 18:52:06 -040035public class CommandQueue extends IStatusBar.Stub {
Daniel Sandler1d4d30a2011-04-28 12:35:29 -040036 private static final int INDEX_MASK = 0xffff;
37 private static final int MSG_SHIFT = 16;
38 private static final int MSG_MASK = 0xffff << MSG_SHIFT;
Joe Onorato0cbda992010-05-02 16:28:15 -070039
Daniel Sandler1d4d30a2011-04-28 12:35:29 -040040 private static final int OP_SET_ICON = 1;
Joe Onorato0cbda992010-05-02 16:28:15 -070041 private static final int OP_REMOVE_ICON = 2;
42
Svetoslav Ganove20a1772012-09-25 16:07:46 -070043 private static final int MSG_ICON = 1 << MSG_SHIFT;
Christoph Studere71fefc2014-06-24 16:16:49 +020044 private static final int MSG_DISABLE = 2 << MSG_SHIFT;
45 private static final int MSG_EXPAND_NOTIFICATIONS = 3 << MSG_SHIFT;
46 private static final int MSG_COLLAPSE_PANELS = 4 << MSG_SHIFT;
47 private static final int MSG_EXPAND_SETTINGS = 5 << MSG_SHIFT;
48 private static final int MSG_SET_SYSTEMUI_VISIBILITY = 6 << MSG_SHIFT;
49 private static final int MSG_TOP_APP_WINDOW_CHANGED = 7 << MSG_SHIFT;
50 private static final int MSG_SHOW_IME_BUTTON = 8 << MSG_SHIFT;
Michael Wright665366a2014-08-07 15:44:40 -070051 private static final int MSG_TOGGLE_RECENT_APPS = 9 << MSG_SHIFT;
52 private static final int MSG_PRELOAD_RECENT_APPS = 10 << MSG_SHIFT;
53 private static final int MSG_CANCEL_PRELOAD_RECENT_APPS = 11 << MSG_SHIFT;
54 private static final int MSG_SET_WINDOW_STATE = 12 << MSG_SHIFT;
55 private static final int MSG_SHOW_RECENT_APPS = 13 << MSG_SHIFT;
56 private static final int MSG_HIDE_RECENT_APPS = 14 << MSG_SHIFT;
57 private static final int MSG_BUZZ_BEEP_BLINKED = 15 << MSG_SHIFT;
58 private static final int MSG_NOTIFICATION_LIGHT_OFF = 16 << MSG_SHIFT;
59 private static final int MSG_NOTIFICATION_LIGHT_PULSE = 17 << MSG_SHIFT;
Jason Monk5565cb42014-09-12 10:59:21 -040060 private static final int MSG_SHOW_SCREEN_PIN_REQUEST = 18 << MSG_SHIFT;
Jorim Jaggi24bec7c2015-02-04 12:40:14 +010061 private static final int MSG_APP_TRANSITION_PENDING = 19 << MSG_SHIFT;
62 private static final int MSG_APP_TRANSITION_CANCELLED = 20 << MSG_SHIFT;
63 private static final int MSG_APP_TRANSITION_STARTING = 21 << MSG_SHIFT;
Adrian Roos4f43dc02015-06-17 16:43:38 -070064 private static final int MSG_ASSIST_DISCLOSURE = 22 << MSG_SHIFT;
Daniel Sandler328310c2011-09-23 15:56:52 -040065
Jim Miller9a720f52012-05-30 03:19:43 -070066 public static final int FLAG_EXCLUDE_NONE = 0;
67 public static final int FLAG_EXCLUDE_SEARCH_PANEL = 1 << 0;
68 public static final int FLAG_EXCLUDE_RECENTS_PANEL = 1 << 1;
69 public static final int FLAG_EXCLUDE_NOTIFICATION_PANEL = 1 << 2;
70 public static final int FLAG_EXCLUDE_INPUT_METHODS_PANEL = 1 << 3;
71 public static final int FLAG_EXCLUDE_COMPAT_MODE_PANEL = 1 << 4;
72
Jason Monkb605fec2014-05-02 17:04:10 -040073 private static final String SHOW_IME_SWITCHER_KEY = "showImeSwitcherKey";
74
Joe Onorato0cbda992010-05-02 16:28:15 -070075 private StatusBarIconList mList;
76 private Callbacks mCallbacks;
77 private Handler mHandler = new H();
78
79 /**
80 * These methods are called back on the main thread.
81 */
82 public interface Callbacks {
83 public void addIcon(String slot, int index, int viewIndex, StatusBarIcon icon);
84 public void updateIcon(String slot, int index, int viewIndex,
85 StatusBarIcon old, StatusBarIcon icon);
86 public void removeIcon(String slot, int index, int viewIndex);
Benjamin Franzcde0a2a2015-04-23 17:19:48 +010087 public void disable(int state1, int state2, boolean animate);
Daniel Sandler11cf1782012-09-27 14:03:08 -040088 public void animateExpandNotificationsPanel();
89 public void animateCollapsePanels(int flags);
90 public void animateExpandSettingsPanel();
Dianne Hackborn3a3a6cf2012-03-26 10:24:04 -070091 public void setSystemUiVisibility(int vis, int mask);
Dianne Hackborn7d049322011-06-14 15:00:32 -070092 public void topAppWindowChanged(boolean visible);
Jason Monkb605fec2014-05-02 17:04:10 -040093 public void setImeWindowStatus(IBinder token, int vis, int backDisposition,
94 boolean showImeSwitcher);
Winson Chung1e8d71b2014-05-16 17:05:22 -070095 public void showRecentApps(boolean triggeredFromAltTab);
Winson Chungcdcd4872014-08-05 18:00:13 -070096 public void hideRecentApps(boolean triggeredFromAltTab, boolean triggeredFromHomeKey);
Michael Jurka3b1fc472011-06-13 10:54:40 -070097 public void toggleRecentApps();
Michael Jurka7f2668c2012-03-27 07:49:52 -070098 public void preloadRecentApps();
Winson Chung1e8d71b2014-05-16 17:05:22 -070099 public void cancelPreloadRecentApps();
John Spurlock97642182013-07-29 17:58:39 -0400100 public void setWindowState(int window, int state);
John Spurlockcad57682014-07-26 17:09:56 -0400101 public void buzzBeepBlinked();
John Spurlockcb566aa2014-08-03 22:58:28 -0400102 public void notificationLightOff();
103 public void notificationLightPulse(int argb, int onMillis, int offMillis);
Jason Monk5565cb42014-09-12 10:59:21 -0400104 public void showScreenPinningRequest();
Jorim Jaggi24bec7c2015-02-04 12:40:14 +0100105 public void appTransitionPending();
106 public void appTransitionCancelled();
107 public void appTransitionStarting(long startTime, long duration);
Adrian Roos4f43dc02015-06-17 16:43:38 -0700108 public void showAssistDisclosure();
Joe Onorato0cbda992010-05-02 16:28:15 -0700109 }
110
111 public CommandQueue(Callbacks callbacks, StatusBarIconList list) {
112 mCallbacks = callbacks;
113 mList = list;
114 }
115
116 public void setIcon(int index, StatusBarIcon icon) {
117 synchronized (mList) {
118 int what = MSG_ICON | index;
119 mHandler.removeMessages(what);
120 mHandler.obtainMessage(what, OP_SET_ICON, 0, icon.clone()).sendToTarget();
121 }
122 }
123
124 public void removeIcon(int index) {
125 synchronized (mList) {
126 int what = MSG_ICON | index;
127 mHandler.removeMessages(what);
128 mHandler.obtainMessage(what, OP_REMOVE_ICON, 0, null).sendToTarget();
129 }
130 }
131
Benjamin Franzcde0a2a2015-04-23 17:19:48 +0100132 public void disable(int state1, int state2) {
Joe Onoratof3f0e052010-05-14 18:49:29 -0700133 synchronized (mList) {
134 mHandler.removeMessages(MSG_DISABLE);
Benjamin Franzcde0a2a2015-04-23 17:19:48 +0100135 mHandler.obtainMessage(MSG_DISABLE, state1, state2, null).sendToTarget();
Joe Onoratof3f0e052010-05-14 18:49:29 -0700136 }
137 }
138
Daniel Sandler11cf1782012-09-27 14:03:08 -0400139 public void animateExpandNotificationsPanel() {
Joe Onorato4762c2d2010-05-17 15:42:59 -0700140 synchronized (mList) {
Svetoslav Ganove20a1772012-09-25 16:07:46 -0700141 mHandler.removeMessages(MSG_EXPAND_NOTIFICATIONS);
142 mHandler.sendEmptyMessage(MSG_EXPAND_NOTIFICATIONS);
Joe Onorato4762c2d2010-05-17 15:42:59 -0700143 }
144 }
145
Daniel Sandler11cf1782012-09-27 14:03:08 -0400146 public void animateCollapsePanels() {
Svetoslav Ganove20a1772012-09-25 16:07:46 -0700147 synchronized (mList) {
Daniel Sandler11cf1782012-09-27 14:03:08 -0400148 mHandler.removeMessages(MSG_COLLAPSE_PANELS);
149 mHandler.sendEmptyMessage(MSG_COLLAPSE_PANELS);
Svetoslav Ganove20a1772012-09-25 16:07:46 -0700150 }
Jim Miller9a720f52012-05-30 03:19:43 -0700151 }
152
Daniel Sandler11cf1782012-09-27 14:03:08 -0400153 public void animateExpandSettingsPanel() {
Joe Onorato4762c2d2010-05-17 15:42:59 -0700154 synchronized (mList) {
Daniel Sandler11cf1782012-09-27 14:03:08 -0400155 mHandler.removeMessages(MSG_EXPAND_SETTINGS);
156 mHandler.sendEmptyMessage(MSG_EXPAND_SETTINGS);
Joe Onorato4762c2d2010-05-17 15:42:59 -0700157 }
158 }
159
Dianne Hackborn3a3a6cf2012-03-26 10:24:04 -0700160 public void setSystemUiVisibility(int vis, int mask) {
Joe Onorato93056472010-09-10 10:30:46 -0400161 synchronized (mList) {
Selim Cinek4a4a2bddc2015-05-07 12:50:19 -0700162 // Don't coalesce these, since it might have one time flags set such as
163 // STATUS_BAR_UNHIDE which might get lost.
Dianne Hackborn3a3a6cf2012-03-26 10:24:04 -0700164 mHandler.obtainMessage(MSG_SET_SYSTEMUI_VISIBILITY, vis, mask, null).sendToTarget();
Joe Onorato93056472010-09-10 10:30:46 -0400165 }
166 }
167
Dianne Hackborn7d049322011-06-14 15:00:32 -0700168 public void topAppWindowChanged(boolean menuVisible) {
Daniel Sandlere02d8082010-10-08 15:13:22 -0400169 synchronized (mList) {
Dianne Hackborn7d049322011-06-14 15:00:32 -0700170 mHandler.removeMessages(MSG_TOP_APP_WINDOW_CHANGED);
171 mHandler.obtainMessage(MSG_TOP_APP_WINDOW_CHANGED, menuVisible ? 1 : 0, 0,
172 null).sendToTarget();
Daniel Sandlere02d8082010-10-08 15:13:22 -0400173 }
174 }
175
Jason Monkb605fec2014-05-02 17:04:10 -0400176 public void setImeWindowStatus(IBinder token, int vis, int backDisposition,
177 boolean showImeSwitcher) {
satok06487a52010-10-29 11:37:18 +0900178 synchronized (mList) {
179 mHandler.removeMessages(MSG_SHOW_IME_BUTTON);
Jason Monkb605fec2014-05-02 17:04:10 -0400180 Message m = mHandler.obtainMessage(MSG_SHOW_IME_BUTTON, vis, backDisposition, token);
181 m.getData().putBoolean(SHOW_IME_SWITCHER_KEY, showImeSwitcher);
182 m.sendToTarget();
satok06487a52010-10-29 11:37:18 +0900183 }
184 }
185
Winson Chung1e8d71b2014-05-16 17:05:22 -0700186 public void showRecentApps(boolean triggeredFromAltTab) {
187 synchronized (mList) {
188 mHandler.removeMessages(MSG_SHOW_RECENT_APPS);
189 mHandler.obtainMessage(MSG_SHOW_RECENT_APPS,
190 triggeredFromAltTab ? 1 : 0, 0, null).sendToTarget();
191 }
192 }
193
Winson Chungcdcd4872014-08-05 18:00:13 -0700194 public void hideRecentApps(boolean triggeredFromAltTab, boolean triggeredFromHomeKey) {
Winson Chung1e8d71b2014-05-16 17:05:22 -0700195 synchronized (mList) {
196 mHandler.removeMessages(MSG_HIDE_RECENT_APPS);
Winson Chung6cb485f2014-05-19 10:30:43 -0700197 mHandler.obtainMessage(MSG_HIDE_RECENT_APPS,
Winson Chungcdcd4872014-08-05 18:00:13 -0700198 triggeredFromAltTab ? 1 : 0, triggeredFromHomeKey ? 1 : 0,
199 null).sendToTarget();
Winson Chung1e8d71b2014-05-16 17:05:22 -0700200 }
201 }
202
Michael Jurka3b1fc472011-06-13 10:54:40 -0700203 public void toggleRecentApps() {
204 synchronized (mList) {
205 mHandler.removeMessages(MSG_TOGGLE_RECENT_APPS);
206 mHandler.obtainMessage(MSG_TOGGLE_RECENT_APPS, 0, 0, null).sendToTarget();
207 }
208 }
209
Michael Jurka7f2668c2012-03-27 07:49:52 -0700210 public void preloadRecentApps() {
211 synchronized (mList) {
212 mHandler.removeMessages(MSG_PRELOAD_RECENT_APPS);
213 mHandler.obtainMessage(MSG_PRELOAD_RECENT_APPS, 0, 0, null).sendToTarget();
214 }
215 }
216
217 public void cancelPreloadRecentApps() {
218 synchronized (mList) {
219 mHandler.removeMessages(MSG_CANCEL_PRELOAD_RECENT_APPS);
220 mHandler.obtainMessage(MSG_CANCEL_PRELOAD_RECENT_APPS, 0, 0, null).sendToTarget();
221 }
222 }
223
John Spurlock97642182013-07-29 17:58:39 -0400224 public void setWindowState(int window, int state) {
225 synchronized (mList) {
John Spurlock5b9145b2013-08-20 15:13:47 -0400226 // don't coalesce these
John Spurlock97642182013-07-29 17:58:39 -0400227 mHandler.obtainMessage(MSG_SET_WINDOW_STATE, window, state, null).sendToTarget();
228 }
229 }
230
John Spurlockcad57682014-07-26 17:09:56 -0400231 public void buzzBeepBlinked() {
232 synchronized (mList) {
233 mHandler.removeMessages(MSG_BUZZ_BEEP_BLINKED);
234 mHandler.sendEmptyMessage(MSG_BUZZ_BEEP_BLINKED);
235 }
236 }
Jorim Jaggi380ecb82014-03-14 17:25:20 +0100237
John Spurlockcb566aa2014-08-03 22:58:28 -0400238 public void notificationLightOff() {
239 synchronized (mList) {
240 mHandler.sendEmptyMessage(MSG_NOTIFICATION_LIGHT_OFF);
241 }
242 }
243
244 public void notificationLightPulse(int argb, int onMillis, int offMillis) {
245 synchronized (mList) {
246 mHandler.obtainMessage(MSG_NOTIFICATION_LIGHT_PULSE, onMillis, offMillis, argb)
247 .sendToTarget();
248 }
249 }
250
Jason Monk5565cb42014-09-12 10:59:21 -0400251 public void showScreenPinningRequest() {
252 synchronized (mList) {
253 mHandler.sendEmptyMessage(MSG_SHOW_SCREEN_PIN_REQUEST);
254 }
255 }
256
Jorim Jaggi24bec7c2015-02-04 12:40:14 +0100257 public void appTransitionPending() {
258 synchronized (mList) {
259 mHandler.removeMessages(MSG_APP_TRANSITION_PENDING);
260 mHandler.sendEmptyMessage(MSG_APP_TRANSITION_PENDING);
261 }
262 }
263
264 public void appTransitionCancelled() {
265 synchronized (mList) {
266 mHandler.removeMessages(MSG_APP_TRANSITION_PENDING);
267 mHandler.sendEmptyMessage(MSG_APP_TRANSITION_PENDING);
268 }
269 }
270
271 public void appTransitionStarting(long startTime, long duration) {
272 synchronized (mList) {
273 mHandler.removeMessages(MSG_APP_TRANSITION_STARTING);
274 mHandler.obtainMessage(MSG_APP_TRANSITION_STARTING, Pair.create(startTime, duration))
275 .sendToTarget();
276 }
277 }
278
Adrian Roos4f43dc02015-06-17 16:43:38 -0700279 public void showAssistDisclosure() {
280 synchronized (mList) {
281 mHandler.removeMessages(MSG_ASSIST_DISCLOSURE);
282 mHandler.obtainMessage(MSG_ASSIST_DISCLOSURE).sendToTarget();
283 }
284 }
285
Joe Onorato0cbda992010-05-02 16:28:15 -0700286 private final class H extends Handler {
287 public void handleMessage(Message msg) {
Joe Onoratof3f0e052010-05-14 18:49:29 -0700288 final int what = msg.what & MSG_MASK;
Joe Onorato66d7d012010-05-14 10:05:10 -0700289 switch (what) {
Joe Onorato0cbda992010-05-02 16:28:15 -0700290 case MSG_ICON: {
Joe Onoratof3f0e052010-05-14 18:49:29 -0700291 final int index = msg.what & INDEX_MASK;
292 final int viewIndex = mList.getViewIndex(index);
Joe Onorato0cbda992010-05-02 16:28:15 -0700293 switch (msg.arg1) {
294 case OP_SET_ICON: {
295 StatusBarIcon icon = (StatusBarIcon)msg.obj;
296 StatusBarIcon old = mList.getIcon(index);
297 if (old == null) {
298 mList.setIcon(index, icon);
299 mCallbacks.addIcon(mList.getSlot(index), index, viewIndex, icon);
300 } else {
301 mList.setIcon(index, icon);
302 mCallbacks.updateIcon(mList.getSlot(index), index, viewIndex,
303 old, icon);
304 }
305 break;
306 }
307 case OP_REMOVE_ICON:
Joe Onorato795f2842010-09-27 11:34:46 -0700308 if (mList.getIcon(index) != null) {
309 mList.removeIcon(index);
310 mCallbacks.removeIcon(mList.getSlot(index), index, viewIndex);
311 }
Joe Onorato0cbda992010-05-02 16:28:15 -0700312 break;
313 }
314 break;
Joe Onoratof3f0e052010-05-14 18:49:29 -0700315 }
316 case MSG_DISABLE:
Benjamin Franzcde0a2a2015-04-23 17:19:48 +0100317 mCallbacks.disable(msg.arg1, msg.arg2, true /* animate */);
Joe Onoratof3f0e052010-05-14 18:49:29 -0700318 break;
Svetoslav Ganove20a1772012-09-25 16:07:46 -0700319 case MSG_EXPAND_NOTIFICATIONS:
Daniel Sandler11cf1782012-09-27 14:03:08 -0400320 mCallbacks.animateExpandNotificationsPanel();
Svetoslav Ganove20a1772012-09-25 16:07:46 -0700321 break;
Daniel Sandler11cf1782012-09-27 14:03:08 -0400322 case MSG_COLLAPSE_PANELS:
323 mCallbacks.animateCollapsePanels(0);
Svetoslav Ganove20a1772012-09-25 16:07:46 -0700324 break;
Daniel Sandler11cf1782012-09-27 14:03:08 -0400325 case MSG_EXPAND_SETTINGS:
326 mCallbacks.animateExpandSettingsPanel();
Joe Onorato93056472010-09-10 10:30:46 -0400327 break;
Daniel Sandler60ee2562011-07-22 12:34:33 -0400328 case MSG_SET_SYSTEMUI_VISIBILITY:
Dianne Hackborn3a3a6cf2012-03-26 10:24:04 -0700329 mCallbacks.setSystemUiVisibility(msg.arg1, msg.arg2);
Joe Onorato93056472010-09-10 10:30:46 -0400330 break;
Dianne Hackborn7d049322011-06-14 15:00:32 -0700331 case MSG_TOP_APP_WINDOW_CHANGED:
332 mCallbacks.topAppWindowChanged(msg.arg1 != 0);
Daniel Sandlere02d8082010-10-08 15:13:22 -0400333 break;
satok06487a52010-10-29 11:37:18 +0900334 case MSG_SHOW_IME_BUTTON:
Jason Monkb605fec2014-05-02 17:04:10 -0400335 mCallbacks.setImeWindowStatus((IBinder) msg.obj, msg.arg1, msg.arg2,
336 msg.getData().getBoolean(SHOW_IME_SWITCHER_KEY, false));
satok06487a52010-10-29 11:37:18 +0900337 break;
Winson Chung1e8d71b2014-05-16 17:05:22 -0700338 case MSG_SHOW_RECENT_APPS:
339 mCallbacks.showRecentApps(msg.arg1 != 0);
340 break;
341 case MSG_HIDE_RECENT_APPS:
Winson Chungcdcd4872014-08-05 18:00:13 -0700342 mCallbacks.hideRecentApps(msg.arg1 != 0, msg.arg2 != 0);
Winson Chung1e8d71b2014-05-16 17:05:22 -0700343 break;
Michael Jurka3b1fc472011-06-13 10:54:40 -0700344 case MSG_TOGGLE_RECENT_APPS:
345 mCallbacks.toggleRecentApps();
346 break;
Michael Jurka7f2668c2012-03-27 07:49:52 -0700347 case MSG_PRELOAD_RECENT_APPS:
348 mCallbacks.preloadRecentApps();
349 break;
350 case MSG_CANCEL_PRELOAD_RECENT_APPS:
351 mCallbacks.cancelPreloadRecentApps();
352 break;
John Spurlock97642182013-07-29 17:58:39 -0400353 case MSG_SET_WINDOW_STATE:
354 mCallbacks.setWindowState(msg.arg1, msg.arg2);
355 break;
John Spurlockcad57682014-07-26 17:09:56 -0400356 case MSG_BUZZ_BEEP_BLINKED:
357 mCallbacks.buzzBeepBlinked();
358 break;
John Spurlockcb566aa2014-08-03 22:58:28 -0400359 case MSG_NOTIFICATION_LIGHT_OFF:
360 mCallbacks.notificationLightOff();
361 break;
362 case MSG_NOTIFICATION_LIGHT_PULSE:
363 mCallbacks.notificationLightPulse((Integer) msg.obj, msg.arg1, msg.arg2);
364 break;
Jason Monk5565cb42014-09-12 10:59:21 -0400365 case MSG_SHOW_SCREEN_PIN_REQUEST:
366 mCallbacks.showScreenPinningRequest();
367 break;
Jorim Jaggi24bec7c2015-02-04 12:40:14 +0100368 case MSG_APP_TRANSITION_PENDING:
369 mCallbacks.appTransitionPending();
370 break;
371 case MSG_APP_TRANSITION_CANCELLED:
372 mCallbacks.appTransitionCancelled();
373 break;
374 case MSG_APP_TRANSITION_STARTING:
375 Pair<Long, Long> data = (Pair<Long, Long>) msg.obj;
376 mCallbacks.appTransitionStarting(data.first, data.second);
377 break;
Adrian Roos4f43dc02015-06-17 16:43:38 -0700378 case MSG_ASSIST_DISCLOSURE:
379 mCallbacks.showAssistDisclosure();
380 break;
Joe Onorato0cbda992010-05-02 16:28:15 -0700381 }
382 }
383 }
384}
385