blob: 450001f3ab33afe108ec99e4309b12c3c8bb2a34 [file] [log] [blame]
Christopher Tateacad1832012-02-17 16:01:27 -08001/*
2 * Copyright (C) 2012 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
17package com.android.systemui.statusbar.tv;
18
Jason Monk7e53f202016-01-28 10:40:20 -050019import android.content.ComponentName;
Jorim Jaggi86905582016-02-09 21:36:09 -080020import android.graphics.Rect;
Christopher Tateacad1832012-02-17 16:01:27 -080021import android.os.IBinder;
Sid Soundararajan67ed54a2016-03-30 11:17:23 -070022import android.os.RemoteException;
Christoph Studerd0694b62014-06-04 16:36:01 +020023import android.service.notification.NotificationListenerService.RankingMap;
John Spurlockde84f0e2013-06-12 12:41:00 -040024import android.service.notification.StatusBarNotification;
Christopher Tateacad1832012-02-17 16:01:27 -080025import android.view.View;
Christopher Tateacad1832012-02-17 16:01:27 -080026
John Spurlockde84f0e2013-06-12 12:41:00 -040027import com.android.internal.statusbar.StatusBarIcon;
Selim Cineka32ab602014-06-11 15:06:01 +020028import com.android.systemui.statusbar.ActivatableNotificationView;
John Spurlockde84f0e2013-06-12 12:41:00 -040029import com.android.systemui.statusbar.BaseStatusBar;
Selim Cinek379ff8f2015-02-20 17:03:16 +010030import com.android.systemui.statusbar.NotificationData;
Jaewan Kimc552b042016-01-18 16:08:45 +090031import com.android.systemui.tv.pip.PipManager;
John Spurlockde84f0e2013-06-12 12:41:00 -040032
Sid Soundararajan67ed54a2016-03-30 11:17:23 -070033/**
Christopher Tateacad1832012-02-17 16:01:27 -080034 * Status bar implementation for "large screen" products that mostly present no on-screen nav
35 */
36
37public class TvStatusBar extends BaseStatusBar {
Christopher Tateacad1832012-02-17 16:01:27 -080038
Sid Soundararajan67ed54a2016-03-30 11:17:23 -070039 /**
40 * Tracking calls to View.setSystemUiVisibility().
41 */
42 int mSystemUiVisibility = View.SYSTEM_UI_FLAG_VISIBLE;
43
44 /**
45 * Last value sent to window manager.
46 */
47 private int mLastDispatchedSystemUiVisibility = ~View.SYSTEM_UI_FLAG_VISIBLE;
48
Christopher Tateacad1832012-02-17 16:01:27 -080049 @Override
Jason Monk07473ce2016-01-05 14:59:19 -050050 public void setIcon(String slot, StatusBarIcon icon) {
Christopher Tateacad1832012-02-17 16:01:27 -080051 }
52
53 @Override
Jason Monk07473ce2016-01-05 14:59:19 -050054 public void removeIcon(String slot) {
Christopher Tateacad1832012-02-17 16:01:27 -080055 }
56
57 @Override
Selim Cinek379ff8f2015-02-20 17:03:16 +010058 public void addNotification(StatusBarNotification notification, RankingMap ranking,
59 NotificationData.Entry entry) {
Christopher Tateacad1832012-02-17 16:01:27 -080060 }
61
62 @Override
Christoph Studere71fefc2014-06-24 16:16:49 +020063 protected void updateNotificationRanking(RankingMap ranking) {
Christoph Studer60748e72014-05-22 16:51:41 +020064 }
65
66 @Override
Christoph Studere71fefc2014-06-24 16:16:49 +020067 public void removeNotification(String key, RankingMap ranking) {
Christopher Tateacad1832012-02-17 16:01:27 -080068 }
69
70 @Override
Benjamin Franzcde0a2a2015-04-23 17:19:48 +010071 public void disable(int state1, int state2, boolean animate) {
Christopher Tateacad1832012-02-17 16:01:27 -080072 }
73
74 @Override
Daniel Sandler11cf1782012-09-27 14:03:08 -040075 public void animateExpandNotificationsPanel() {
Christopher Tateacad1832012-02-17 16:01:27 -080076 }
77
78 @Override
Daniel Sandler11cf1782012-09-27 14:03:08 -040079 public void animateCollapsePanels(int flags) {
Christopher Tateacad1832012-02-17 16:01:27 -080080 }
81
82 @Override
Jorim Jaggi86905582016-02-09 21:36:09 -080083 public void setSystemUiVisibility(int vis, int fullscreenStackVis, int dockedStackVis,
84 int mask, Rect fullscreenStackBounds, Rect dockedStackBounds) {
Christopher Tateacad1832012-02-17 16:01:27 -080085 }
86
87 @Override
88 public void topAppWindowChanged(boolean visible) {
89 }
90
91 @Override
Jason Monkb605fec2014-05-02 17:04:10 -040092 public void setImeWindowStatus(IBinder token, int vis, int backDisposition,
93 boolean showImeSwitcher) {
Christopher Tateacad1832012-02-17 16:01:27 -080094 }
95
Christopher Tateacad1832012-02-17 16:01:27 -080096 @Override // CommandQueue
John Spurlock97642182013-07-29 17:58:39 -040097 public void setWindowState(int window, int state) {
98 }
99
John Spurlockcad57682014-07-26 17:09:56 -0400100 @Override // CommandQueue
101 public void buzzBeepBlinked() {
102 }
103
John Spurlockcb566aa2014-08-03 22:58:28 -0400104 @Override // CommandQueue
105 public void notificationLightOff() {
106 }
107
108 @Override // CommandQueue
109 public void notificationLightPulse(int argb, int onMillis, int offMillis) {
110 }
111
Christopher Tateacad1832012-02-17 16:01:27 -0800112 @Override
Christopher Tateacad1832012-02-17 16:01:27 -0800113 protected void setAreThereNotifications() {
114 }
115
116 @Override
Christoph Studer37fe6932014-05-26 13:10:30 +0200117 protected void updateNotifications() {
Christopher Tateacad1832012-02-17 16:01:27 -0800118 }
119
120 @Override
Jorim Jaggi2fdeeab2015-04-01 15:13:03 -0700121 public boolean shouldDisableNavbarGestures() {
Christopher Tateacad1832012-02-17 16:01:27 -0800122 return true;
123 }
124
Michael Jurkacb2522c2012-04-13 09:32:47 -0700125 public View getStatusBarView() {
126 return null;
127 }
128
Svetoslav Ganove20a1772012-09-25 16:07:46 -0700129 @Override
Phil Weaver315c34e2016-02-19 15:12:29 -0800130 protected boolean toggleSplitScreenMode() {
131 return false;
132 }
133
134 @Override
Selim Cinek684a4422015-04-15 16:18:39 -0700135 public void maybeEscalateHeadsUp() {
Chris Wrena4ef6202014-06-09 18:07:30 -0400136 }
137
138 @Override
Yorke Leee4ea6ab2016-03-03 14:51:49 -0800139 public boolean isPanelFullyCollapsed() {
Chris Wren16895942015-06-23 11:22:20 -0400140 return false;
141 }
142
143 @Override
Selim Cinek5f71bee2015-11-18 10:25:23 -0800144 protected int getMaxKeyguardNotifications(boolean recompute) {
Jorim Jaggid4a57442014-04-10 02:45:55 +0200145 return 0;
146 }
147
148 @Override
Jason Monka9927322015-12-13 16:22:37 -0500149 public void animateExpandSettingsPanel(String subPanel) {
Christopher Tateacad1832012-02-17 16:01:27 -0800150 }
Fabrice Di Meglio8afcd142012-07-27 18:27:11 -0700151
152 @Override
Jorim Jaggi5cf17872014-03-26 18:31:48 +0100153 protected void createAndAddWindows() {
154 }
155
156 @Override
Fabrice Di Meglio8afcd142012-07-27 18:27:11 -0700157 protected void refreshLayout(int layoutDirection) {
158 }
159
Jorim Jaggid552d9d2014-05-07 19:41:13 +0200160 @Override
Selim Cineka32ab602014-06-11 15:06:01 +0200161 public void onActivated(ActivatableNotificationView view) {
Jorim Jaggid552d9d2014-05-07 19:41:13 +0200162 }
163
164 @Override
Selim Cineka32ab602014-06-11 15:06:01 +0200165 public void onActivationReset(ActivatableNotificationView view) {
Jorim Jaggid552d9d2014-05-07 19:41:13 +0200166 }
Jason Monk5565cb42014-09-12 10:59:21 -0400167
168 @Override
169 public void showScreenPinningRequest() {
170 }
Jorim Jaggi24bec7c2015-02-04 12:40:14 +0100171
172 @Override
173 public void appTransitionPending() {
174 }
175
176 @Override
177 public void appTransitionCancelled() {
178 }
179
180 @Override
181 public void appTransitionStarting(long startTime, long duration) {
182 }
Selim Cinek29fa89b2015-04-17 10:39:11 -0700183
184 @Override
Jorim Jaggi2adba072016-03-03 13:43:39 +0100185 public void appTransitionFinished() {
186 }
187
188 @Override
Jorim Jaggi40aa8812015-09-23 12:59:22 -0700189 public void onCameraLaunchGestureDetected(int source) {
Selim Cinek372d1bd2015-08-14 13:19:37 -0700190 }
191
192 @Override
Jaewan Kimc552b042016-01-18 16:08:45 +0900193 public void requestTvPictureInPicture() {
194 PipManager.getInstance().requestTvPictureInPicture();
195 }
196
197 @Override
Chris Wrenbdf33762015-12-04 15:50:51 -0500198 protected void updateHeadsUp(String key, NotificationData.Entry entry, boolean shouldPeek,
Selim Cinek29fa89b2015-04-17 10:39:11 -0700199 boolean alertAgain) {
200 }
201
202 @Override
203 protected void setHeadsUpUser(int newUserId) {
204 }
205
206 protected boolean isSnoozedPackage(StatusBarNotification sbn) {
207 return false;
208 }
Jason Monk7e53f202016-01-28 10:40:20 -0500209
210 @Override
211 public void addQsTile(ComponentName tile) {
212 }
213
214 @Override
215 public void remQsTile(ComponentName tile) {
216 }
217
218 @Override
219 public void clickTile(ComponentName tile) {
220 }
Sid Soundararajan67ed54a2016-03-30 11:17:23 -0700221
222 @Override
223 public void start() {
224 super.start();
225 putComponent(TvStatusBar.class, this);
226 }
227
228 public void updateRecentsVisibility(boolean visible) {
229 // Update the recents visibility flag
230 if (visible) {
231 mSystemUiVisibility |= View.RECENT_APPS_VISIBLE;
232 } else {
233 mSystemUiVisibility &= ~View.RECENT_APPS_VISIBLE;
234 }
235 notifyUiVisibilityChanged(mSystemUiVisibility);
236 }
237
238 private void notifyUiVisibilityChanged(int vis) {
239 try {
240 if (mLastDispatchedSystemUiVisibility != vis) {
241 mWindowManagerService.statusBarVisibilityChanged(vis);
242 mLastDispatchedSystemUiVisibility = vis;
243 }
244 } catch (RemoteException ex) {
245 }
246 }
Christopher Tateacad1832012-02-17 16:01:27 -0800247}