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; 20 import com.android.systemui.statusbar.policy.MobileSignalController.MobileIconGroup; 21 22 class TelephonyIcons { 23 //***** Data connection icons 24 25 static final int QS_DATA_G = R.drawable.ic_qs_signal_g; 26 static final int QS_DATA_3G = R.drawable.ic_qs_signal_3g; 27 static final int QS_DATA_E = R.drawable.ic_qs_signal_e; 28 static final int QS_DATA_H = R.drawable.ic_qs_signal_h; 29 static final int QS_DATA_1X = R.drawable.ic_qs_signal_1x; 30 static final int QS_DATA_4G = R.drawable.ic_qs_signal_4g; 31 static final int QS_DATA_4G_PLUS = R.drawable.ic_qs_signal_4g_plus; 32 static final int QS_DATA_LTE = R.drawable.ic_qs_signal_lte; 33 static final int QS_DATA_LTE_PLUS = R.drawable.ic_qs_signal_lte_plus; 34 35 static final int FLIGHT_MODE_ICON = R.drawable.stat_sys_airplane_mode; 36 37 static final int ICON_LTE = R.drawable.stat_sys_data_fully_connected_lte; 38 static final int ICON_LTE_PLUS = R.drawable.stat_sys_data_fully_connected_lte_plus; 39 static final int ICON_G = R.drawable.stat_sys_data_fully_connected_g; 40 static final int ICON_E = R.drawable.stat_sys_data_fully_connected_e; 41 static final int ICON_H = R.drawable.stat_sys_data_fully_connected_h; 42 static final int ICON_3G = R.drawable.stat_sys_data_fully_connected_3g; 43 static final int ICON_4G = R.drawable.stat_sys_data_fully_connected_4g; 44 static final int ICON_4G_PLUS = R.drawable.stat_sys_data_fully_connected_4g_plus; 45 static final int ICON_1X = R.drawable.stat_sys_data_fully_connected_1x; 46 47 static final int ICON_DATA_DISABLED = R.drawable.stat_sys_data_disabled; 48 49 static final int QS_ICON_DATA_DISABLED = R.drawable.ic_qs_data_disabled; 50 51 static final MobileIconGroup CARRIER_NETWORK_CHANGE = new MobileIconGroup( 52 "CARRIER_NETWORK_CHANGE", 53 null, 54 null, 55 AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH, 56 0, 0, 57 0, 58 0, 59 AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[0], 60 R.string.accessibility_carrier_network_change_mode, 61 0, 62 false, 63 0 64 ); 65 66 static final MobileIconGroup THREE_G = new MobileIconGroup( 67 "3G", 68 null, 69 null, 70 AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH, 71 0, 0, 72 0, 73 0, 74 AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[0], 75 R.string.accessibility_data_connection_3g, 76 TelephonyIcons.ICON_3G, 77 true, 78 TelephonyIcons.QS_DATA_3G 79 ); 80 81 static final MobileIconGroup WFC = new MobileIconGroup( 82 "WFC", 83 null, 84 null, 85 AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH, 86 0, 0, 87 0, 88 0, 89 AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[0], 90 0, 0, false, 0 91 ); 92 93 static final MobileIconGroup UNKNOWN = new MobileIconGroup( 94 "Unknown", 95 null, 96 null, 97 AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH, 98 0, 0, 99 0, 100 0, 101 AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[0], 102 0, 0, false, 0 103 ); 104 105 static final MobileIconGroup E = new MobileIconGroup( 106 "E", 107 null, 108 null, 109 AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH, 110 0, 0, 111 0, 112 0, 113 AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[0], 114 R.string.accessibility_data_connection_edge, 115 TelephonyIcons.ICON_E, 116 false, 117 TelephonyIcons.QS_DATA_E 118 ); 119 120 static final MobileIconGroup ONE_X = new MobileIconGroup( 121 "1X", 122 null, 123 null, 124 AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH, 125 0, 0, 126 0, 127 0, 128 AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[0], 129 R.string.accessibility_data_connection_cdma, 130 TelephonyIcons.ICON_1X, 131 true, 132 TelephonyIcons.QS_DATA_1X 133 ); 134 135 static final MobileIconGroup G = new MobileIconGroup( 136 "G", 137 null, 138 null, 139 AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH, 140 0, 0, 141 0, 142 0, 143 AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[0], 144 R.string.accessibility_data_connection_gprs, 145 TelephonyIcons.ICON_G, 146 false, 147 TelephonyIcons.QS_DATA_G 148 ); 149 150 static final MobileIconGroup H = new MobileIconGroup( 151 "H", 152 null, 153 null, 154 AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH, 155 0, 0, 156 0, 157 0, 158 AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[0], 159 R.string.accessibility_data_connection_3_5g, 160 TelephonyIcons.ICON_H, 161 false, 162 TelephonyIcons.QS_DATA_H 163 ); 164 165 static final MobileIconGroup FOUR_G = new MobileIconGroup( 166 "4G", 167 null, 168 null, 169 AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH, 170 0, 0, 171 0, 172 0, 173 AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[0], 174 R.string.accessibility_data_connection_4g, 175 TelephonyIcons.ICON_4G, 176 true, 177 TelephonyIcons.QS_DATA_4G 178 ); 179 180 static final MobileIconGroup FOUR_G_PLUS = new MobileIconGroup( 181 "4G+", 182 null, 183 null, 184 AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH, 185 0,0, 186 0, 187 0, 188 AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[0], 189 R.string.accessibility_data_connection_4g_plus, 190 TelephonyIcons.ICON_4G_PLUS, 191 true, 192 TelephonyIcons.QS_DATA_4G_PLUS 193 ); 194 195 static final MobileIconGroup LTE = new MobileIconGroup( 196 "LTE", 197 null, 198 null, 199 AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH, 200 0, 0, 201 0, 202 0, 203 AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[0], 204 R.string.accessibility_data_connection_lte, 205 TelephonyIcons.ICON_LTE, 206 true, 207 TelephonyIcons.QS_DATA_LTE 208 ); 209 210 static final MobileIconGroup LTE_PLUS = new MobileIconGroup( 211 "LTE+", 212 null, 213 null, 214 AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH, 215 0, 0, 216 0, 217 0, 218 AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[0], 219 R.string.accessibility_data_connection_lte_plus, 220 TelephonyIcons.ICON_LTE_PLUS, 221 true, 222 TelephonyIcons.QS_DATA_LTE_PLUS 223 ); 224 225 static final MobileIconGroup DATA_DISABLED = new MobileIconGroup( 226 "DataDisabled", 227 null, 228 null, 229 AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH, 230 0, 0, 231 0, 232 0, 233 AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[0], 234 R.string.accessibility_cell_data_off, 235 TelephonyIcons.ICON_DATA_DISABLED, 236 false, 237 TelephonyIcons.QS_ICON_DATA_DISABLED 238 ); 239 } 240 241