Christopher Tate | acad183 | 2012-02-17 16:01:27 -0800 | [diff] [blame] | 1 | /* |
| 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 | |
| 17 | package com.android.systemui.statusbar.tv; |
| 18 | |
Jason Monk | 7e53f20 | 2016-01-28 10:40:20 -0500 | [diff] [blame] | 19 | import android.content.ComponentName; |
Jorim Jaggi | 8690558 | 2016-02-09 21:36:09 -0800 | [diff] [blame] | 20 | import android.graphics.Rect; |
Christopher Tate | acad183 | 2012-02-17 16:01:27 -0800 | [diff] [blame] | 21 | import android.os.IBinder; |
Christoph Studer | d0694b6 | 2014-06-04 16:36:01 +0200 | [diff] [blame] | 22 | import android.service.notification.NotificationListenerService.RankingMap; |
John Spurlock | de84f0e | 2013-06-12 12:41:00 -0400 | [diff] [blame] | 23 | import android.service.notification.StatusBarNotification; |
Christopher Tate | acad183 | 2012-02-17 16:01:27 -0800 | [diff] [blame] | 24 | import android.view.View; |
Christopher Tate | acad183 | 2012-02-17 16:01:27 -0800 | [diff] [blame] | 25 | |
John Spurlock | de84f0e | 2013-06-12 12:41:00 -0400 | [diff] [blame] | 26 | import com.android.internal.statusbar.StatusBarIcon; |
Selim Cinek | a32ab60 | 2014-06-11 15:06:01 +0200 | [diff] [blame] | 27 | import com.android.systemui.statusbar.ActivatableNotificationView; |
John Spurlock | de84f0e | 2013-06-12 12:41:00 -0400 | [diff] [blame] | 28 | import com.android.systemui.statusbar.BaseStatusBar; |
Selim Cinek | 379ff8f | 2015-02-20 17:03:16 +0100 | [diff] [blame] | 29 | import com.android.systemui.statusbar.NotificationData; |
Winson | bf8c2c0 | 2016-10-18 18:56:24 -0700 | [diff] [blame] | 30 | import com.android.systemui.pip.tv.PipManager; |
John Spurlock | de84f0e | 2013-06-12 12:41:00 -0400 | [diff] [blame] | 31 | |
Sid Soundararajan | 67ed54a | 2016-03-30 11:17:23 -0700 | [diff] [blame] | 32 | /** |
Christopher Tate | acad183 | 2012-02-17 16:01:27 -0800 | [diff] [blame] | 33 | * Status bar implementation for "large screen" products that mostly present no on-screen nav |
| 34 | */ |
| 35 | |
| 36 | public class TvStatusBar extends BaseStatusBar { |
Christopher Tate | acad183 | 2012-02-17 16:01:27 -0800 | [diff] [blame] | 37 | |
| 38 | @Override |
Jason Monk | 07473ce | 2016-01-05 14:59:19 -0500 | [diff] [blame] | 39 | public void setIcon(String slot, StatusBarIcon icon) { |
Christopher Tate | acad183 | 2012-02-17 16:01:27 -0800 | [diff] [blame] | 40 | } |
| 41 | |
| 42 | @Override |
Jason Monk | 07473ce | 2016-01-05 14:59:19 -0500 | [diff] [blame] | 43 | public void removeIcon(String slot) { |
Christopher Tate | acad183 | 2012-02-17 16:01:27 -0800 | [diff] [blame] | 44 | } |
| 45 | |
| 46 | @Override |
Selim Cinek | 379ff8f | 2015-02-20 17:03:16 +0100 | [diff] [blame] | 47 | public void addNotification(StatusBarNotification notification, RankingMap ranking, |
| 48 | NotificationData.Entry entry) { |
Christopher Tate | acad183 | 2012-02-17 16:01:27 -0800 | [diff] [blame] | 49 | } |
| 50 | |
| 51 | @Override |
Christoph Studer | e71fefc | 2014-06-24 16:16:49 +0200 | [diff] [blame] | 52 | protected void updateNotificationRanking(RankingMap ranking) { |
Christoph Studer | 60748e7 | 2014-05-22 16:51:41 +0200 | [diff] [blame] | 53 | } |
| 54 | |
| 55 | @Override |
Christoph Studer | e71fefc | 2014-06-24 16:16:49 +0200 | [diff] [blame] | 56 | public void removeNotification(String key, RankingMap ranking) { |
Christopher Tate | acad183 | 2012-02-17 16:01:27 -0800 | [diff] [blame] | 57 | } |
| 58 | |
| 59 | @Override |
Benjamin Franz | cde0a2a | 2015-04-23 17:19:48 +0100 | [diff] [blame] | 60 | public void disable(int state1, int state2, boolean animate) { |
Christopher Tate | acad183 | 2012-02-17 16:01:27 -0800 | [diff] [blame] | 61 | } |
| 62 | |
| 63 | @Override |
Daniel Sandler | 11cf178 | 2012-09-27 14:03:08 -0400 | [diff] [blame] | 64 | public void animateExpandNotificationsPanel() { |
Christopher Tate | acad183 | 2012-02-17 16:01:27 -0800 | [diff] [blame] | 65 | } |
| 66 | |
| 67 | @Override |
Daniel Sandler | 11cf178 | 2012-09-27 14:03:08 -0400 | [diff] [blame] | 68 | public void animateCollapsePanels(int flags) { |
Christopher Tate | acad183 | 2012-02-17 16:01:27 -0800 | [diff] [blame] | 69 | } |
| 70 | |
| 71 | @Override |
Jorim Jaggi | 8690558 | 2016-02-09 21:36:09 -0800 | [diff] [blame] | 72 | public void setSystemUiVisibility(int vis, int fullscreenStackVis, int dockedStackVis, |
| 73 | int mask, Rect fullscreenStackBounds, Rect dockedStackBounds) { |
Christopher Tate | acad183 | 2012-02-17 16:01:27 -0800 | [diff] [blame] | 74 | } |
| 75 | |
| 76 | @Override |
| 77 | public void topAppWindowChanged(boolean visible) { |
| 78 | } |
| 79 | |
| 80 | @Override |
Jason Monk | b605fec | 2014-05-02 17:04:10 -0400 | [diff] [blame] | 81 | public void setImeWindowStatus(IBinder token, int vis, int backDisposition, |
| 82 | boolean showImeSwitcher) { |
Christopher Tate | acad183 | 2012-02-17 16:01:27 -0800 | [diff] [blame] | 83 | } |
| 84 | |
Christopher Tate | acad183 | 2012-02-17 16:01:27 -0800 | [diff] [blame] | 85 | @Override // CommandQueue |
John Spurlock | 9764218 | 2013-07-29 17:58:39 -0400 | [diff] [blame] | 86 | public void setWindowState(int window, int state) { |
| 87 | } |
| 88 | |
John Spurlock | cad5768 | 2014-07-26 17:09:56 -0400 | [diff] [blame] | 89 | @Override // CommandQueue |
| 90 | public void buzzBeepBlinked() { |
| 91 | } |
| 92 | |
John Spurlock | cb566aa | 2014-08-03 22:58:28 -0400 | [diff] [blame] | 93 | @Override // CommandQueue |
| 94 | public void notificationLightOff() { |
| 95 | } |
| 96 | |
| 97 | @Override // CommandQueue |
| 98 | public void notificationLightPulse(int argb, int onMillis, int offMillis) { |
| 99 | } |
| 100 | |
Christopher Tate | acad183 | 2012-02-17 16:01:27 -0800 | [diff] [blame] | 101 | @Override |
Christopher Tate | acad183 | 2012-02-17 16:01:27 -0800 | [diff] [blame] | 102 | protected void setAreThereNotifications() { |
| 103 | } |
| 104 | |
| 105 | @Override |
Christoph Studer | 37fe693 | 2014-05-26 13:10:30 +0200 | [diff] [blame] | 106 | protected void updateNotifications() { |
Christopher Tate | acad183 | 2012-02-17 16:01:27 -0800 | [diff] [blame] | 107 | } |
| 108 | |
Michael Jurka | cb2522c | 2012-04-13 09:32:47 -0700 | [diff] [blame] | 109 | public View getStatusBarView() { |
| 110 | return null; |
| 111 | } |
| 112 | |
Svetoslav Ganov | e20a177 | 2012-09-25 16:07:46 -0700 | [diff] [blame] | 113 | @Override |
Matthew Ng | 8d37288 | 2016-12-20 11:06:49 -0800 | [diff] [blame] | 114 | protected boolean toggleSplitScreenMode(int metricsDockAction, int metricsUndockAction) { |
| 115 | return false; |
Phil Weaver | 315c34e | 2016-02-19 15:12:29 -0800 | [diff] [blame] | 116 | } |
| 117 | |
| 118 | @Override |
Selim Cinek | 684a442 | 2015-04-15 16:18:39 -0700 | [diff] [blame] | 119 | public void maybeEscalateHeadsUp() { |
Chris Wren | a4ef620 | 2014-06-09 18:07:30 -0400 | [diff] [blame] | 120 | } |
| 121 | |
| 122 | @Override |
Yorke Lee | e4ea6ab | 2016-03-03 14:51:49 -0800 | [diff] [blame] | 123 | public boolean isPanelFullyCollapsed() { |
Chris Wren | 1689594 | 2015-06-23 11:22:20 -0400 | [diff] [blame] | 124 | return false; |
| 125 | } |
| 126 | |
| 127 | @Override |
Selim Cinek | 5f71bee | 2015-11-18 10:25:23 -0800 | [diff] [blame] | 128 | protected int getMaxKeyguardNotifications(boolean recompute) { |
Jorim Jaggi | d4a5744 | 2014-04-10 02:45:55 +0200 | [diff] [blame] | 129 | return 0; |
| 130 | } |
| 131 | |
| 132 | @Override |
Jason Monk | a992732 | 2015-12-13 16:22:37 -0500 | [diff] [blame] | 133 | public void animateExpandSettingsPanel(String subPanel) { |
Christopher Tate | acad183 | 2012-02-17 16:01:27 -0800 | [diff] [blame] | 134 | } |
Fabrice Di Meglio | 8afcd14 | 2012-07-27 18:27:11 -0700 | [diff] [blame] | 135 | |
| 136 | @Override |
Jorim Jaggi | 5cf1787 | 2014-03-26 18:31:48 +0100 | [diff] [blame] | 137 | protected void createAndAddWindows() { |
| 138 | } |
| 139 | |
| 140 | @Override |
Selim Cinek | a32ab60 | 2014-06-11 15:06:01 +0200 | [diff] [blame] | 141 | public void onActivated(ActivatableNotificationView view) { |
Jorim Jaggi | d552d9d | 2014-05-07 19:41:13 +0200 | [diff] [blame] | 142 | } |
| 143 | |
| 144 | @Override |
Selim Cinek | a32ab60 | 2014-06-11 15:06:01 +0200 | [diff] [blame] | 145 | public void onActivationReset(ActivatableNotificationView view) { |
Jorim Jaggi | d552d9d | 2014-05-07 19:41:13 +0200 | [diff] [blame] | 146 | } |
Jason Monk | 5565cb4 | 2014-09-12 10:59:21 -0400 | [diff] [blame] | 147 | |
| 148 | @Override |
Andrii Kulian | 0f051f5 | 2016-04-14 00:41:51 -0700 | [diff] [blame] | 149 | public void showScreenPinningRequest(int taskId) { |
Jason Monk | 5565cb4 | 2014-09-12 10:59:21 -0400 | [diff] [blame] | 150 | } |
Jorim Jaggi | 24bec7c | 2015-02-04 12:40:14 +0100 | [diff] [blame] | 151 | |
| 152 | @Override |
| 153 | public void appTransitionPending() { |
| 154 | } |
| 155 | |
| 156 | @Override |
| 157 | public void appTransitionCancelled() { |
| 158 | } |
| 159 | |
| 160 | @Override |
| 161 | public void appTransitionStarting(long startTime, long duration) { |
| 162 | } |
Selim Cinek | 29fa89b | 2015-04-17 10:39:11 -0700 | [diff] [blame] | 163 | |
| 164 | @Override |
Jorim Jaggi | 2adba07 | 2016-03-03 13:43:39 +0100 | [diff] [blame] | 165 | public void appTransitionFinished() { |
| 166 | } |
| 167 | |
| 168 | @Override |
Jorim Jaggi | 40aa881 | 2015-09-23 12:59:22 -0700 | [diff] [blame] | 169 | public void onCameraLaunchGestureDetected(int source) { |
Selim Cinek | 372d1bd | 2015-08-14 13:19:37 -0700 | [diff] [blame] | 170 | } |
| 171 | |
| 172 | @Override |
Jaewan Kim | f0fd218 | 2016-04-20 21:17:58 +0900 | [diff] [blame] | 173 | public void showTvPictureInPictureMenu() { |
| 174 | PipManager.getInstance().showTvPictureInPictureMenu(); |
Jaewan Kim | c552b04 | 2016-01-18 16:08:45 +0900 | [diff] [blame] | 175 | } |
| 176 | |
| 177 | @Override |
Chris Wren | bdf3376 | 2015-12-04 15:50:51 -0500 | [diff] [blame] | 178 | protected void updateHeadsUp(String key, NotificationData.Entry entry, boolean shouldPeek, |
Selim Cinek | 29fa89b | 2015-04-17 10:39:11 -0700 | [diff] [blame] | 179 | boolean alertAgain) { |
| 180 | } |
| 181 | |
| 182 | @Override |
| 183 | protected void setHeadsUpUser(int newUserId) { |
| 184 | } |
| 185 | |
| 186 | protected boolean isSnoozedPackage(StatusBarNotification sbn) { |
| 187 | return false; |
| 188 | } |
Jason Monk | 7e53f20 | 2016-01-28 10:40:20 -0500 | [diff] [blame] | 189 | |
| 190 | @Override |
| 191 | public void addQsTile(ComponentName tile) { |
| 192 | } |
| 193 | |
| 194 | @Override |
| 195 | public void remQsTile(ComponentName tile) { |
| 196 | } |
| 197 | |
| 198 | @Override |
| 199 | public void clickTile(ComponentName tile) { |
| 200 | } |
Sid Soundararajan | 67ed54a | 2016-03-30 11:17:23 -0700 | [diff] [blame] | 201 | |
| 202 | @Override |
| 203 | public void start() { |
| 204 | super.start(); |
| 205 | putComponent(TvStatusBar.class, this); |
| 206 | } |
| 207 | |
Jim Miller | 07e0384 | 2016-06-22 15:18:13 -0700 | [diff] [blame] | 208 | @Override |
| 209 | public void handleSystemNavigationKey(int arg1) { |
| 210 | // Not implemented |
| 211 | } |
Christopher Tate | acad183 | 2012-02-17 16:01:27 -0800 | [diff] [blame] | 212 | } |