Joe Onorato | fd52b18 | 2010-11-10 18:00:52 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2008 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.policy; |
| 18 | |
| 19 | import com.android.systemui.R; |
Jason Monk | da68f59 | 2015-01-07 10:55:58 -0500 | [diff] [blame] | 20 | import com.android.systemui.statusbar.policy.MobileSignalController.MobileIconGroup; |
Joe Onorato | fd52b18 | 2010-11-10 18:00:52 -0800 | [diff] [blame] | 21 | |
Pengquan Meng | a62d32b | 2018-12-06 17:38:38 -0800 | [diff] [blame] | 22 | import java.util.HashMap; |
| 23 | import java.util.Map; |
| 24 | |
Joe Onorato | fd52b18 | 2010-11-10 18:00:52 -0800 | [diff] [blame] | 25 | class TelephonyIcons { |
Joe Onorato | fd52b18 | 2010-11-10 18:00:52 -0800 | [diff] [blame] | 26 | //***** Data connection icons |
Jorim Jaggi | c737b9b | 2014-09-08 23:57:20 +0200 | [diff] [blame] | 27 | static final int FLIGHT_MODE_ICON = R.drawable.stat_sys_airplane_mode; |
Jason Monk | 48edc0c | 2017-04-10 15:01:27 -0400 | [diff] [blame] | 28 | |
Amin Shaikh | d64e626 | 2018-03-08 10:08:13 -0500 | [diff] [blame] | 29 | static final int ICON_LTE = R.drawable.ic_lte_mobiledata; |
| 30 | static final int ICON_LTE_PLUS = R.drawable.ic_lte_plus_mobiledata; |
| 31 | static final int ICON_G = R.drawable.ic_g_mobiledata; |
| 32 | static final int ICON_E = R.drawable.ic_e_mobiledata; |
| 33 | static final int ICON_H = R.drawable.ic_h_mobiledata; |
Amin Shaikh | d64e626 | 2018-03-08 10:08:13 -0500 | [diff] [blame] | 34 | static final int ICON_H_PLUS = R.drawable.ic_h_plus_mobiledata; |
| 35 | static final int ICON_3G = R.drawable.ic_3g_mobiledata; |
| 36 | static final int ICON_4G = R.drawable.ic_4g_mobiledata; |
| 37 | static final int ICON_4G_PLUS = R.drawable.ic_4g_plus_mobiledata; |
SongFerngWang | 3cbcf75 | 2019-03-21 23:14:20 +0800 | [diff] [blame] | 38 | static final int ICON_5G_E = R.drawable.ic_5g_e_mobiledata; |
Amin Shaikh | d64e626 | 2018-03-08 10:08:13 -0500 | [diff] [blame] | 39 | static final int ICON_1X = R.drawable.ic_1x_mobiledata; |
Pengquan Meng | a62d32b | 2018-12-06 17:38:38 -0800 | [diff] [blame] | 40 | static final int ICON_5G = R.drawable.ic_5g_mobiledata; |
| 41 | static final int ICON_5G_PLUS = R.drawable.ic_5g_plus_mobiledata; |
Jorim Jaggi | c737b9b | 2014-09-08 23:57:20 +0200 | [diff] [blame] | 42 | |
Andrew Flynn | a478d70 | 2015-04-14 23:33:45 -0400 | [diff] [blame] | 43 | static final MobileIconGroup CARRIER_NETWORK_CHANGE = new MobileIconGroup( |
| 44 | "CARRIER_NETWORK_CHANGE", |
Jason Monk | 48edc0c | 2017-04-10 15:01:27 -0400 | [diff] [blame] | 45 | null, |
| 46 | null, |
Andrew Flynn | a478d70 | 2015-04-14 23:33:45 -0400 | [diff] [blame] | 47 | AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH, |
| 48 | 0, 0, |
Jason Monk | 48edc0c | 2017-04-10 15:01:27 -0400 | [diff] [blame] | 49 | 0, |
| 50 | 0, |
Andrew Flynn | a478d70 | 2015-04-14 23:33:45 -0400 | [diff] [blame] | 51 | AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[0], |
Amin Shaikh | 43ad7fe | 2018-03-05 14:34:44 -0500 | [diff] [blame] | 52 | R.string.carrier_network_change_mode, |
Andrew Flynn | a478d70 | 2015-04-14 23:33:45 -0400 | [diff] [blame] | 53 | 0, |
Amin Shaikh | d64e626 | 2018-03-08 10:08:13 -0500 | [diff] [blame] | 54 | false); |
Jason Monk | d2263cd | 2014-11-10 14:22:56 -0500 | [diff] [blame] | 55 | |
| 56 | static final MobileIconGroup THREE_G = new MobileIconGroup( |
| 57 | "3G", |
Jason Monk | 48edc0c | 2017-04-10 15:01:27 -0400 | [diff] [blame] | 58 | null, |
| 59 | null, |
Jason Monk | d2263cd | 2014-11-10 14:22:56 -0500 | [diff] [blame] | 60 | AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH, |
| 61 | 0, 0, |
Jason Monk | 48edc0c | 2017-04-10 15:01:27 -0400 | [diff] [blame] | 62 | 0, |
| 63 | 0, |
Jason Monk | d2263cd | 2014-11-10 14:22:56 -0500 | [diff] [blame] | 64 | AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[0], |
Amin Shaikh | 43ad7fe | 2018-03-05 14:34:44 -0500 | [diff] [blame] | 65 | R.string.data_connection_3g, |
Jason Monk | d2263cd | 2014-11-10 14:22:56 -0500 | [diff] [blame] | 66 | TelephonyIcons.ICON_3G, |
Amin Shaikh | d64e626 | 2018-03-08 10:08:13 -0500 | [diff] [blame] | 67 | true); |
Jason Monk | d2263cd | 2014-11-10 14:22:56 -0500 | [diff] [blame] | 68 | |
Jason Monk | 7150d7f | 2015-07-09 10:14:12 -0400 | [diff] [blame] | 69 | static final MobileIconGroup WFC = new MobileIconGroup( |
| 70 | "WFC", |
Jason Monk | 48edc0c | 2017-04-10 15:01:27 -0400 | [diff] [blame] | 71 | null, |
| 72 | null, |
Jason Monk | 7150d7f | 2015-07-09 10:14:12 -0400 | [diff] [blame] | 73 | AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH, |
| 74 | 0, 0, |
Jason Monk | 48edc0c | 2017-04-10 15:01:27 -0400 | [diff] [blame] | 75 | 0, |
| 76 | 0, |
Jason Monk | 7150d7f | 2015-07-09 10:14:12 -0400 | [diff] [blame] | 77 | AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[0], |
Amin Shaikh | d64e626 | 2018-03-08 10:08:13 -0500 | [diff] [blame] | 78 | 0, 0, false); |
Jason Monk | 7150d7f | 2015-07-09 10:14:12 -0400 | [diff] [blame] | 79 | |
Jason Monk | d2263cd | 2014-11-10 14:22:56 -0500 | [diff] [blame] | 80 | static final MobileIconGroup UNKNOWN = new MobileIconGroup( |
| 81 | "Unknown", |
Jason Monk | 48edc0c | 2017-04-10 15:01:27 -0400 | [diff] [blame] | 82 | null, |
| 83 | null, |
Jason Monk | d2263cd | 2014-11-10 14:22:56 -0500 | [diff] [blame] | 84 | AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH, |
| 85 | 0, 0, |
Jason Monk | 48edc0c | 2017-04-10 15:01:27 -0400 | [diff] [blame] | 86 | 0, |
| 87 | 0, |
Jason Monk | d2263cd | 2014-11-10 14:22:56 -0500 | [diff] [blame] | 88 | AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[0], |
Amin Shaikh | d64e626 | 2018-03-08 10:08:13 -0500 | [diff] [blame] | 89 | 0, 0, false); |
Jason Monk | d2263cd | 2014-11-10 14:22:56 -0500 | [diff] [blame] | 90 | |
| 91 | static final MobileIconGroup E = new MobileIconGroup( |
| 92 | "E", |
Jason Monk | 48edc0c | 2017-04-10 15:01:27 -0400 | [diff] [blame] | 93 | null, |
| 94 | null, |
Jason Monk | d2263cd | 2014-11-10 14:22:56 -0500 | [diff] [blame] | 95 | AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH, |
| 96 | 0, 0, |
Jason Monk | 48edc0c | 2017-04-10 15:01:27 -0400 | [diff] [blame] | 97 | 0, |
| 98 | 0, |
Jason Monk | d2263cd | 2014-11-10 14:22:56 -0500 | [diff] [blame] | 99 | AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[0], |
Amin Shaikh | 43ad7fe | 2018-03-05 14:34:44 -0500 | [diff] [blame] | 100 | R.string.data_connection_edge, |
Jason Monk | d2263cd | 2014-11-10 14:22:56 -0500 | [diff] [blame] | 101 | TelephonyIcons.ICON_E, |
Amin Shaikh | d64e626 | 2018-03-08 10:08:13 -0500 | [diff] [blame] | 102 | false); |
Jason Monk | d2263cd | 2014-11-10 14:22:56 -0500 | [diff] [blame] | 103 | |
| 104 | static final MobileIconGroup ONE_X = new MobileIconGroup( |
| 105 | "1X", |
Jason Monk | 48edc0c | 2017-04-10 15:01:27 -0400 | [diff] [blame] | 106 | null, |
| 107 | null, |
Jason Monk | d2263cd | 2014-11-10 14:22:56 -0500 | [diff] [blame] | 108 | AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH, |
| 109 | 0, 0, |
Jason Monk | 48edc0c | 2017-04-10 15:01:27 -0400 | [diff] [blame] | 110 | 0, |
| 111 | 0, |
Jason Monk | d2263cd | 2014-11-10 14:22:56 -0500 | [diff] [blame] | 112 | AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[0], |
Amin Shaikh | 43ad7fe | 2018-03-05 14:34:44 -0500 | [diff] [blame] | 113 | R.string.data_connection_cdma, |
Jason Monk | d2263cd | 2014-11-10 14:22:56 -0500 | [diff] [blame] | 114 | TelephonyIcons.ICON_1X, |
Amin Shaikh | d64e626 | 2018-03-08 10:08:13 -0500 | [diff] [blame] | 115 | true); |
Jason Monk | d2263cd | 2014-11-10 14:22:56 -0500 | [diff] [blame] | 116 | |
| 117 | static final MobileIconGroup G = new MobileIconGroup( |
| 118 | "G", |
Jason Monk | 48edc0c | 2017-04-10 15:01:27 -0400 | [diff] [blame] | 119 | null, |
| 120 | null, |
Jason Monk | d2263cd | 2014-11-10 14:22:56 -0500 | [diff] [blame] | 121 | AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH, |
| 122 | 0, 0, |
Jason Monk | 48edc0c | 2017-04-10 15:01:27 -0400 | [diff] [blame] | 123 | 0, |
| 124 | 0, |
Jason Monk | d2263cd | 2014-11-10 14:22:56 -0500 | [diff] [blame] | 125 | AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[0], |
Amin Shaikh | 43ad7fe | 2018-03-05 14:34:44 -0500 | [diff] [blame] | 126 | R.string.data_connection_gprs, |
Jason Monk | d2263cd | 2014-11-10 14:22:56 -0500 | [diff] [blame] | 127 | TelephonyIcons.ICON_G, |
Amin Shaikh | d64e626 | 2018-03-08 10:08:13 -0500 | [diff] [blame] | 128 | false); |
Jason Monk | d2263cd | 2014-11-10 14:22:56 -0500 | [diff] [blame] | 129 | |
| 130 | static final MobileIconGroup H = new MobileIconGroup( |
| 131 | "H", |
Jason Monk | 48edc0c | 2017-04-10 15:01:27 -0400 | [diff] [blame] | 132 | null, |
| 133 | null, |
Jason Monk | d2263cd | 2014-11-10 14:22:56 -0500 | [diff] [blame] | 134 | AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH, |
| 135 | 0, 0, |
Jason Monk | 48edc0c | 2017-04-10 15:01:27 -0400 | [diff] [blame] | 136 | 0, |
| 137 | 0, |
Jason Monk | d2263cd | 2014-11-10 14:22:56 -0500 | [diff] [blame] | 138 | AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[0], |
Amin Shaikh | 43ad7fe | 2018-03-05 14:34:44 -0500 | [diff] [blame] | 139 | R.string.data_connection_3_5g, |
Jason Monk | d2263cd | 2014-11-10 14:22:56 -0500 | [diff] [blame] | 140 | TelephonyIcons.ICON_H, |
Amin Shaikh | d64e626 | 2018-03-08 10:08:13 -0500 | [diff] [blame] | 141 | false); |
Jason Monk | d2263cd | 2014-11-10 14:22:56 -0500 | [diff] [blame] | 142 | |
Amin Shaikh | f5830ca | 2018-03-09 14:06:50 -0500 | [diff] [blame] | 143 | static final MobileIconGroup H_PLUS = new MobileIconGroup( |
| 144 | "H+", |
| 145 | null, |
| 146 | null, |
| 147 | AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH, |
| 148 | 0, 0, |
| 149 | 0, |
| 150 | 0, |
| 151 | AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[0], |
| 152 | R.string.data_connection_3_5g_plus, |
| 153 | TelephonyIcons.ICON_H_PLUS, |
| 154 | false); |
| 155 | |
Jason Monk | d2263cd | 2014-11-10 14:22:56 -0500 | [diff] [blame] | 156 | static final MobileIconGroup FOUR_G = new MobileIconGroup( |
| 157 | "4G", |
Jason Monk | 48edc0c | 2017-04-10 15:01:27 -0400 | [diff] [blame] | 158 | null, |
| 159 | null, |
Jason Monk | d2263cd | 2014-11-10 14:22:56 -0500 | [diff] [blame] | 160 | AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH, |
| 161 | 0, 0, |
Jason Monk | 48edc0c | 2017-04-10 15:01:27 -0400 | [diff] [blame] | 162 | 0, |
| 163 | 0, |
Jason Monk | d2263cd | 2014-11-10 14:22:56 -0500 | [diff] [blame] | 164 | AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[0], |
Amin Shaikh | 43ad7fe | 2018-03-05 14:34:44 -0500 | [diff] [blame] | 165 | R.string.data_connection_4g, |
Jason Monk | d2263cd | 2014-11-10 14:22:56 -0500 | [diff] [blame] | 166 | TelephonyIcons.ICON_4G, |
Amin Shaikh | d64e626 | 2018-03-08 10:08:13 -0500 | [diff] [blame] | 167 | true); |
Jason Monk | d2263cd | 2014-11-10 14:22:56 -0500 | [diff] [blame] | 168 | |
Ajay Nambi | 7965fa4 | 2015-05-14 18:48:33 -0700 | [diff] [blame] | 169 | static final MobileIconGroup FOUR_G_PLUS = new MobileIconGroup( |
| 170 | "4G+", |
Jason Monk | 48edc0c | 2017-04-10 15:01:27 -0400 | [diff] [blame] | 171 | null, |
| 172 | null, |
Ajay Nambi | 7965fa4 | 2015-05-14 18:48:33 -0700 | [diff] [blame] | 173 | AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH, |
| 174 | 0,0, |
Jason Monk | 48edc0c | 2017-04-10 15:01:27 -0400 | [diff] [blame] | 175 | 0, |
| 176 | 0, |
Ajay Nambi | 7965fa4 | 2015-05-14 18:48:33 -0700 | [diff] [blame] | 177 | AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[0], |
Amin Shaikh | 43ad7fe | 2018-03-05 14:34:44 -0500 | [diff] [blame] | 178 | R.string.data_connection_4g_plus, |
Ajay Nambi | 7965fa4 | 2015-05-14 18:48:33 -0700 | [diff] [blame] | 179 | TelephonyIcons.ICON_4G_PLUS, |
Amin Shaikh | d64e626 | 2018-03-08 10:08:13 -0500 | [diff] [blame] | 180 | true); |
Ajay Nambi | 7965fa4 | 2015-05-14 18:48:33 -0700 | [diff] [blame] | 181 | |
Jason Monk | d2263cd | 2014-11-10 14:22:56 -0500 | [diff] [blame] | 182 | static final MobileIconGroup LTE = new MobileIconGroup( |
| 183 | "LTE", |
Jason Monk | 48edc0c | 2017-04-10 15:01:27 -0400 | [diff] [blame] | 184 | null, |
| 185 | null, |
Jason Monk | d2263cd | 2014-11-10 14:22:56 -0500 | [diff] [blame] | 186 | AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH, |
| 187 | 0, 0, |
Jason Monk | 48edc0c | 2017-04-10 15:01:27 -0400 | [diff] [blame] | 188 | 0, |
| 189 | 0, |
Jason Monk | d2263cd | 2014-11-10 14:22:56 -0500 | [diff] [blame] | 190 | AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[0], |
Amin Shaikh | 43ad7fe | 2018-03-05 14:34:44 -0500 | [diff] [blame] | 191 | R.string.data_connection_lte, |
Jason Monk | d2263cd | 2014-11-10 14:22:56 -0500 | [diff] [blame] | 192 | TelephonyIcons.ICON_LTE, |
Amin Shaikh | d64e626 | 2018-03-08 10:08:13 -0500 | [diff] [blame] | 193 | true); |
Jason Monk | d2263cd | 2014-11-10 14:22:56 -0500 | [diff] [blame] | 194 | |
Jason Monk | aa730be | 2016-07-13 14:22:52 -0400 | [diff] [blame] | 195 | static final MobileIconGroup LTE_PLUS = new MobileIconGroup( |
| 196 | "LTE+", |
Jason Monk | 48edc0c | 2017-04-10 15:01:27 -0400 | [diff] [blame] | 197 | null, |
| 198 | null, |
Jason Monk | aa730be | 2016-07-13 14:22:52 -0400 | [diff] [blame] | 199 | AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH, |
| 200 | 0, 0, |
Jason Monk | 48edc0c | 2017-04-10 15:01:27 -0400 | [diff] [blame] | 201 | 0, |
| 202 | 0, |
Jason Monk | aa730be | 2016-07-13 14:22:52 -0400 | [diff] [blame] | 203 | AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[0], |
Amin Shaikh | 43ad7fe | 2018-03-05 14:34:44 -0500 | [diff] [blame] | 204 | R.string.data_connection_lte_plus, |
Jason Monk | aa730be | 2016-07-13 14:22:52 -0400 | [diff] [blame] | 205 | TelephonyIcons.ICON_LTE_PLUS, |
Amin Shaikh | d64e626 | 2018-03-08 10:08:13 -0500 | [diff] [blame] | 206 | true); |
Jason Monk | 7e6c83c | 2017-04-26 14:35:24 -0400 | [diff] [blame] | 207 | |
SongFerngWang | 3cbcf75 | 2019-03-21 23:14:20 +0800 | [diff] [blame] | 208 | static final MobileIconGroup LTE_CA_5G_E = new MobileIconGroup( |
| 209 | "5Ge", |
| 210 | null, |
| 211 | null, |
| 212 | AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH, |
| 213 | 0, 0, |
| 214 | 0, |
| 215 | 0, |
| 216 | AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[0], |
Evan Laird | 83c87e5 | 2019-09-24 19:14:05 -0400 | [diff] [blame] | 217 | R.string.data_connection_5ge_html, |
SongFerngWang | 3cbcf75 | 2019-03-21 23:14:20 +0800 | [diff] [blame] | 218 | TelephonyIcons.ICON_5G_E, |
| 219 | true); |
| 220 | |
Pengquan Meng | a62d32b | 2018-12-06 17:38:38 -0800 | [diff] [blame] | 221 | static final MobileIconGroup NR_5G = new MobileIconGroup( |
| 222 | "5G", |
| 223 | null, |
| 224 | null, |
| 225 | AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH, |
| 226 | 0, |
| 227 | 0, |
| 228 | 0, |
| 229 | 0, |
| 230 | AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[0], |
| 231 | R.string.data_connection_5g, |
| 232 | TelephonyIcons.ICON_5G, |
| 233 | true); |
| 234 | |
| 235 | static final MobileIconGroup NR_5G_PLUS = new MobileIconGroup( |
| 236 | "5G_PLUS", |
| 237 | null, |
| 238 | null, |
| 239 | AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH, |
| 240 | 0, |
| 241 | 0, |
| 242 | 0, |
| 243 | 0, |
| 244 | AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[0], |
| 245 | R.string.data_connection_5g_plus, |
| 246 | TelephonyIcons.ICON_5G_PLUS, |
| 247 | true); |
| 248 | |
Jason Monk | 7e6c83c | 2017-04-26 14:35:24 -0400 | [diff] [blame] | 249 | static final MobileIconGroup DATA_DISABLED = new MobileIconGroup( |
| 250 | "DataDisabled", |
| 251 | null, |
| 252 | null, |
| 253 | AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH, |
| 254 | 0, 0, |
| 255 | 0, |
| 256 | 0, |
| 257 | AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[0], |
Rohan Shah | 7bc3744 | 2018-04-10 00:34:50 -0400 | [diff] [blame] | 258 | R.string.cell_data_off_content_description, |
Amin Shaikh | af4c193 | 2018-03-08 10:29:56 -0500 | [diff] [blame] | 259 | 0, |
Amin Shaikh | d64e626 | 2018-03-08 10:08:13 -0500 | [diff] [blame] | 260 | false); |
Pengquan Meng | a62d32b | 2018-12-06 17:38:38 -0800 | [diff] [blame] | 261 | |
Fabian Kozynski | c7bc84b | 2019-03-11 13:57:31 -0400 | [diff] [blame] | 262 | static final MobileIconGroup NOT_DEFAULT_DATA = new MobileIconGroup( |
| 263 | "NotDefaultData", |
| 264 | null, |
| 265 | null, |
| 266 | AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH, |
| 267 | 0, 0, |
| 268 | 0, |
| 269 | 0, |
| 270 | AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[0], |
| 271 | R.string.not_default_data_content_description, |
| 272 | 0, |
| 273 | false); |
| 274 | |
| 275 | // When adding a new MobileIconGround, check if the dataContentDescription has to be filtered |
| 276 | // in QSCarrier#hasValidTypeContentDescription |
| 277 | |
Pengquan Meng | a62d32b | 2018-12-06 17:38:38 -0800 | [diff] [blame] | 278 | /** Mapping icon name(lower case) to the icon object. */ |
| 279 | static final Map<String, MobileIconGroup> ICON_NAME_TO_ICON; |
| 280 | static { |
| 281 | ICON_NAME_TO_ICON = new HashMap<>(); |
| 282 | ICON_NAME_TO_ICON.put("carrier_network_change", CARRIER_NETWORK_CHANGE); |
| 283 | ICON_NAME_TO_ICON.put("3g", THREE_G); |
| 284 | ICON_NAME_TO_ICON.put("wfc", WFC); |
| 285 | ICON_NAME_TO_ICON.put("unknown", UNKNOWN); |
| 286 | ICON_NAME_TO_ICON.put("e", E); |
| 287 | ICON_NAME_TO_ICON.put("1x", ONE_X); |
| 288 | ICON_NAME_TO_ICON.put("g", G); |
| 289 | ICON_NAME_TO_ICON.put("h", H); |
| 290 | ICON_NAME_TO_ICON.put("h+", H_PLUS); |
| 291 | ICON_NAME_TO_ICON.put("4g", FOUR_G); |
| 292 | ICON_NAME_TO_ICON.put("4g+", FOUR_G_PLUS); |
SongFerngWang | 3cbcf75 | 2019-03-21 23:14:20 +0800 | [diff] [blame] | 293 | ICON_NAME_TO_ICON.put("5ge", LTE_CA_5G_E); |
Pengquan Meng | a62d32b | 2018-12-06 17:38:38 -0800 | [diff] [blame] | 294 | ICON_NAME_TO_ICON.put("lte", LTE); |
| 295 | ICON_NAME_TO_ICON.put("lte+", LTE_PLUS); |
| 296 | ICON_NAME_TO_ICON.put("5g", NR_5G); |
| 297 | ICON_NAME_TO_ICON.put("5g_plus", NR_5G_PLUS); |
| 298 | ICON_NAME_TO_ICON.put("datadisable", DATA_DISABLED); |
Fabian Kozynski | c7bc84b | 2019-03-11 13:57:31 -0400 | [diff] [blame] | 299 | ICON_NAME_TO_ICON.put("notdefaultdata", NOT_DEFAULT_DATA); |
Pengquan Meng | a62d32b | 2018-12-06 17:38:38 -0800 | [diff] [blame] | 300 | } |
Joe Onorato | fd52b18 | 2010-11-10 18:00:52 -0800 | [diff] [blame] | 301 | } |
| 302 | |