Joe Onorato | 0cbda99 | 2010-05-02 16:28:15 -0700 | [diff] [blame] | 1 | /* |
| 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 Onorato | 79de0c5 | 2010-05-26 17:03:26 -0400 | [diff] [blame] | 17 | package com.android.systemui.statusbar; |
Joe Onorato | 0cbda99 | 2010-05-02 16:28:15 -0700 | [diff] [blame] | 18 | |
| 19 | import android.os.Handler; |
Joe Onorato | a0c56fe | 2010-05-20 10:21:52 -0700 | [diff] [blame] | 20 | import android.os.IBinder; |
Joe Onorato | 0cbda99 | 2010-05-02 16:28:15 -0700 | [diff] [blame] | 21 | import android.os.Message; |
| 22 | |
| 23 | import com.android.internal.statusbar.IStatusBar; |
| 24 | import com.android.internal.statusbar.StatusBarIcon; |
| 25 | import com.android.internal.statusbar.StatusBarIconList; |
Joe Onorato | a0c56fe | 2010-05-20 10:21:52 -0700 | [diff] [blame] | 26 | import com.android.internal.statusbar.StatusBarNotification; |
Joe Onorato | 0cbda99 | 2010-05-02 16:28:15 -0700 | [diff] [blame] | 27 | |
Joe Onorato | f3f0e05 | 2010-05-14 18:49:29 -0700 | [diff] [blame] | 28 | /** |
| 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 Onorato | 4762c2d | 2010-05-17 15:42:59 -0700 | [diff] [blame] | 32 | * coalescing these calls so they don't stack up. For the calls |
| 33 | * are coalesced, note that they are all idempotent. |
Joe Onorato | f3f0e05 | 2010-05-14 18:49:29 -0700 | [diff] [blame] | 34 | */ |
Joe Onorato | 808182d | 2010-07-09 18:52:06 -0400 | [diff] [blame] | 35 | public class CommandQueue extends IStatusBar.Stub { |
Joe Onorato | 514ad663 | 2010-05-13 18:49:00 -0700 | [diff] [blame] | 36 | private static final String TAG = "StatusBar.CommandQueue"; |
Joe Onorato | 0cbda99 | 2010-05-02 16:28:15 -0700 | [diff] [blame] | 37 | |
Daniel Sandler | 1d4d30a | 2011-04-28 12:35:29 -0400 | [diff] [blame] | 38 | private static final int INDEX_MASK = 0xffff; |
| 39 | private static final int MSG_SHIFT = 16; |
| 40 | private static final int MSG_MASK = 0xffff << MSG_SHIFT; |
Joe Onorato | 0cbda99 | 2010-05-02 16:28:15 -0700 | [diff] [blame] | 41 | |
Daniel Sandler | 1d4d30a | 2011-04-28 12:35:29 -0400 | [diff] [blame] | 42 | |
| 43 | private static final int MSG_ICON = 1 << MSG_SHIFT; |
| 44 | private static final int OP_SET_ICON = 1; |
Joe Onorato | 0cbda99 | 2010-05-02 16:28:15 -0700 | [diff] [blame] | 45 | private static final int OP_REMOVE_ICON = 2; |
| 46 | |
Daniel Sandler | 1d4d30a | 2011-04-28 12:35:29 -0400 | [diff] [blame] | 47 | private static final int MSG_ADD_NOTIFICATION = 2 << MSG_SHIFT; |
| 48 | private static final int MSG_UPDATE_NOTIFICATION = 3 << MSG_SHIFT; |
| 49 | private static final int MSG_REMOVE_NOTIFICATION = 4 << MSG_SHIFT; |
Joe Onorato | f3f0e05 | 2010-05-14 18:49:29 -0700 | [diff] [blame] | 50 | |
Daniel Sandler | 1d4d30a | 2011-04-28 12:35:29 -0400 | [diff] [blame] | 51 | private static final int MSG_DISABLE = 5 << MSG_SHIFT; |
Joe Onorato | a0c56fe | 2010-05-20 10:21:52 -0700 | [diff] [blame] | 52 | |
Daniel Sandler | 1d4d30a | 2011-04-28 12:35:29 -0400 | [diff] [blame] | 53 | private static final int MSG_SET_VISIBILITY = 6 << MSG_SHIFT; |
| 54 | private static final int OP_EXPAND = 1; |
| 55 | private static final int OP_COLLAPSE = 2; |
Joe Onorato | 4762c2d | 2010-05-17 15:42:59 -0700 | [diff] [blame] | 56 | |
Daniel Sandler | 60ee256 | 2011-07-22 12:34:33 -0400 | [diff] [blame] | 57 | private static final int MSG_SET_SYSTEMUI_VISIBILITY = 7 << MSG_SHIFT; |
Joe Onorato | 9305647 | 2010-09-10 10:30:46 -0400 | [diff] [blame] | 58 | |
Dianne Hackborn | 3fe9cc5 | 2011-06-14 16:13:26 -0700 | [diff] [blame] | 59 | private static final int MSG_TOP_APP_WINDOW_CHANGED = 8 << MSG_SHIFT; |
Daniel Sandler | 1d4d30a | 2011-04-28 12:35:29 -0400 | [diff] [blame] | 60 | private static final int MSG_SHOW_IME_BUTTON = 9 << MSG_SHIFT; |
| 61 | private static final int MSG_SET_HARD_KEYBOARD_STATUS = 10 << MSG_SHIFT; |
Jim Miller | e898ac5 | 2012-04-06 17:10:57 -0700 | [diff] [blame] | 62 | |
Dianne Hackborn | df89e65 | 2011-10-06 22:35:11 -0700 | [diff] [blame] | 63 | private static final int MSG_TOGGLE_RECENT_APPS = 11 << MSG_SHIFT; |
Michael Jurka | 7f2668c | 2012-03-27 07:49:52 -0700 | [diff] [blame] | 64 | private static final int MSG_PRELOAD_RECENT_APPS = 12 << MSG_SHIFT; |
| 65 | private static final int MSG_CANCEL_PRELOAD_RECENT_APPS = 13 << MSG_SHIFT; |
Daniel Sandler | 1d4d30a | 2011-04-28 12:35:29 -0400 | [diff] [blame] | 66 | |
Michael Jurka | 7f2668c | 2012-03-27 07:49:52 -0700 | [diff] [blame] | 67 | private static final int MSG_SET_NAVIGATION_ICON_HINTS = 14 << MSG_SHIFT; |
Daniel Sandler | 328310c | 2011-09-23 15:56:52 -0400 | [diff] [blame] | 68 | |
Jim Miller | 9a720f5 | 2012-05-30 03:19:43 -0700 | [diff] [blame^] | 69 | public static final int FLAG_EXCLUDE_NONE = 0; |
| 70 | public static final int FLAG_EXCLUDE_SEARCH_PANEL = 1 << 0; |
| 71 | public static final int FLAG_EXCLUDE_RECENTS_PANEL = 1 << 1; |
| 72 | public static final int FLAG_EXCLUDE_NOTIFICATION_PANEL = 1 << 2; |
| 73 | public static final int FLAG_EXCLUDE_INPUT_METHODS_PANEL = 1 << 3; |
| 74 | public static final int FLAG_EXCLUDE_COMPAT_MODE_PANEL = 1 << 4; |
| 75 | |
Joe Onorato | 0cbda99 | 2010-05-02 16:28:15 -0700 | [diff] [blame] | 76 | private StatusBarIconList mList; |
| 77 | private Callbacks mCallbacks; |
| 78 | private Handler mHandler = new H(); |
| 79 | |
Joe Onorato | a0c56fe | 2010-05-20 10:21:52 -0700 | [diff] [blame] | 80 | private class NotificationQueueEntry { |
| 81 | IBinder key; |
| 82 | StatusBarNotification notification; |
| 83 | } |
| 84 | |
Joe Onorato | 0cbda99 | 2010-05-02 16:28:15 -0700 | [diff] [blame] | 85 | /** |
| 86 | * These methods are called back on the main thread. |
| 87 | */ |
| 88 | public interface Callbacks { |
| 89 | public void addIcon(String slot, int index, int viewIndex, StatusBarIcon icon); |
| 90 | public void updateIcon(String slot, int index, int viewIndex, |
| 91 | StatusBarIcon old, StatusBarIcon icon); |
| 92 | public void removeIcon(String slot, int index, int viewIndex); |
Joe Onorato | a0c56fe | 2010-05-20 10:21:52 -0700 | [diff] [blame] | 93 | public void addNotification(IBinder key, StatusBarNotification notification); |
| 94 | public void updateNotification(IBinder key, StatusBarNotification notification); |
| 95 | public void removeNotification(IBinder key); |
Joe Onorato | f3f0e05 | 2010-05-14 18:49:29 -0700 | [diff] [blame] | 96 | public void disable(int state); |
Joe Onorato | 4762c2d | 2010-05-17 15:42:59 -0700 | [diff] [blame] | 97 | public void animateExpand(); |
Jim Miller | 9a720f5 | 2012-05-30 03:19:43 -0700 | [diff] [blame^] | 98 | public void animateCollapse(int flags); |
Dianne Hackborn | 3a3a6cf | 2012-03-26 10:24:04 -0700 | [diff] [blame] | 99 | public void setSystemUiVisibility(int vis, int mask); |
Dianne Hackborn | 7d04932 | 2011-06-14 15:00:32 -0700 | [diff] [blame] | 100 | public void topAppWindowChanged(boolean visible); |
Joe Onorato | 857fd9b | 2011-01-27 15:08:35 -0800 | [diff] [blame] | 101 | public void setImeWindowStatus(IBinder token, int vis, int backDisposition); |
Jeff Brown | 2992ea7 | 2011-01-28 22:04:14 -0800 | [diff] [blame] | 102 | public void setHardKeyboardStatus(boolean available, boolean enabled); |
Michael Jurka | 3b1fc47 | 2011-06-13 10:54:40 -0700 | [diff] [blame] | 103 | public void toggleRecentApps(); |
Michael Jurka | 7f2668c | 2012-03-27 07:49:52 -0700 | [diff] [blame] | 104 | public void preloadRecentApps(); |
Jim Miller | e898ac5 | 2012-04-06 17:10:57 -0700 | [diff] [blame] | 105 | public void showSearchPanel(); |
| 106 | public void hideSearchPanel(); |
Michael Jurka | 7f2668c | 2012-03-27 07:49:52 -0700 | [diff] [blame] | 107 | public void cancelPreloadRecentApps(); |
Daniel Sandler | 328310c | 2011-09-23 15:56:52 -0400 | [diff] [blame] | 108 | public void setNavigationIconHints(int hints); |
Joe Onorato | 0cbda99 | 2010-05-02 16:28:15 -0700 | [diff] [blame] | 109 | } |
| 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 | |
Joe Onorato | a0c56fe | 2010-05-20 10:21:52 -0700 | [diff] [blame] | 132 | public void addNotification(IBinder key, StatusBarNotification notification) { |
| 133 | synchronized (mList) { |
| 134 | NotificationQueueEntry ne = new NotificationQueueEntry(); |
| 135 | ne.key = key; |
| 136 | ne.notification = notification; |
| 137 | mHandler.obtainMessage(MSG_ADD_NOTIFICATION, 0, 0, ne).sendToTarget(); |
| 138 | } |
| 139 | } |
| 140 | |
| 141 | public void updateNotification(IBinder key, StatusBarNotification notification) { |
| 142 | synchronized (mList) { |
| 143 | NotificationQueueEntry ne = new NotificationQueueEntry(); |
| 144 | ne.key = key; |
| 145 | ne.notification = notification; |
| 146 | mHandler.obtainMessage(MSG_UPDATE_NOTIFICATION, 0, 0, ne).sendToTarget(); |
| 147 | } |
| 148 | } |
| 149 | |
| 150 | public void removeNotification(IBinder key) { |
| 151 | synchronized (mList) { |
| 152 | mHandler.obtainMessage(MSG_REMOVE_NOTIFICATION, 0, 0, key).sendToTarget(); |
| 153 | } |
| 154 | } |
| 155 | |
Joe Onorato | f3f0e05 | 2010-05-14 18:49:29 -0700 | [diff] [blame] | 156 | public void disable(int state) { |
| 157 | synchronized (mList) { |
| 158 | mHandler.removeMessages(MSG_DISABLE); |
| 159 | mHandler.obtainMessage(MSG_DISABLE, state, 0, null).sendToTarget(); |
| 160 | } |
| 161 | } |
| 162 | |
Joe Onorato | 4762c2d | 2010-05-17 15:42:59 -0700 | [diff] [blame] | 163 | public void animateExpand() { |
| 164 | synchronized (mList) { |
| 165 | mHandler.removeMessages(MSG_SET_VISIBILITY); |
| 166 | mHandler.obtainMessage(MSG_SET_VISIBILITY, OP_EXPAND, 0, null).sendToTarget(); |
| 167 | } |
| 168 | } |
| 169 | |
| 170 | public void animateCollapse() { |
Jim Miller | 9a720f5 | 2012-05-30 03:19:43 -0700 | [diff] [blame^] | 171 | animateCollapse(CommandQueue.FLAG_EXCLUDE_NONE); |
| 172 | } |
| 173 | |
| 174 | public void animateCollapse(int flags) { |
Joe Onorato | 4762c2d | 2010-05-17 15:42:59 -0700 | [diff] [blame] | 175 | synchronized (mList) { |
| 176 | mHandler.removeMessages(MSG_SET_VISIBILITY); |
Jim Miller | 9a720f5 | 2012-05-30 03:19:43 -0700 | [diff] [blame^] | 177 | mHandler.obtainMessage(MSG_SET_VISIBILITY, OP_COLLAPSE, flags, null).sendToTarget(); |
Joe Onorato | 4762c2d | 2010-05-17 15:42:59 -0700 | [diff] [blame] | 178 | } |
| 179 | } |
| 180 | |
Dianne Hackborn | 3a3a6cf | 2012-03-26 10:24:04 -0700 | [diff] [blame] | 181 | public void setSystemUiVisibility(int vis, int mask) { |
Joe Onorato | 9305647 | 2010-09-10 10:30:46 -0400 | [diff] [blame] | 182 | synchronized (mList) { |
Daniel Sandler | 60ee256 | 2011-07-22 12:34:33 -0400 | [diff] [blame] | 183 | mHandler.removeMessages(MSG_SET_SYSTEMUI_VISIBILITY); |
Dianne Hackborn | 3a3a6cf | 2012-03-26 10:24:04 -0700 | [diff] [blame] | 184 | mHandler.obtainMessage(MSG_SET_SYSTEMUI_VISIBILITY, vis, mask, null).sendToTarget(); |
Joe Onorato | 9305647 | 2010-09-10 10:30:46 -0400 | [diff] [blame] | 185 | } |
| 186 | } |
| 187 | |
Dianne Hackborn | 7d04932 | 2011-06-14 15:00:32 -0700 | [diff] [blame] | 188 | public void topAppWindowChanged(boolean menuVisible) { |
Daniel Sandler | e02d808 | 2010-10-08 15:13:22 -0400 | [diff] [blame] | 189 | synchronized (mList) { |
Dianne Hackborn | 7d04932 | 2011-06-14 15:00:32 -0700 | [diff] [blame] | 190 | mHandler.removeMessages(MSG_TOP_APP_WINDOW_CHANGED); |
| 191 | mHandler.obtainMessage(MSG_TOP_APP_WINDOW_CHANGED, menuVisible ? 1 : 0, 0, |
| 192 | null).sendToTarget(); |
Daniel Sandler | e02d808 | 2010-10-08 15:13:22 -0400 | [diff] [blame] | 193 | } |
| 194 | } |
| 195 | |
Joe Onorato | 857fd9b | 2011-01-27 15:08:35 -0800 | [diff] [blame] | 196 | public void setImeWindowStatus(IBinder token, int vis, int backDisposition) { |
satok | 06487a5 | 2010-10-29 11:37:18 +0900 | [diff] [blame] | 197 | synchronized (mList) { |
| 198 | mHandler.removeMessages(MSG_SHOW_IME_BUTTON); |
Joe Onorato | 857fd9b | 2011-01-27 15:08:35 -0800 | [diff] [blame] | 199 | mHandler.obtainMessage(MSG_SHOW_IME_BUTTON, vis, backDisposition, token) |
| 200 | .sendToTarget(); |
satok | 06487a5 | 2010-10-29 11:37:18 +0900 | [diff] [blame] | 201 | } |
| 202 | } |
| 203 | |
Jeff Brown | 2992ea7 | 2011-01-28 22:04:14 -0800 | [diff] [blame] | 204 | public void setHardKeyboardStatus(boolean available, boolean enabled) { |
| 205 | synchronized (mList) { |
| 206 | mHandler.removeMessages(MSG_SET_HARD_KEYBOARD_STATUS); |
| 207 | mHandler.obtainMessage(MSG_SET_HARD_KEYBOARD_STATUS, |
| 208 | available ? 1 : 0, enabled ? 1 : 0).sendToTarget(); |
| 209 | } |
| 210 | } |
| 211 | |
Michael Jurka | 3b1fc47 | 2011-06-13 10:54:40 -0700 | [diff] [blame] | 212 | public void toggleRecentApps() { |
| 213 | synchronized (mList) { |
| 214 | mHandler.removeMessages(MSG_TOGGLE_RECENT_APPS); |
| 215 | mHandler.obtainMessage(MSG_TOGGLE_RECENT_APPS, 0, 0, null).sendToTarget(); |
| 216 | } |
| 217 | } |
| 218 | |
Michael Jurka | 7f2668c | 2012-03-27 07:49:52 -0700 | [diff] [blame] | 219 | public void preloadRecentApps() { |
| 220 | synchronized (mList) { |
| 221 | mHandler.removeMessages(MSG_PRELOAD_RECENT_APPS); |
| 222 | mHandler.obtainMessage(MSG_PRELOAD_RECENT_APPS, 0, 0, null).sendToTarget(); |
| 223 | } |
| 224 | } |
| 225 | |
| 226 | public void cancelPreloadRecentApps() { |
| 227 | synchronized (mList) { |
| 228 | mHandler.removeMessages(MSG_CANCEL_PRELOAD_RECENT_APPS); |
| 229 | mHandler.obtainMessage(MSG_CANCEL_PRELOAD_RECENT_APPS, 0, 0, null).sendToTarget(); |
| 230 | } |
| 231 | } |
| 232 | |
Daniel Sandler | 328310c | 2011-09-23 15:56:52 -0400 | [diff] [blame] | 233 | public void setNavigationIconHints(int hints) { |
| 234 | synchronized (mList) { |
| 235 | mHandler.removeMessages(MSG_SET_NAVIGATION_ICON_HINTS); |
| 236 | mHandler.obtainMessage(MSG_SET_NAVIGATION_ICON_HINTS, hints, 0, null).sendToTarget(); |
| 237 | } |
| 238 | } |
| 239 | |
Joe Onorato | 0cbda99 | 2010-05-02 16:28:15 -0700 | [diff] [blame] | 240 | private final class H extends Handler { |
| 241 | public void handleMessage(Message msg) { |
Joe Onorato | f3f0e05 | 2010-05-14 18:49:29 -0700 | [diff] [blame] | 242 | final int what = msg.what & MSG_MASK; |
Joe Onorato | 66d7d01 | 2010-05-14 10:05:10 -0700 | [diff] [blame] | 243 | switch (what) { |
Joe Onorato | 0cbda99 | 2010-05-02 16:28:15 -0700 | [diff] [blame] | 244 | case MSG_ICON: { |
Joe Onorato | f3f0e05 | 2010-05-14 18:49:29 -0700 | [diff] [blame] | 245 | final int index = msg.what & INDEX_MASK; |
| 246 | final int viewIndex = mList.getViewIndex(index); |
Joe Onorato | 0cbda99 | 2010-05-02 16:28:15 -0700 | [diff] [blame] | 247 | switch (msg.arg1) { |
| 248 | case OP_SET_ICON: { |
| 249 | StatusBarIcon icon = (StatusBarIcon)msg.obj; |
| 250 | StatusBarIcon old = mList.getIcon(index); |
| 251 | if (old == null) { |
| 252 | mList.setIcon(index, icon); |
| 253 | mCallbacks.addIcon(mList.getSlot(index), index, viewIndex, icon); |
| 254 | } else { |
| 255 | mList.setIcon(index, icon); |
| 256 | mCallbacks.updateIcon(mList.getSlot(index), index, viewIndex, |
| 257 | old, icon); |
| 258 | } |
| 259 | break; |
| 260 | } |
| 261 | case OP_REMOVE_ICON: |
Joe Onorato | 795f284 | 2010-09-27 11:34:46 -0700 | [diff] [blame] | 262 | if (mList.getIcon(index) != null) { |
| 263 | mList.removeIcon(index); |
| 264 | mCallbacks.removeIcon(mList.getSlot(index), index, viewIndex); |
| 265 | } |
Joe Onorato | 0cbda99 | 2010-05-02 16:28:15 -0700 | [diff] [blame] | 266 | break; |
| 267 | } |
| 268 | break; |
Joe Onorato | f3f0e05 | 2010-05-14 18:49:29 -0700 | [diff] [blame] | 269 | } |
Joe Onorato | a0c56fe | 2010-05-20 10:21:52 -0700 | [diff] [blame] | 270 | case MSG_ADD_NOTIFICATION: { |
| 271 | final NotificationQueueEntry ne = (NotificationQueueEntry)msg.obj; |
| 272 | mCallbacks.addNotification(ne.key, ne.notification); |
| 273 | break; |
| 274 | } |
| 275 | case MSG_UPDATE_NOTIFICATION: { |
| 276 | final NotificationQueueEntry ne = (NotificationQueueEntry)msg.obj; |
| 277 | mCallbacks.updateNotification(ne.key, ne.notification); |
| 278 | break; |
| 279 | } |
| 280 | case MSG_REMOVE_NOTIFICATION: { |
| 281 | mCallbacks.removeNotification((IBinder)msg.obj); |
| 282 | break; |
| 283 | } |
Joe Onorato | f3f0e05 | 2010-05-14 18:49:29 -0700 | [diff] [blame] | 284 | case MSG_DISABLE: |
| 285 | mCallbacks.disable(msg.arg1); |
| 286 | break; |
Joe Onorato | 4762c2d | 2010-05-17 15:42:59 -0700 | [diff] [blame] | 287 | case MSG_SET_VISIBILITY: |
| 288 | if (msg.arg1 == OP_EXPAND) { |
| 289 | mCallbacks.animateExpand(); |
| 290 | } else { |
Jim Miller | 9a720f5 | 2012-05-30 03:19:43 -0700 | [diff] [blame^] | 291 | mCallbacks.animateCollapse(msg.arg2); |
Joe Onorato | 4762c2d | 2010-05-17 15:42:59 -0700 | [diff] [blame] | 292 | } |
Joe Onorato | 9305647 | 2010-09-10 10:30:46 -0400 | [diff] [blame] | 293 | break; |
Daniel Sandler | 60ee256 | 2011-07-22 12:34:33 -0400 | [diff] [blame] | 294 | case MSG_SET_SYSTEMUI_VISIBILITY: |
Dianne Hackborn | 3a3a6cf | 2012-03-26 10:24:04 -0700 | [diff] [blame] | 295 | mCallbacks.setSystemUiVisibility(msg.arg1, msg.arg2); |
Joe Onorato | 9305647 | 2010-09-10 10:30:46 -0400 | [diff] [blame] | 296 | break; |
Dianne Hackborn | 7d04932 | 2011-06-14 15:00:32 -0700 | [diff] [blame] | 297 | case MSG_TOP_APP_WINDOW_CHANGED: |
| 298 | mCallbacks.topAppWindowChanged(msg.arg1 != 0); |
Daniel Sandler | e02d808 | 2010-10-08 15:13:22 -0400 | [diff] [blame] | 299 | break; |
satok | 06487a5 | 2010-10-29 11:37:18 +0900 | [diff] [blame] | 300 | case MSG_SHOW_IME_BUTTON: |
Joe Onorato | 857fd9b | 2011-01-27 15:08:35 -0800 | [diff] [blame] | 301 | mCallbacks.setImeWindowStatus((IBinder)msg.obj, msg.arg1, msg.arg2); |
satok | 06487a5 | 2010-10-29 11:37:18 +0900 | [diff] [blame] | 302 | break; |
Jeff Brown | 2992ea7 | 2011-01-28 22:04:14 -0800 | [diff] [blame] | 303 | case MSG_SET_HARD_KEYBOARD_STATUS: |
| 304 | mCallbacks.setHardKeyboardStatus(msg.arg1 != 0, msg.arg2 != 0); |
| 305 | break; |
Michael Jurka | 3b1fc47 | 2011-06-13 10:54:40 -0700 | [diff] [blame] | 306 | case MSG_TOGGLE_RECENT_APPS: |
| 307 | mCallbacks.toggleRecentApps(); |
| 308 | break; |
Michael Jurka | 7f2668c | 2012-03-27 07:49:52 -0700 | [diff] [blame] | 309 | case MSG_PRELOAD_RECENT_APPS: |
| 310 | mCallbacks.preloadRecentApps(); |
| 311 | break; |
| 312 | case MSG_CANCEL_PRELOAD_RECENT_APPS: |
| 313 | mCallbacks.cancelPreloadRecentApps(); |
| 314 | break; |
Daniel Sandler | 328310c | 2011-09-23 15:56:52 -0400 | [diff] [blame] | 315 | case MSG_SET_NAVIGATION_ICON_HINTS: |
| 316 | mCallbacks.setNavigationIconHints(msg.arg1); |
| 317 | break; |
Joe Onorato | 0cbda99 | 2010-05-02 16:28:15 -0700 | [diff] [blame] | 318 | } |
| 319 | } |
| 320 | } |
| 321 | } |
| 322 | |