Changeset View
Changeset View
Standalone View
Standalone View
src/org/kde/kdeconnect/Helpers/DeviceHelper.java
Show All 32 Lines | |||||
33 | 33 | | |||
34 | public class DeviceHelper { | 34 | public class DeviceHelper { | ||
35 | 35 | | |||
36 | public static final String KEY_DEVICE_NAME_PREFERENCE = "device_name_preference"; | 36 | public static final String KEY_DEVICE_NAME_PREFERENCE = "device_name_preference"; | ||
37 | 37 | | |||
38 | //from https://github.com/meetup/android-device-names | 38 | //from https://github.com/meetup/android-device-names | ||
39 | //Converted to java using: | 39 | //Converted to java using: | ||
40 | //cat android_models.properties | awk -F'=' '{sub(/ *$/, "", $1)} sub(/^ */, "", $2) { if ($2 != "") print "humanReadableNames.put(\""$1"\",\"" $2 "\");"}' | sed -e 's/\\ /_/g' | 40 | //cat android_models.properties | awk -F'=' '{sub(/ *$/, "", $1)} sub(/^ */, "", $2) { if ($2 != "") print "humanReadableNames.put(\""$1"\",\"" $2 "\");"}' | sed -e 's/\\ /_/g' | ||
41 | private final static HashMap<String,String> humanReadableNames = new HashMap<>(); | 41 | private final static HashMap<String, String> humanReadableNames = new HashMap<>(); | ||
42 | | ||||
42 | static { | 43 | static { | ||
43 | humanReadableNames.put("5860E","Coolpad Quattro 4G"); | 44 | humanReadableNames.put("5860E", "Coolpad Quattro 4G"); | ||
44 | humanReadableNames.put("831C","HTC One M8"); | 45 | humanReadableNames.put("831C", "HTC One M8"); | ||
45 | humanReadableNames.put("9920","Star Alps S9920"); | 46 | humanReadableNames.put("9920", "Star Alps S9920"); | ||
46 | humanReadableNames.put("A0001","OnePlus One"); | 47 | humanReadableNames.put("A0001", "OnePlus One"); | ||
47 | humanReadableNames.put("A1-810","Acer Iconia A1-810"); | 48 | humanReadableNames.put("A1-810", "Acer Iconia A1-810"); | ||
48 | humanReadableNames.put("ADR6300","HTC Droid Incredible"); | 49 | humanReadableNames.put("ADR6300", "HTC Droid Incredible"); | ||
49 | humanReadableNames.put("ADR6330VW","HTC Rhyme"); | 50 | humanReadableNames.put("ADR6330VW", "HTC Rhyme"); | ||
50 | humanReadableNames.put("ADR6350","HTC Droid Incredible 2"); | 51 | humanReadableNames.put("ADR6350", "HTC Droid Incredible 2"); | ||
51 | humanReadableNames.put("ADR6400L","HTC Thunderbolt"); | 52 | humanReadableNames.put("ADR6400L", "HTC Thunderbolt"); | ||
52 | humanReadableNames.put("ADR6410LVW","HTC Droid Incredible 4G"); | 53 | humanReadableNames.put("ADR6410LVW", "HTC Droid Incredible 4G"); | ||
53 | humanReadableNames.put("ADR6425LVW","HTC Rezound 4G"); | 54 | humanReadableNames.put("ADR6425LVW", "HTC Rezound 4G"); | ||
54 | humanReadableNames.put("ALCATEL_ONE_TOUCH_5035X","Alcatel One Touch X Pop"); | 55 | humanReadableNames.put("ALCATEL_ONE_TOUCH_5035X", "Alcatel One Touch X Pop"); | ||
55 | humanReadableNames.put("ALCATEL_ONE_TOUCH_7041X","Alcatel One Touch Pop C7"); | 56 | humanReadableNames.put("ALCATEL_ONE_TOUCH_7041X", "Alcatel One Touch Pop C7"); | ||
56 | humanReadableNames.put("ASUS_T00J","Asus ZenFone 5"); | 57 | humanReadableNames.put("ASUS_T00J", "Asus ZenFone 5"); | ||
57 | humanReadableNames.put("ASUS_Transformer_Pad_TF300T","Asus Transformer Pad"); | 58 | humanReadableNames.put("ASUS_Transformer_Pad_TF300T", "Asus Transformer Pad"); | ||
58 | humanReadableNames.put("ASUS_Transformer_Pad_TF700T","Asus Transformer Pad"); | 59 | humanReadableNames.put("ASUS_Transformer_Pad_TF700T", "Asus Transformer Pad"); | ||
59 | humanReadableNames.put("Aquaris_E4.5","bq Aquaris E4.5"); | 60 | humanReadableNames.put("Aquaris_E4.5", "bq Aquaris E4.5"); | ||
60 | humanReadableNames.put("C1905","Sony Xperia M"); | 61 | humanReadableNames.put("C1905", "Sony Xperia M"); | ||
61 | humanReadableNames.put("C2105","Sony Xperia L"); | 62 | humanReadableNames.put("C2105", "Sony Xperia L"); | ||
62 | humanReadableNames.put("C5155","Kyocera Rise"); | 63 | humanReadableNames.put("C5155", "Kyocera Rise"); | ||
63 | humanReadableNames.put("C5170","Kyocera Hydro"); | 64 | humanReadableNames.put("C5170", "Kyocera Hydro"); | ||
64 | humanReadableNames.put("C5302","Xperia SP"); | 65 | humanReadableNames.put("C5302", "Xperia SP"); | ||
65 | humanReadableNames.put("C5303","Sony Xperia SP"); | 66 | humanReadableNames.put("C5303", "Sony Xperia SP"); | ||
66 | humanReadableNames.put("C5306","Xperia SP"); | 67 | humanReadableNames.put("C5306", "Xperia SP"); | ||
67 | humanReadableNames.put("C6603","Sony Xperia Z"); | 68 | humanReadableNames.put("C6603", "Sony Xperia Z"); | ||
68 | humanReadableNames.put("C6606","Sony Xperia Z"); | 69 | humanReadableNames.put("C6606", "Sony Xperia Z"); | ||
69 | humanReadableNames.put("C6833","Sony Xperia Z Ultra"); | 70 | humanReadableNames.put("C6833", "Sony Xperia Z Ultra"); | ||
70 | humanReadableNames.put("C6903","Sony Xperia Z1"); | 71 | humanReadableNames.put("C6903", "Sony Xperia Z1"); | ||
71 | humanReadableNames.put("C6916","Sony Xperia Z1S"); | 72 | humanReadableNames.put("C6916", "Sony Xperia Z1S"); | ||
72 | humanReadableNames.put("CM990","Huawei Evolution III"); | 73 | humanReadableNames.put("CM990", "Huawei Evolution III"); | ||
73 | humanReadableNames.put("CUBOT_ONE","Cubot One"); | 74 | humanReadableNames.put("CUBOT_ONE", "Cubot One"); | ||
74 | humanReadableNames.put("D2005","Sony Xperia E1"); | 75 | humanReadableNames.put("D2005", "Sony Xperia E1"); | ||
75 | humanReadableNames.put("D2302","Xperia M2"); | 76 | humanReadableNames.put("D2302", "Xperia M2"); | ||
76 | humanReadableNames.put("D2303","Sony Xperia M2"); | 77 | humanReadableNames.put("D2303", "Sony Xperia M2"); | ||
77 | humanReadableNames.put("D2305","Xperia M2"); | 78 | humanReadableNames.put("D2305", "Xperia M2"); | ||
78 | humanReadableNames.put("D2306","Xperia M2"); | 79 | humanReadableNames.put("D2306", "Xperia M2"); | ||
79 | humanReadableNames.put("D2316","Xperia M2"); | 80 | humanReadableNames.put("D2316", "Xperia M2"); | ||
80 | humanReadableNames.put("D5503","Sony Xperia Z1"); | 81 | humanReadableNames.put("D5503", "Sony Xperia Z1"); | ||
81 | humanReadableNames.put("D5803","Sony Xperia Z3 Compact"); | 82 | humanReadableNames.put("D5803", "Sony Xperia Z3 Compact"); | ||
82 | humanReadableNames.put("D5833","Xperia Z3 Compact"); | 83 | humanReadableNames.put("D5833", "Xperia Z3 Compact"); | ||
83 | humanReadableNames.put("D6503","Sony Xperia Z2"); | 84 | humanReadableNames.put("D6503", "Sony Xperia Z2"); | ||
84 | humanReadableNames.put("D6603","Sony Xperia Z3"); | 85 | humanReadableNames.put("D6603", "Sony Xperia Z3"); | ||
85 | humanReadableNames.put("D6653","Sony Xperia Z3"); | 86 | humanReadableNames.put("D6653", "Sony Xperia Z3"); | ||
86 | humanReadableNames.put("DROID2","Motorola Droid 2"); | 87 | humanReadableNames.put("DROID2", "Motorola Droid 2"); | ||
87 | humanReadableNames.put("DROID2_GLOBAL","Motorola Droid 2 Global"); | 88 | humanReadableNames.put("DROID2_GLOBAL", "Motorola Droid 2 Global"); | ||
88 | humanReadableNames.put("DROID3","Motorola Droid 3"); | 89 | humanReadableNames.put("DROID3", "Motorola Droid 3"); | ||
89 | humanReadableNames.put("DROID4","Motorola Droid 4"); | 90 | humanReadableNames.put("DROID4", "Motorola Droid 4"); | ||
90 | humanReadableNames.put("DROIDX","Motorola Droid X"); | 91 | humanReadableNames.put("DROIDX", "Motorola Droid X"); | ||
91 | humanReadableNames.put("DROID_BIONIC","Motorola Droid Bionic"); | 92 | humanReadableNames.put("DROID_BIONIC", "Motorola Droid Bionic"); | ||
92 | humanReadableNames.put("DROID_Pro","Motorola Droid Pro"); | 93 | humanReadableNames.put("DROID_Pro", "Motorola Droid Pro"); | ||
93 | humanReadableNames.put("DROID_RAZR","Motorola Droid Razr"); | 94 | humanReadableNames.put("DROID_RAZR", "Motorola Droid Razr"); | ||
94 | humanReadableNames.put("DROID_RAZR_HD","Motorola Droid Razr HD"); | 95 | humanReadableNames.put("DROID_RAZR_HD", "Motorola Droid Razr HD"); | ||
95 | humanReadableNames.put("DROID_X2","Motorola Droid X2"); | 96 | humanReadableNames.put("DROID_X2", "Motorola Droid X2"); | ||
96 | humanReadableNames.put("Desire_HD","HTC Desire HD"); | 97 | humanReadableNames.put("Desire_HD", "HTC Desire HD"); | ||
97 | humanReadableNames.put("Droid","Motorola Droid"); | 98 | humanReadableNames.put("Droid", "Motorola Droid"); | ||
98 | humanReadableNames.put("EVO","HTC Evo"); | 99 | humanReadableNames.put("EVO", "HTC Evo"); | ||
99 | humanReadableNames.put("GT-I8160","Samsung Galaxy Ace 2"); | 100 | humanReadableNames.put("GT-I8160", "Samsung Galaxy Ace 2"); | ||
100 | humanReadableNames.put("GT-I8190","Samsung Galaxy S III Mini"); | 101 | humanReadableNames.put("GT-I8190", "Samsung Galaxy S III Mini"); | ||
101 | humanReadableNames.put("GT-I8190L","Samsung Galaxy S3 Mini"); | 102 | humanReadableNames.put("GT-I8190L", "Samsung Galaxy S3 Mini"); | ||
102 | humanReadableNames.put("GT-I8190N","Samsung Galaxy S III Mini"); | 103 | humanReadableNames.put("GT-I8190N", "Samsung Galaxy S III Mini"); | ||
103 | humanReadableNames.put("GT-I8260","Samsung Galaxy Core"); | 104 | humanReadableNames.put("GT-I8260", "Samsung Galaxy Core"); | ||
104 | humanReadableNames.put("GT-I8262","Samsung Galaxy Core"); | 105 | humanReadableNames.put("GT-I8262", "Samsung Galaxy Core"); | ||
105 | humanReadableNames.put("GT-I8550L","Samsung Galaxy Win"); | 106 | humanReadableNames.put("GT-I8550L", "Samsung Galaxy Win"); | ||
106 | humanReadableNames.put("GT-I9000","Samsung Galaxy S"); | 107 | humanReadableNames.put("GT-I9000", "Samsung Galaxy S"); | ||
107 | humanReadableNames.put("GT-I9001","Samsung Galaxy S Plus"); | 108 | humanReadableNames.put("GT-I9001", "Samsung Galaxy S Plus"); | ||
108 | humanReadableNames.put("GT-I9060","Samsung Galaxy Grand Neo"); | 109 | humanReadableNames.put("GT-I9060", "Samsung Galaxy Grand Neo"); | ||
109 | humanReadableNames.put("GT-I9063T","Samsung Galaxy Grand Neo Duos"); | 110 | humanReadableNames.put("GT-I9063T", "Samsung Galaxy Grand Neo Duos"); | ||
110 | humanReadableNames.put("GT-I9070","Samsung Galaxy S Advance"); | 111 | humanReadableNames.put("GT-I9070", "Samsung Galaxy S Advance"); | ||
111 | humanReadableNames.put("GT-I9082","Samsung Galaxy Grand"); | 112 | humanReadableNames.put("GT-I9082", "Samsung Galaxy Grand"); | ||
112 | humanReadableNames.put("GT-I9100","Samsung Galaxy S II"); | 113 | humanReadableNames.put("GT-I9100", "Samsung Galaxy S II"); | ||
113 | humanReadableNames.put("GT-I9100M","Samsung Galaxy S II"); | 114 | humanReadableNames.put("GT-I9100M", "Samsung Galaxy S II"); | ||
114 | humanReadableNames.put("GT-I9100P","Samsung Galaxy S II"); | 115 | humanReadableNames.put("GT-I9100P", "Samsung Galaxy S II"); | ||
115 | humanReadableNames.put("GT-I9100T","Samsung Galaxy S II"); | 116 | humanReadableNames.put("GT-I9100T", "Samsung Galaxy S II"); | ||
116 | humanReadableNames.put("GT-I9105P","Samsung Galaxy S2 Plus"); | 117 | humanReadableNames.put("GT-I9105P", "Samsung Galaxy S2 Plus"); | ||
117 | humanReadableNames.put("GT-I9190","Samsung Galaxy S4 Mini"); | 118 | humanReadableNames.put("GT-I9190", "Samsung Galaxy S4 Mini"); | ||
118 | humanReadableNames.put("GT-I9192","Samsung Galaxy S4 Mini Duos"); | 119 | humanReadableNames.put("GT-I9192", "Samsung Galaxy S4 Mini Duos"); | ||
119 | humanReadableNames.put("GT-I9195","Samsung Galaxy S4 Mini"); | 120 | humanReadableNames.put("GT-I9195", "Samsung Galaxy S4 Mini"); | ||
120 | humanReadableNames.put("GT-I9197","Galaxy S4 Mini"); | 121 | humanReadableNames.put("GT-I9197", "Galaxy S4 Mini"); | ||
121 | humanReadableNames.put("GT-I9198","Galaxy S4 Mini"); | 122 | humanReadableNames.put("GT-I9198", "Galaxy S4 Mini"); | ||
122 | humanReadableNames.put("GT-I9210","Galaxy S2"); | 123 | humanReadableNames.put("GT-I9210", "Galaxy S2"); | ||
123 | humanReadableNames.put("GT-I9295","Samsung Galaxy S4 Active"); | 124 | humanReadableNames.put("GT-I9295", "Samsung Galaxy S4 Active"); | ||
124 | humanReadableNames.put("GT-I9300","Samsung Galaxy S III"); | 125 | humanReadableNames.put("GT-I9300", "Samsung Galaxy S III"); | ||
125 | humanReadableNames.put("GT-I9300T","Samsung Galaxy S III"); | 126 | humanReadableNames.put("GT-I9300T", "Samsung Galaxy S III"); | ||
126 | humanReadableNames.put("GT-I9305","Samsung Galaxy S III"); | 127 | humanReadableNames.put("GT-I9305", "Samsung Galaxy S III"); | ||
127 | humanReadableNames.put("GT-I9305T","Samsung Galaxy S III"); | 128 | humanReadableNames.put("GT-I9305T", "Samsung Galaxy S III"); | ||
128 | humanReadableNames.put("GT-I9500","Samsung Galaxy S4"); | 129 | humanReadableNames.put("GT-I9500", "Samsung Galaxy S4"); | ||
129 | humanReadableNames.put("GT-I9505","Samsung Galaxy S4"); | 130 | humanReadableNames.put("GT-I9505", "Samsung Galaxy S4"); | ||
130 | humanReadableNames.put("GT-I9506","Samsung Galaxy S4"); | 131 | humanReadableNames.put("GT-I9506", "Samsung Galaxy S4"); | ||
131 | humanReadableNames.put("GT-I9507","Samsung Galaxy S4"); | 132 | humanReadableNames.put("GT-I9507", "Samsung Galaxy S4"); | ||
132 | humanReadableNames.put("GT-N5110","Samsung Galaxy Note 8.0"); | 133 | humanReadableNames.put("GT-N5110", "Samsung Galaxy Note 8.0"); | ||
133 | humanReadableNames.put("GT-N7000","Samsung Galaxy Note"); | 134 | humanReadableNames.put("GT-N7000", "Samsung Galaxy Note"); | ||
134 | humanReadableNames.put("GT-N7100","Samsung Galaxy Note II"); | 135 | humanReadableNames.put("GT-N7100", "Samsung Galaxy Note II"); | ||
135 | humanReadableNames.put("GT-N7105","Samsung Galaxy Note II"); | 136 | humanReadableNames.put("GT-N7105", "Samsung Galaxy Note II"); | ||
136 | humanReadableNames.put("GT-N7105T","Samsung Galaxy Note II"); | 137 | humanReadableNames.put("GT-N7105T", "Samsung Galaxy Note II"); | ||
137 | humanReadableNames.put("GT-N8000","Samsung Galaxy Note 10.1"); | 138 | humanReadableNames.put("GT-N8000", "Samsung Galaxy Note 10.1"); | ||
138 | humanReadableNames.put("GT-N8010","Samsung Galaxy Note 10.1"); | 139 | humanReadableNames.put("GT-N8010", "Samsung Galaxy Note 10.1"); | ||
139 | humanReadableNames.put("GT-N8013","Samsung Galaxy Note 10.1"); | 140 | humanReadableNames.put("GT-N8013", "Samsung Galaxy Note 10.1"); | ||
140 | humanReadableNames.put("GT-P3100","Samsung Galaxy Tab 2"); | 141 | humanReadableNames.put("GT-P3100", "Samsung Galaxy Tab 2"); | ||
141 | humanReadableNames.put("GT-P3110","Samsung Galaxy Tab 2"); | 142 | humanReadableNames.put("GT-P3110", "Samsung Galaxy Tab 2"); | ||
142 | humanReadableNames.put("GT-P3113","Samsung Galaxy Tab 2 7.0"); | 143 | humanReadableNames.put("GT-P3113", "Samsung Galaxy Tab 2 7.0"); | ||
143 | humanReadableNames.put("GT-P5110","Samsung Galaxy Tab 2"); | 144 | humanReadableNames.put("GT-P5110", "Samsung Galaxy Tab 2"); | ||
144 | humanReadableNames.put("GT-P5113","Samsnung Galaxy Tab 2 10.1"); | 145 | humanReadableNames.put("GT-P5113", "Samsnung Galaxy Tab 2 10.1"); | ||
145 | humanReadableNames.put("GT-P5210","Samsung Galaxy Tab 3 10.1"); | 146 | humanReadableNames.put("GT-P5210", "Samsung Galaxy Tab 3 10.1"); | ||
146 | humanReadableNames.put("GT-P7510","Samsung Galaxy Tab 10.1"); | 147 | humanReadableNames.put("GT-P7510", "Samsung Galaxy Tab 10.1"); | ||
147 | humanReadableNames.put("GT-S5301L","Samsung Galaxy Pocket Plus"); | 148 | humanReadableNames.put("GT-S5301L", "Samsung Galaxy Pocket Plus"); | ||
148 | humanReadableNames.put("GT-S5360","Samsung Galaxy Y"); | 149 | humanReadableNames.put("GT-S5360", "Samsung Galaxy Y"); | ||
149 | humanReadableNames.put("GT-S5570","Samsung Galaxy Mini"); | 150 | humanReadableNames.put("GT-S5570", "Samsung Galaxy Mini"); | ||
150 | humanReadableNames.put("GT-S5830","Samsung Galaxy Ace"); | 151 | humanReadableNames.put("GT-S5830", "Samsung Galaxy Ace"); | ||
151 | humanReadableNames.put("GT-S5830i","Samsung Galaxy Ace"); | 152 | humanReadableNames.put("GT-S5830i", "Samsung Galaxy Ace"); | ||
152 | humanReadableNames.put("GT-S6310","Samsung Galaxy Young"); | 153 | humanReadableNames.put("GT-S6310", "Samsung Galaxy Young"); | ||
153 | humanReadableNames.put("GT-S6310N","Samsung Galaxy Young"); | 154 | humanReadableNames.put("GT-S6310N", "Samsung Galaxy Young"); | ||
154 | humanReadableNames.put("GT-S6810P","Samsung Galaxy Fame"); | 155 | humanReadableNames.put("GT-S6810P", "Samsung Galaxy Fame"); | ||
155 | humanReadableNames.put("GT-S7560M","Samsung Galaxy Ace II X"); | 156 | humanReadableNames.put("GT-S7560M", "Samsung Galaxy Ace II X"); | ||
156 | humanReadableNames.put("GT-S7562","Samsung Galaxy S Duos"); | 157 | humanReadableNames.put("GT-S7562", "Samsung Galaxy S Duos"); | ||
157 | humanReadableNames.put("GT-S7580","Samsung Galaxy Trend Plus"); | 158 | humanReadableNames.put("GT-S7580", "Samsung Galaxy Trend Plus"); | ||
158 | humanReadableNames.put("Galaxy_Nexus","Samsung Galaxy Nexus"); | 159 | humanReadableNames.put("Galaxy_Nexus", "Samsung Galaxy Nexus"); | ||
159 | humanReadableNames.put("HM_1SW","Xiaomi Redmi"); | 160 | humanReadableNames.put("HM_1SW", "Xiaomi Redmi"); | ||
160 | humanReadableNames.put("HTC6435LVW","HTC Droid DNA"); | 161 | humanReadableNames.put("HTC6435LVW", "HTC Droid DNA"); | ||
161 | humanReadableNames.put("HTC6500LVW","HTC One"); | 162 | humanReadableNames.put("HTC6500LVW", "HTC One"); | ||
162 | humanReadableNames.put("HTC6525LVW","HTC One M8"); | 163 | humanReadableNames.put("HTC6525LVW", "HTC One M8"); | ||
163 | humanReadableNames.put("HTCEVODesign4G","HTC Evo Design 4G"); | 164 | humanReadableNames.put("HTCEVODesign4G", "HTC Evo Design 4G"); | ||
164 | humanReadableNames.put("HTCEVOV4G","HTC Evo V 4G"); | 165 | humanReadableNames.put("HTCEVOV4G", "HTC Evo V 4G"); | ||
165 | humanReadableNames.put("HTCONE","HTC One"); | 166 | humanReadableNames.put("HTCONE", "HTC One"); | ||
166 | humanReadableNames.put("HTC_Desire_500","HTC Desire 500"); | 167 | humanReadableNames.put("HTC_Desire_500", "HTC Desire 500"); | ||
167 | humanReadableNames.put("HTC_Desire_HD_A9191","HTC Desire HD"); | 168 | humanReadableNames.put("HTC_Desire_HD_A9191", "HTC Desire HD"); | ||
168 | humanReadableNames.put("HTC_One_mini","HTC One mini"); | 169 | humanReadableNames.put("HTC_One_mini", "HTC One mini"); | ||
169 | humanReadableNames.put("HTC_PH39100","HTC Vivid 4G"); | 170 | humanReadableNames.put("HTC_PH39100", "HTC Vivid 4G"); | ||
170 | humanReadableNames.put("HTC_PN071","HTC One"); | 171 | humanReadableNames.put("HTC_PN071", "HTC One"); | ||
171 | humanReadableNames.put("HTC_Sensation_Z710e","HTC Sensation"); | 172 | humanReadableNames.put("HTC_Sensation_Z710e", "HTC Sensation"); | ||
172 | humanReadableNames.put("HTC_Sensation_4G","HTC Sensation"); | 173 | humanReadableNames.put("HTC_Sensation_4G", "HTC Sensation"); | ||
173 | humanReadableNames.put("HTC_VLE_U","HTC One S"); | 174 | humanReadableNames.put("HTC_VLE_U", "HTC One S"); | ||
174 | humanReadableNames.put("HUAWEI_G510-0251","Huawei Ascend G510"); | 175 | humanReadableNames.put("HUAWEI_G510-0251", "Huawei Ascend G510"); | ||
175 | humanReadableNames.put("HUAWEI_P6-U06","Huawei Ascend P6"); | 176 | humanReadableNames.put("HUAWEI_P6-U06", "Huawei Ascend P6"); | ||
176 | humanReadableNames.put("HUAWEI_Y300-0100","Huawei Ascend Y300"); | 177 | humanReadableNames.put("HUAWEI_Y300-0100", "Huawei Ascend Y300"); | ||
177 | humanReadableNames.put("ISW11SC","Galaxy S2"); | 178 | humanReadableNames.put("ISW11SC", "Galaxy S2"); | ||
178 | humanReadableNames.put("KFJWA","Kindle Fire HD 8.9"); | 179 | humanReadableNames.put("KFJWA", "Kindle Fire HD 8.9"); | ||
179 | humanReadableNames.put("KFJWI","Kindle Fire HD 8.9"); | 180 | humanReadableNames.put("KFJWI", "Kindle Fire HD 8.9"); | ||
180 | humanReadableNames.put("KFOT","Kindle Fire"); | 181 | humanReadableNames.put("KFOT", "Kindle Fire"); | ||
181 | humanReadableNames.put("KFTT","Kindle Fire HD 7"); | 182 | humanReadableNames.put("KFTT", "Kindle Fire HD 7"); | ||
182 | humanReadableNames.put("L-01F","G2"); | 183 | humanReadableNames.put("L-01F", "G2"); | ||
183 | humanReadableNames.put("LG-C800","LG myTouch Q"); | 184 | humanReadableNames.put("LG-C800", "LG myTouch Q"); | ||
184 | humanReadableNames.put("LG-D415","LG Optimus L90"); | 185 | humanReadableNames.put("LG-D415", "LG Optimus L90"); | ||
185 | humanReadableNames.put("LG-D620","LG G2 Mini"); | 186 | humanReadableNames.put("LG-D620", "LG G2 Mini"); | ||
186 | humanReadableNames.put("LG-D686","LG G Pro Lite Dual"); | 187 | humanReadableNames.put("LG-D686", "LG G Pro Lite Dual"); | ||
187 | humanReadableNames.put("LG-D800","LG G2"); | 188 | humanReadableNames.put("LG-D800", "LG G2"); | ||
188 | humanReadableNames.put("LG-D801","LG G2"); | 189 | humanReadableNames.put("LG-D801", "LG G2"); | ||
189 | humanReadableNames.put("LG-D802","LG G2"); | 190 | humanReadableNames.put("LG-D802", "LG G2"); | ||
190 | humanReadableNames.put("LG-D803","G2"); | 191 | humanReadableNames.put("LG-D803", "G2"); | ||
191 | humanReadableNames.put("LG-D805","G2"); | 192 | humanReadableNames.put("LG-D805", "G2"); | ||
192 | humanReadableNames.put("LG-D850","LG G3"); | 193 | humanReadableNames.put("LG-D850", "LG G3"); | ||
193 | humanReadableNames.put("LG-D851","LG G3"); | 194 | humanReadableNames.put("LG-D851", "LG G3"); | ||
194 | humanReadableNames.put("LG-D852","G3"); | 195 | humanReadableNames.put("LG-D852", "G3"); | ||
195 | humanReadableNames.put("LG-D855","LG G3"); | 196 | humanReadableNames.put("LG-D855", "LG G3"); | ||
196 | humanReadableNames.put("LG-E411g","LG Optimus L1 II"); | 197 | humanReadableNames.put("LG-E411g", "LG Optimus L1 II"); | ||
197 | humanReadableNames.put("LG-E425g","LG Optimus L3 II"); | 198 | humanReadableNames.put("LG-E425g", "LG Optimus L3 II"); | ||
198 | humanReadableNames.put("LG-E440g","LG Optimus L4 II"); | 199 | humanReadableNames.put("LG-E440g", "LG Optimus L4 II"); | ||
199 | humanReadableNames.put("LG-E460","LG Optimus L5 II"); | 200 | humanReadableNames.put("LG-E460", "LG Optimus L5 II"); | ||
200 | humanReadableNames.put("LG-E610","LG Optimus L5"); | 201 | humanReadableNames.put("LG-E610", "LG Optimus L5"); | ||
201 | humanReadableNames.put("LG-E612g","LG Optimus L5 Dual"); | 202 | humanReadableNames.put("LG-E612g", "LG Optimus L5 Dual"); | ||
202 | humanReadableNames.put("LG-E739","LG MyTouch e739"); | 203 | humanReadableNames.put("LG-E739", "LG MyTouch e739"); | ||
203 | humanReadableNames.put("LG-E970","LG Optimus G"); | 204 | humanReadableNames.put("LG-E970", "LG Optimus G"); | ||
204 | humanReadableNames.put("LG-E971","Optimus G"); | 205 | humanReadableNames.put("LG-E971", "Optimus G"); | ||
205 | humanReadableNames.put("LG-E980","LG Optimus G Pro"); | 206 | humanReadableNames.put("LG-E980", "LG Optimus G Pro"); | ||
206 | humanReadableNames.put("LG-H815","G4"); | 207 | humanReadableNames.put("LG-H815", "G4"); | ||
207 | humanReadableNames.put("LG-LG730","LG Venice"); | 208 | humanReadableNames.put("LG-LG730", "LG Venice"); | ||
208 | humanReadableNames.put("LG-LS720","LG Optimus F3"); | 209 | humanReadableNames.put("LG-LS720", "LG Optimus F3"); | ||
209 | humanReadableNames.put("LG-LS840","LG Viper"); | 210 | humanReadableNames.put("LG-LS840", "LG Viper"); | ||
210 | humanReadableNames.put("LG-LS970","LG Optimus G"); | 211 | humanReadableNames.put("LG-LS970", "LG Optimus G"); | ||
211 | humanReadableNames.put("LG-LS980","LG G2"); | 212 | humanReadableNames.put("LG-LS980", "LG G2"); | ||
212 | humanReadableNames.put("LG-MS770","LG Motion 4G"); | 213 | humanReadableNames.put("LG-MS770", "LG Motion 4G"); | ||
213 | humanReadableNames.put("LG-MS910","LG Esteem"); | 214 | humanReadableNames.put("LG-MS910", "LG Esteem"); | ||
214 | humanReadableNames.put("LG-P509","LG Optimus T"); | 215 | humanReadableNames.put("LG-P509", "LG Optimus T"); | ||
215 | humanReadableNames.put("LG-P760","LG Optimus L9"); | 216 | humanReadableNames.put("LG-P760", "LG Optimus L9"); | ||
216 | humanReadableNames.put("LG-P768","LG Optimus L9"); | 217 | humanReadableNames.put("LG-P768", "LG Optimus L9"); | ||
217 | humanReadableNames.put("LG-P769","LG Optimus L9"); | 218 | humanReadableNames.put("LG-P769", "LG Optimus L9"); | ||
218 | humanReadableNames.put("LG-P999","LG G2X P999"); | 219 | humanReadableNames.put("LG-P999", "LG G2X P999"); | ||
219 | humanReadableNames.put("LG-VM696","LG Optimus Elite"); | 220 | humanReadableNames.put("LG-VM696", "LG Optimus Elite"); | ||
220 | humanReadableNames.put("LGL34C","LG Optimus Fuel"); | 221 | humanReadableNames.put("LGL34C", "LG Optimus Fuel"); | ||
221 | humanReadableNames.put("LGL55C","LG LGL55C"); | 222 | humanReadableNames.put("LGL55C", "LG LGL55C"); | ||
222 | humanReadableNames.put("LGLS740","LG Volt"); | 223 | humanReadableNames.put("LGLS740", "LG Volt"); | ||
223 | humanReadableNames.put("LGLS990","LG G3"); | 224 | humanReadableNames.put("LGLS990", "LG G3"); | ||
224 | humanReadableNames.put("LGMS323","LG Optimus L70"); | 225 | humanReadableNames.put("LGMS323", "LG Optimus L70"); | ||
225 | humanReadableNames.put("LGMS500","LG Optimus F6"); | 226 | humanReadableNames.put("LGMS500", "LG Optimus F6"); | ||
226 | humanReadableNames.put("LGMS769","LG Optimus L9"); | 227 | humanReadableNames.put("LGMS769", "LG Optimus L9"); | ||
227 | humanReadableNames.put("LS670","LG Optimus S"); | 228 | humanReadableNames.put("LS670", "LG Optimus S"); | ||
228 | humanReadableNames.put("LT22i","Sony Xperia P"); | 229 | humanReadableNames.put("LT22i", "Sony Xperia P"); | ||
229 | humanReadableNames.put("LT25i","Sony Xperia V"); | 230 | humanReadableNames.put("LT25i", "Sony Xperia V"); | ||
230 | humanReadableNames.put("LT26i","Sony Xperia S"); | 231 | humanReadableNames.put("LT26i", "Sony Xperia S"); | ||
231 | humanReadableNames.put("LT30p","Sony Xperia T"); | 232 | humanReadableNames.put("LT30p", "Sony Xperia T"); | ||
232 | humanReadableNames.put("MB855","Motorola Photon 4G"); | 233 | humanReadableNames.put("MB855", "Motorola Photon 4G"); | ||
233 | humanReadableNames.put("MB860","Motorola Atrix 4G"); | 234 | humanReadableNames.put("MB860", "Motorola Atrix 4G"); | ||
234 | humanReadableNames.put("MB865","Motorola Atrix 2"); | 235 | humanReadableNames.put("MB865", "Motorola Atrix 2"); | ||
235 | humanReadableNames.put("MB886","Motorola Atrix HD"); | 236 | humanReadableNames.put("MB886", "Motorola Atrix HD"); | ||
236 | humanReadableNames.put("ME173X","Asus MeMO Pad HD 7"); | 237 | humanReadableNames.put("ME173X", "Asus MeMO Pad HD 7"); | ||
237 | humanReadableNames.put("MI_3W","Xiaomi Mi 3"); | 238 | humanReadableNames.put("MI_3W", "Xiaomi Mi 3"); | ||
238 | humanReadableNames.put("MOTWX435KT","Motorola Triumph"); | 239 | humanReadableNames.put("MOTWX435KT", "Motorola Triumph"); | ||
239 | humanReadableNames.put("N3","Star NO.1 N3"); | 240 | humanReadableNames.put("N3", "Star NO.1 N3"); | ||
240 | humanReadableNames.put("N860","ZTE Warp N860"); | 241 | humanReadableNames.put("N860", "ZTE Warp N860"); | ||
241 | humanReadableNames.put("NEXUS_4","Nexus 4"); | 242 | humanReadableNames.put("NEXUS_4", "Nexus 4"); | ||
242 | humanReadableNames.put("NEXUS_5","Nexus 5"); | 243 | humanReadableNames.put("NEXUS_5", "Nexus 5"); | ||
243 | humanReadableNames.put("NEXUS_5X","Nexus 5X"); | 244 | humanReadableNames.put("NEXUS_5X", "Nexus 5X"); | ||
244 | humanReadableNames.put("LG-D820","Nexus 5"); | 245 | humanReadableNames.put("LG-D820", "Nexus 5"); | ||
245 | humanReadableNames.put("LG-D821","Nexus 5"); | 246 | humanReadableNames.put("LG-D821", "Nexus 5"); | ||
246 | humanReadableNames.put("NEXUS_6","Nexus 6"); | 247 | humanReadableNames.put("NEXUS_6", "Nexus 6"); | ||
247 | humanReadableNames.put("NEXUS_6P","Nexus 6P"); | 248 | humanReadableNames.put("NEXUS_6P", "Nexus 6P"); | ||
248 | humanReadableNames.put("Nexus_10","Google Nexus 10"); | 249 | humanReadableNames.put("Nexus_10", "Google Nexus 10"); | ||
249 | humanReadableNames.put("Nexus_4","Google Nexus 4"); | 250 | humanReadableNames.put("Nexus_4", "Google Nexus 4"); | ||
250 | humanReadableNames.put("Nexus_7","Asus Nexus 7"); | 251 | humanReadableNames.put("Nexus_7", "Asus Nexus 7"); | ||
251 | humanReadableNames.put("Nexus_S","Samsung Nexus S"); | 252 | humanReadableNames.put("Nexus_S", "Samsung Nexus S"); | ||
252 | humanReadableNames.put("Nexus_S_4G","Samsung Nexus S 4G"); | 253 | humanReadableNames.put("Nexus_S_4G", "Samsung Nexus S 4G"); | ||
253 | humanReadableNames.put("Orange_Daytona","Huawei Ascend G510"); | 254 | humanReadableNames.put("Orange_Daytona", "Huawei Ascend G510"); | ||
254 | humanReadableNames.put("PC36100","HTC Evo 4G"); | 255 | humanReadableNames.put("PC36100", "HTC Evo 4G"); | ||
255 | humanReadableNames.put("PG06100","HTC EVO Shift 4G"); | 256 | humanReadableNames.put("PG06100", "HTC EVO Shift 4G"); | ||
256 | humanReadableNames.put("PG86100","HTC Evo 3D"); | 257 | humanReadableNames.put("PG86100", "HTC Evo 3D"); | ||
257 | humanReadableNames.put("PH44100","HTC Evo Design 4G"); | 258 | humanReadableNames.put("PH44100", "HTC Evo Design 4G"); | ||
258 | humanReadableNames.put("PantechP9070","Pantech Burst"); | 259 | humanReadableNames.put("PantechP9070", "Pantech Burst"); | ||
259 | humanReadableNames.put("QMV7A","Verizon Ellipsis 7"); | 260 | humanReadableNames.put("QMV7A", "Verizon Ellipsis 7"); | ||
260 | humanReadableNames.put("SAMSUNG-SGH-I317","Samsung Galaxy Note II"); | 261 | humanReadableNames.put("SAMSUNG-SGH-I317", "Samsung Galaxy Note II"); | ||
261 | humanReadableNames.put("SAMSUNG-SGH-I337","Samsung Galaxy S4"); | 262 | humanReadableNames.put("SAMSUNG-SGH-I337", "Samsung Galaxy S4"); | ||
262 | humanReadableNames.put("SAMSUNG-SGH-I527","Samsung Galaxy Mega"); | 263 | humanReadableNames.put("SAMSUNG-SGH-I527", "Samsung Galaxy Mega"); | ||
263 | humanReadableNames.put("SAMSUNG-SGH-I537","Samsung Galaxy S4 Active"); | 264 | humanReadableNames.put("SAMSUNG-SGH-I537", "Samsung Galaxy S4 Active"); | ||
264 | humanReadableNames.put("SAMSUNG-SGH-I717","Samsung Galaxy Note"); | 265 | humanReadableNames.put("SAMSUNG-SGH-I717", "Samsung Galaxy Note"); | ||
265 | humanReadableNames.put("SAMSUNG-SGH-I727","Samsung Skyrocket"); | 266 | humanReadableNames.put("SAMSUNG-SGH-I727", "Samsung Skyrocket"); | ||
266 | humanReadableNames.put("SAMSUNG-SGH-I747","Samsung Galaxy S III"); | 267 | humanReadableNames.put("SAMSUNG-SGH-I747", "Samsung Galaxy S III"); | ||
267 | humanReadableNames.put("SAMSUNG-SGH-I777","Samsung Galaxy S II"); | 268 | humanReadableNames.put("SAMSUNG-SGH-I777", "Samsung Galaxy S II"); | ||
268 | humanReadableNames.put("SAMSUNG-SGH-I897","Samsung Captivate"); | 269 | humanReadableNames.put("SAMSUNG-SGH-I897", "Samsung Captivate"); | ||
269 | humanReadableNames.put("SAMSUNG-SGH-I927","Samsung Captivate Glide"); | 270 | humanReadableNames.put("SAMSUNG-SGH-I927", "Samsung Captivate Glide"); | ||
270 | humanReadableNames.put("SAMSUNG-SGH-I997","Samsung Infuse 4G"); | 271 | humanReadableNames.put("SAMSUNG-SGH-I997", "Samsung Infuse 4G"); | ||
271 | humanReadableNames.put("SAMSUNG-SM-G730A","Samsung Galaxy S3 Mini"); | 272 | humanReadableNames.put("SAMSUNG-SM-G730A", "Samsung Galaxy S3 Mini"); | ||
272 | humanReadableNames.put("SAMSUNG-SM-G870A","Samsung Galaxy S5 Active"); | 273 | humanReadableNames.put("SAMSUNG-SM-G870A", "Samsung Galaxy S5 Active"); | ||
273 | humanReadableNames.put("SAMSUNG-SM-G900A","Samsung Galaxy S5"); | 274 | humanReadableNames.put("SAMSUNG-SM-G900A", "Samsung Galaxy S5"); | ||
274 | humanReadableNames.put("SAMSUNG-SM-G920A","Samsung Galaxy S6"); | 275 | humanReadableNames.put("SAMSUNG-SM-G920A", "Samsung Galaxy S6"); | ||
275 | humanReadableNames.put("SAMSUNG-SM-N900A","Samsung Galaxy Note 3"); | 276 | humanReadableNames.put("SAMSUNG-SM-N900A", "Samsung Galaxy Note 3"); | ||
276 | humanReadableNames.put("SAMSUNG-SM-N910A","Samsung Galaxy Note 4"); | 277 | humanReadableNames.put("SAMSUNG-SM-N910A", "Samsung Galaxy Note 4"); | ||
277 | humanReadableNames.put("SC-02C","Galaxy S2"); | 278 | humanReadableNames.put("SC-02C", "Galaxy S2"); | ||
278 | humanReadableNames.put("SC-03E","Galaxy S3"); | 279 | humanReadableNames.put("SC-03E", "Galaxy S3"); | ||
279 | humanReadableNames.put("SC-04E","Galaxy S4"); | 280 | humanReadableNames.put("SC-04E", "Galaxy S4"); | ||
280 | humanReadableNames.put("SC-06D","Galaxy S3"); | 281 | humanReadableNames.put("SC-06D", "Galaxy S3"); | ||
281 | humanReadableNames.put("SCH-I200","Samsung Galaxy Stellar"); | 282 | humanReadableNames.put("SCH-I200", "Samsung Galaxy Stellar"); | ||
282 | humanReadableNames.put("SCH-I337","Galaxy S4"); | 283 | humanReadableNames.put("SCH-I337", "Galaxy S4"); | ||
283 | humanReadableNames.put("SCH-I405","Samsung Stratosphere"); | 284 | humanReadableNames.put("SCH-I405", "Samsung Stratosphere"); | ||
284 | humanReadableNames.put("SCH-I415","Samsung Galaxy Stratosphere II"); | 285 | humanReadableNames.put("SCH-I415", "Samsung Galaxy Stratosphere II"); | ||
285 | humanReadableNames.put("SCH-I435","Samsung Galaxy S4 Mini"); | 286 | humanReadableNames.put("SCH-I435", "Samsung Galaxy S4 Mini"); | ||
286 | humanReadableNames.put("SCH-I500","Samsung Fascinate"); | 287 | humanReadableNames.put("SCH-I500", "Samsung Fascinate"); | ||
287 | humanReadableNames.put("SCH-I510","Samsung Droid Charge"); | 288 | humanReadableNames.put("SCH-I510", "Samsung Droid Charge"); | ||
288 | humanReadableNames.put("SCH-I535","Samsung Galaxy S III"); | 289 | humanReadableNames.put("SCH-I535", "Samsung Galaxy S III"); | ||
289 | humanReadableNames.put("SCH-I545","Samsung Galaxy S4"); | 290 | humanReadableNames.put("SCH-I545", "Samsung Galaxy S4"); | ||
290 | humanReadableNames.put("SCH-I605","Samsung Galaxy Note II"); | 291 | humanReadableNames.put("SCH-I605", "Samsung Galaxy Note II"); | ||
291 | humanReadableNames.put("SCH-I800","Samsung Galaxy Tab 7.0"); | 292 | humanReadableNames.put("SCH-I800", "Samsung Galaxy Tab 7.0"); | ||
292 | humanReadableNames.put("SCH-I939","Galaxy S3"); | 293 | humanReadableNames.put("SCH-I939", "Galaxy S3"); | ||
293 | humanReadableNames.put("SCH-I959","Galaxy S4"); | 294 | humanReadableNames.put("SCH-I959", "Galaxy S4"); | ||
294 | humanReadableNames.put("SCH-J021","Galaxy S3"); | 295 | humanReadableNames.put("SCH-J021", "Galaxy S3"); | ||
295 | humanReadableNames.put("SCH-R530C","Samsung Galaxy S3"); | 296 | humanReadableNames.put("SCH-R530C", "Samsung Galaxy S3"); | ||
296 | humanReadableNames.put("SCH-R530M","Samsung Galaxy S III"); | 297 | humanReadableNames.put("SCH-R530M", "Samsung Galaxy S III"); | ||
297 | humanReadableNames.put("SCH-R530U","Samsung Galaxy S III"); | 298 | humanReadableNames.put("SCH-R530U", "Samsung Galaxy S III"); | ||
298 | humanReadableNames.put("SCH-R720","Samsung Admire"); | 299 | humanReadableNames.put("SCH-R720", "Samsung Admire"); | ||
299 | humanReadableNames.put("SCH-R760","Galaxy S2"); | 300 | humanReadableNames.put("SCH-R760", "Galaxy S2"); | ||
300 | humanReadableNames.put("SCH-R970","Samsung Galaxy S4"); | 301 | humanReadableNames.put("SCH-R970", "Samsung Galaxy S4"); | ||
301 | humanReadableNames.put("SCH-S720C","Samsung Proclaim"); | 302 | humanReadableNames.put("SCH-S720C", "Samsung Proclaim"); | ||
302 | humanReadableNames.put("SCH-S738C","Samsung Galaxy Centura"); | 303 | humanReadableNames.put("SCH-S738C", "Samsung Galaxy Centura"); | ||
303 | humanReadableNames.put("SCH-S968C","Samsung Galaxy S III"); | 304 | humanReadableNames.put("SCH-S968C", "Samsung Galaxy S III"); | ||
304 | humanReadableNames.put("SCL21","Galaxy S3"); | 305 | humanReadableNames.put("SCL21", "Galaxy S3"); | ||
305 | humanReadableNames.put("SGH-I257M","Samsung Galaxy S4 Mini"); | 306 | humanReadableNames.put("SGH-I257M", "Samsung Galaxy S4 Mini"); | ||
306 | humanReadableNames.put("SGH-I317M","Samsung Galaxy Note II"); | 307 | humanReadableNames.put("SGH-I317M", "Samsung Galaxy Note II"); | ||
307 | humanReadableNames.put("SGH-I337M","Samsung Galaxy S4"); | 308 | humanReadableNames.put("SGH-I337M", "Samsung Galaxy S4"); | ||
308 | humanReadableNames.put("SGH-I727R","Samsung Galaxy S II"); | 309 | humanReadableNames.put("SGH-I727R", "Samsung Galaxy S II"); | ||
309 | humanReadableNames.put("SGH-I747M","Samsung Galaxy S III"); | 310 | humanReadableNames.put("SGH-I747M", "Samsung Galaxy S III"); | ||
310 | humanReadableNames.put("SGH-I757M","Galaxy S2"); | 311 | humanReadableNames.put("SGH-I757M", "Galaxy S2"); | ||
311 | humanReadableNames.put("SGH-I777M","Galaxy S2"); | 312 | humanReadableNames.put("SGH-I777M", "Galaxy S2"); | ||
312 | humanReadableNames.put("SGH-M919","Samsung Galaxy S4"); | 313 | humanReadableNames.put("SGH-M919", "Samsung Galaxy S4"); | ||
313 | humanReadableNames.put("SGH-M919N","Samsung Galaxy S4"); | 314 | humanReadableNames.put("SGH-M919N", "Samsung Galaxy S4"); | ||
314 | humanReadableNames.put("SGH-N035","Galaxy S3"); | 315 | humanReadableNames.put("SGH-N035", "Galaxy S3"); | ||
315 | humanReadableNames.put("SGH-N045","Galaxy S4"); | 316 | humanReadableNames.put("SGH-N045", "Galaxy S4"); | ||
316 | humanReadableNames.put("SGH-N064","Galaxy S3"); | 317 | humanReadableNames.put("SGH-N064", "Galaxy S3"); | ||
317 | humanReadableNames.put("SGH-T399","Samsung Galaxy Light"); | 318 | humanReadableNames.put("SGH-T399", "Samsung Galaxy Light"); | ||
318 | humanReadableNames.put("SGH-T399N","Samsung Galaxy Light"); | 319 | humanReadableNames.put("SGH-T399N", "Samsung Galaxy Light"); | ||
319 | humanReadableNames.put("SGH-T599N","Samsung Galaxy Exhibit"); | 320 | humanReadableNames.put("SGH-T599N", "Samsung Galaxy Exhibit"); | ||
320 | humanReadableNames.put("SGH-T679","Samsung Exhibit II"); | 321 | humanReadableNames.put("SGH-T679", "Samsung Exhibit II"); | ||
321 | humanReadableNames.put("SGH-T769","Samsung Galaxy S Blaze"); | 322 | humanReadableNames.put("SGH-T769", "Samsung Galaxy S Blaze"); | ||
322 | humanReadableNames.put("SGH-T889","Samsung Galaxy Note II"); | 323 | humanReadableNames.put("SGH-T889", "Samsung Galaxy Note II"); | ||
323 | humanReadableNames.put("SGH-T959","Samsung Galaxy S Vibrant"); | 324 | humanReadableNames.put("SGH-T959", "Samsung Galaxy S Vibrant"); | ||
324 | humanReadableNames.put("SGH-T959V","Samsung Galaxy S 4G"); | 325 | humanReadableNames.put("SGH-T959V", "Samsung Galaxy S 4G"); | ||
325 | humanReadableNames.put("SGH-T989","Samsung Galaxy S II"); | 326 | humanReadableNames.put("SGH-T989", "Samsung Galaxy S II"); | ||
326 | humanReadableNames.put("SGH-T989D","Samsung Galaxy S II"); | 327 | humanReadableNames.put("SGH-T989D", "Samsung Galaxy S II"); | ||
327 | humanReadableNames.put("SGH-T999","Samsung Galaxy S III"); | 328 | humanReadableNames.put("SGH-T999", "Samsung Galaxy S III"); | ||
328 | humanReadableNames.put("SGH-T999L","Samsung Galaxy S III"); | 329 | humanReadableNames.put("SGH-T999L", "Samsung Galaxy S III"); | ||
329 | humanReadableNames.put("SGH-T999V","Samsung Galaxy S III"); | 330 | humanReadableNames.put("SGH-T999V", "Samsung Galaxy S III"); | ||
330 | humanReadableNames.put("SGP312","Sony Xperia Tablet Z"); | 331 | humanReadableNames.put("SGP312", "Sony Xperia Tablet Z"); | ||
331 | humanReadableNames.put("SHV-E210K","Samsung Galaxy S3"); | 332 | humanReadableNames.put("SHV-E210K", "Samsung Galaxy S3"); | ||
332 | humanReadableNames.put("SHV-E210S","Samsung Galaxy S III"); | 333 | humanReadableNames.put("SHV-E210S", "Samsung Galaxy S III"); | ||
333 | humanReadableNames.put("SHV-E250K","Samsung Galaxy Note 2"); | 334 | humanReadableNames.put("SHV-E250K", "Samsung Galaxy Note 2"); | ||
334 | humanReadableNames.put("SHV-E250S","Samsung Galaxy Note II"); | 335 | humanReadableNames.put("SHV-E250S", "Samsung Galaxy Note II"); | ||
335 | humanReadableNames.put("SHV-E300","Galaxy S4"); | 336 | humanReadableNames.put("SHV-E300", "Galaxy S4"); | ||
336 | humanReadableNames.put("SHW-M250","Galaxy S2"); | 337 | humanReadableNames.put("SHW-M250", "Galaxy S2"); | ||
337 | humanReadableNames.put("SM-G3815","Samsung Galaxy Express II"); | 338 | humanReadableNames.put("SM-G3815", "Samsung Galaxy Express II"); | ||
338 | humanReadableNames.put("SM-G386T","Samsung Galaxy Avant"); | 339 | humanReadableNames.put("SM-G386T", "Samsung Galaxy Avant"); | ||
339 | humanReadableNames.put("SM-G386T1","Samsung Galaxy Avant"); | 340 | humanReadableNames.put("SM-G386T1", "Samsung Galaxy Avant"); | ||
340 | humanReadableNames.put("SM-G7102","Samsung Galaxy Grand II"); | 341 | humanReadableNames.put("SM-G7102", "Samsung Galaxy Grand II"); | ||
341 | humanReadableNames.put("SM-G800F","Samsung Galaxy S5 Mini"); | 342 | humanReadableNames.put("SM-G800F", "Samsung Galaxy S5 Mini"); | ||
342 | humanReadableNames.put("SM-G860P","Samsung Galaxy S5 Sport"); | 343 | humanReadableNames.put("SM-G860P", "Samsung Galaxy S5 Sport"); | ||
343 | humanReadableNames.put("SM-G900F","Samsung Galaxy S5"); | 344 | humanReadableNames.put("SM-G900F", "Samsung Galaxy S5"); | ||
344 | humanReadableNames.put("SM-G900H","Samsung Galaxy S5"); | 345 | humanReadableNames.put("SM-G900H", "Samsung Galaxy S5"); | ||
345 | humanReadableNames.put("SM-G900I","Samsung Galaxy S5"); | 346 | humanReadableNames.put("SM-G900I", "Samsung Galaxy S5"); | ||
346 | humanReadableNames.put("SM-G900P","Samsung Galaxy S5"); | 347 | humanReadableNames.put("SM-G900P", "Samsung Galaxy S5"); | ||
347 | humanReadableNames.put("SM-G900R4","Galaxy S5"); | 348 | humanReadableNames.put("SM-G900R4", "Galaxy S5"); | ||
348 | humanReadableNames.put("SM-G900RZWAUSC","Galaxy S5"); | 349 | humanReadableNames.put("SM-G900RZWAUSC", "Galaxy S5"); | ||
349 | humanReadableNames.put("SM-G900T","Samsung Galaxy S5"); | 350 | humanReadableNames.put("SM-G900T", "Samsung Galaxy S5"); | ||
350 | humanReadableNames.put("SM-G900V","Samsung Galaxy S5"); | 351 | humanReadableNames.put("SM-G900V", "Samsung Galaxy S5"); | ||
351 | humanReadableNames.put("SM-G900W8","Samsung Galaxy S5"); | 352 | humanReadableNames.put("SM-G900W8", "Samsung Galaxy S5"); | ||
352 | humanReadableNames.put("SM-G9200","Galaxy S6"); | 353 | humanReadableNames.put("SM-G9200", "Galaxy S6"); | ||
353 | humanReadableNames.put("SM-G920F","Galaxy S6"); | 354 | humanReadableNames.put("SM-G920F", "Galaxy S6"); | ||
354 | humanReadableNames.put("SM-G920I","Galaxy S6"); | 355 | humanReadableNames.put("SM-G920I", "Galaxy S6"); | ||
355 | humanReadableNames.put("SM-G920P","Samsung Galaxy S6"); | 356 | humanReadableNames.put("SM-G920P", "Samsung Galaxy S6"); | ||
356 | humanReadableNames.put("SM-G920R","Galaxy S6"); | 357 | humanReadableNames.put("SM-G920R", "Galaxy S6"); | ||
357 | humanReadableNames.put("SM-G920T","Samsung Galaxy S6"); | 358 | humanReadableNames.put("SM-G920T", "Samsung Galaxy S6"); | ||
358 | humanReadableNames.put("SM-G920V","Samsung Galaxy S6"); | 359 | humanReadableNames.put("SM-G920V", "Samsung Galaxy S6"); | ||
359 | humanReadableNames.put("SM-G920W8","Galaxy S6"); | 360 | humanReadableNames.put("SM-G920W8", "Galaxy S6"); | ||
360 | humanReadableNames.put("SM-G9250","Galaxy S6 Edge"); | 361 | humanReadableNames.put("SM-G9250", "Galaxy S6 Edge"); | ||
361 | humanReadableNames.put("SM-G925A","Galaxy S6 Edge"); | 362 | humanReadableNames.put("SM-G925A", "Galaxy S6 Edge"); | ||
362 | humanReadableNames.put("SM-G925F","Galaxy S6 Edge"); | 363 | humanReadableNames.put("SM-G925F", "Galaxy S6 Edge"); | ||
363 | humanReadableNames.put("SM-G925P","Galaxy S6 Edge"); | 364 | humanReadableNames.put("SM-G925P", "Galaxy S6 Edge"); | ||
364 | humanReadableNames.put("SM-G925R","Galaxy S6 Edge"); | 365 | humanReadableNames.put("SM-G925R", "Galaxy S6 Edge"); | ||
365 | humanReadableNames.put("SM-G925T","Galaxy S6 Edge"); | 366 | humanReadableNames.put("SM-G925T", "Galaxy S6 Edge"); | ||
366 | humanReadableNames.put("SM-G925V","Galaxy S6 Edge"); | 367 | humanReadableNames.put("SM-G925V", "Galaxy S6 Edge"); | ||
367 | humanReadableNames.put("SM-G925W8","Galaxy S6 Edge"); | 368 | humanReadableNames.put("SM-G925W8", "Galaxy S6 Edge"); | ||
368 | humanReadableNames.put("SM-N7505","Samsung Galaxy Note 3 Neo"); | 369 | humanReadableNames.put("SM-N7505", "Samsung Galaxy Note 3 Neo"); | ||
369 | humanReadableNames.put("SM-N900","Samsung Galaxy Note 3"); | 370 | humanReadableNames.put("SM-N900", "Samsung Galaxy Note 3"); | ||
370 | humanReadableNames.put("SM-N9005","Samsung Galaxy Note 3"); | 371 | humanReadableNames.put("SM-N9005", "Samsung Galaxy Note 3"); | ||
371 | humanReadableNames.put("SM-N9006","Samsung Galaxy Note 3"); | 372 | humanReadableNames.put("SM-N9006", "Samsung Galaxy Note 3"); | ||
372 | humanReadableNames.put("SM-N900P","Samsung Galaxy Note 3"); | 373 | humanReadableNames.put("SM-N900P", "Samsung Galaxy Note 3"); | ||
373 | humanReadableNames.put("SM-N900T","Samsung Galaxy Note 3"); | 374 | humanReadableNames.put("SM-N900T", "Samsung Galaxy Note 3"); | ||
374 | humanReadableNames.put("SM-N900V","Samsung Galaxy Note 3"); | 375 | humanReadableNames.put("SM-N900V", "Samsung Galaxy Note 3"); | ||
375 | humanReadableNames.put("SM-N900W8","Samsung Galaxy Note 3"); | 376 | humanReadableNames.put("SM-N900W8", "Samsung Galaxy Note 3"); | ||
376 | humanReadableNames.put("SM-N910C","Samsung Galaxy Note 4"); | 377 | humanReadableNames.put("SM-N910C", "Samsung Galaxy Note 4"); | ||
377 | humanReadableNames.put("SM-N910F","Samsung Galaxy Note 4"); | 378 | humanReadableNames.put("SM-N910F", "Samsung Galaxy Note 4"); | ||
378 | humanReadableNames.put("SM-N910G","Samsung Galaxy Note 4"); | 379 | humanReadableNames.put("SM-N910G", "Samsung Galaxy Note 4"); | ||
379 | humanReadableNames.put("SM-N910P","Samsung Galaxy Note 4"); | 380 | humanReadableNames.put("SM-N910P", "Samsung Galaxy Note 4"); | ||
380 | humanReadableNames.put("SM-N910T","Samsung Galaxy Note 4"); | 381 | humanReadableNames.put("SM-N910T", "Samsung Galaxy Note 4"); | ||
381 | humanReadableNames.put("SM-N910V","Samsung Galaxy Note 4"); | 382 | humanReadableNames.put("SM-N910V", "Samsung Galaxy Note 4"); | ||
382 | humanReadableNames.put("SM-N910W8","Samsung Galaxy Note 4"); | 383 | humanReadableNames.put("SM-N910W8", "Samsung Galaxy Note 4"); | ||
383 | humanReadableNames.put("SM-P600","Samsung Galaxy Note 10.1"); | 384 | humanReadableNames.put("SM-P600", "Samsung Galaxy Note 10.1"); | ||
384 | humanReadableNames.put("SM-T210R","Samsung Galaxy Tab 3 7.0"); | 385 | humanReadableNames.put("SM-T210R", "Samsung Galaxy Tab 3 7.0"); | ||
385 | humanReadableNames.put("SM-T217S","Samsung Galaxy Tab 3 7.0"); | 386 | humanReadableNames.put("SM-T217S", "Samsung Galaxy Tab 3 7.0"); | ||
386 | humanReadableNames.put("SM-T230NU","Samsung Galaxy Tab 4"); | 387 | humanReadableNames.put("SM-T230NU", "Samsung Galaxy Tab 4"); | ||
387 | humanReadableNames.put("SM-T310","Samsung Galaxy Tab 3 8.0"); | 388 | humanReadableNames.put("SM-T310", "Samsung Galaxy Tab 3 8.0"); | ||
388 | humanReadableNames.put("SM-T530NU","Samsung Galaxy Tab 4 10.1"); | 389 | humanReadableNames.put("SM-T530NU", "Samsung Galaxy Tab 4 10.1"); | ||
389 | humanReadableNames.put("SM-T800","Samsung Galaxy Tab S 10.5"); | 390 | humanReadableNames.put("SM-T800", "Samsung Galaxy Tab S 10.5"); | ||
390 | humanReadableNames.put("SPH-D600","Samsung Conquer 4G"); | 391 | humanReadableNames.put("SPH-D600", "Samsung Conquer 4G"); | ||
391 | humanReadableNames.put("SPH-D700","Samsung Epic 4G"); | 392 | humanReadableNames.put("SPH-D700", "Samsung Epic 4G"); | ||
392 | humanReadableNames.put("SPH-D710","Samsung Epic"); | 393 | humanReadableNames.put("SPH-D710", "Samsung Epic"); | ||
393 | humanReadableNames.put("SPH-D710BST","Samsung Galaxy S II"); | 394 | humanReadableNames.put("SPH-D710BST", "Samsung Galaxy S II"); | ||
394 | humanReadableNames.put("SPH-D710VMUB","Samsung Galaxy S II"); | 395 | humanReadableNames.put("SPH-D710VMUB", "Samsung Galaxy S II"); | ||
395 | humanReadableNames.put("SPH-L300","Samsung Galaxy Victory"); | 396 | humanReadableNames.put("SPH-L300", "Samsung Galaxy Victory"); | ||
396 | humanReadableNames.put("SPH-L520","Samsung Galaxy S4 Mini"); | 397 | humanReadableNames.put("SPH-L520", "Samsung Galaxy S4 Mini"); | ||
397 | humanReadableNames.put("SPH-L710","Samsung Galaxy S III"); | 398 | humanReadableNames.put("SPH-L710", "Samsung Galaxy S III"); | ||
398 | humanReadableNames.put("SPH-L710T","Samsung Galaxy S III"); | 399 | humanReadableNames.put("SPH-L710T", "Samsung Galaxy S III"); | ||
399 | humanReadableNames.put("SPH-L720","Samsung Galaxy S4"); | 400 | humanReadableNames.put("SPH-L720", "Samsung Galaxy S4"); | ||
400 | humanReadableNames.put("SPH-L720T","Samsung Galaxy S4"); | 401 | humanReadableNames.put("SPH-L720T", "Samsung Galaxy S4"); | ||
401 | humanReadableNames.put("SPH-L900","Samsung Galaxy Note II"); | 402 | humanReadableNames.put("SPH-L900", "Samsung Galaxy Note II"); | ||
402 | humanReadableNames.put("SPH-M820-BST","Samsung Galaxy Prevail"); | 403 | humanReadableNames.put("SPH-M820-BST", "Samsung Galaxy Prevail"); | ||
403 | humanReadableNames.put("SPH-M830","Samsung Galaxy Rush"); | 404 | humanReadableNames.put("SPH-M830", "Samsung Galaxy Rush"); | ||
404 | humanReadableNames.put("SPH-M840","Samsung Galaxy Prevail 2"); | 405 | humanReadableNames.put("SPH-M840", "Samsung Galaxy Prevail 2"); | ||
405 | humanReadableNames.put("SPH-M930BST","Samsung Transform Ultra"); | 406 | humanReadableNames.put("SPH-M930BST", "Samsung Transform Ultra"); | ||
406 | humanReadableNames.put("ST21i","Sony Xperia Tipo"); | 407 | humanReadableNames.put("ST21i", "Sony Xperia Tipo"); | ||
407 | humanReadableNames.put("ST25i","Sony Xperia U"); | 408 | humanReadableNames.put("ST25i", "Sony Xperia U"); | ||
408 | humanReadableNames.put("ST26i","Sony Xperia J"); | 409 | humanReadableNames.put("ST26i", "Sony Xperia J"); | ||
409 | humanReadableNames.put("Transformer_Prime_TF201","Asus Transformer Prime"); | 410 | humanReadableNames.put("Transformer_Prime_TF201", "Asus Transformer Prime"); | ||
410 | humanReadableNames.put("Transformer_TF101","Asus Transformer"); | 411 | humanReadableNames.put("Transformer_TF101", "Asus Transformer"); | ||
411 | humanReadableNames.put("VM670","LG Optimus V"); | 412 | humanReadableNames.put("VM670", "LG Optimus V"); | ||
412 | humanReadableNames.put("VS840_4G","LG Lucid 4G"); | 413 | humanReadableNames.put("VS840_4G", "LG Lucid 4G"); | ||
413 | humanReadableNames.put("VS870_4G","LG Lucid 2"); | 414 | humanReadableNames.put("VS870_4G", "LG Lucid 2"); | ||
414 | humanReadableNames.put("VS910_4G","LG Revolution 4G"); | 415 | humanReadableNames.put("VS910_4G", "LG Revolution 4G"); | ||
415 | humanReadableNames.put("VS920_4G","LG Spectrum 4G"); | 416 | humanReadableNames.put("VS920_4G", "LG Spectrum 4G"); | ||
416 | humanReadableNames.put("VS930_4G","LG Spectrum 2"); | 417 | humanReadableNames.put("VS930_4G", "LG Spectrum 2"); | ||
417 | humanReadableNames.put("VS980_4G","LG G2"); | 418 | humanReadableNames.put("VS980_4G", "LG G2"); | ||
418 | humanReadableNames.put("VS985_4G","LG G3 4G"); | 419 | humanReadableNames.put("VS985_4G", "LG G3 4G"); | ||
419 | humanReadableNames.put("XT1022","Motorola Moto E"); | 420 | humanReadableNames.put("XT1022", "Motorola Moto E"); | ||
420 | humanReadableNames.put("XT1028","Motorola Moto G"); | 421 | humanReadableNames.put("XT1028", "Motorola Moto G"); | ||
421 | humanReadableNames.put("XT1030","Motorola Droid Mini"); | 422 | humanReadableNames.put("XT1030", "Motorola Droid Mini"); | ||
422 | humanReadableNames.put("XT1031","Motorola Moto G"); | 423 | humanReadableNames.put("XT1031", "Motorola Moto G"); | ||
423 | humanReadableNames.put("XT1032","Motorola Moto G"); | 424 | humanReadableNames.put("XT1032", "Motorola Moto G"); | ||
424 | humanReadableNames.put("XT1033","Motorola Moto G"); | 425 | humanReadableNames.put("XT1033", "Motorola Moto G"); | ||
425 | humanReadableNames.put("XT1034","Motorola Moto G"); | 426 | humanReadableNames.put("XT1034", "Motorola Moto G"); | ||
426 | humanReadableNames.put("XT1039","Motorola Moto G"); | 427 | humanReadableNames.put("XT1039", "Motorola Moto G"); | ||
427 | humanReadableNames.put("XT1045","Motorola Moto G"); | 428 | humanReadableNames.put("XT1045", "Motorola Moto G"); | ||
428 | humanReadableNames.put("XT1049","Motorola Moto X"); | 429 | humanReadableNames.put("XT1049", "Motorola Moto X"); | ||
429 | humanReadableNames.put("XT1053","Motorola Moto X"); | 430 | humanReadableNames.put("XT1053", "Motorola Moto X"); | ||
430 | humanReadableNames.put("XT1056","Motorola Moto X"); | 431 | humanReadableNames.put("XT1056", "Motorola Moto X"); | ||
431 | humanReadableNames.put("XT1058","Motorola Moto X"); | 432 | humanReadableNames.put("XT1058", "Motorola Moto X"); | ||
432 | humanReadableNames.put("XT1060","Motorola Moto X"); | 433 | humanReadableNames.put("XT1060", "Motorola Moto X"); | ||
433 | humanReadableNames.put("XT1068","Motorola Moto G"); | 434 | humanReadableNames.put("XT1068", "Motorola Moto G"); | ||
434 | humanReadableNames.put("XT1080","Motorola Droid Ultra"); | 435 | humanReadableNames.put("XT1080", "Motorola Droid Ultra"); | ||
435 | humanReadableNames.put("XT1095","Motorola Moto X"); | 436 | humanReadableNames.put("XT1095", "Motorola Moto X"); | ||
436 | humanReadableNames.put("XT1096","Motorola Moto X"); | 437 | humanReadableNames.put("XT1096", "Motorola Moto X"); | ||
437 | humanReadableNames.put("XT1097","Motorola Moto X"); | 438 | humanReadableNames.put("XT1097", "Motorola Moto X"); | ||
438 | humanReadableNames.put("XT1254","Motorola Droid Turbo"); | 439 | humanReadableNames.put("XT1254", "Motorola Droid Turbo"); | ||
439 | humanReadableNames.put("XT897","Motorola Photo Q"); | 440 | humanReadableNames.put("XT897", "Motorola Photo Q"); | ||
440 | humanReadableNames.put("XT907","Motorola Droid Razr M"); | 441 | humanReadableNames.put("XT907", "Motorola Droid Razr M"); | ||
441 | humanReadableNames.put("Xoom","Motorola Xoom"); | 442 | humanReadableNames.put("Xoom", "Motorola Xoom"); | ||
442 | humanReadableNames.put("Z970","ZTE ZMax"); | 443 | humanReadableNames.put("Z970", "ZTE ZMax"); | ||
443 | humanReadableNames.put("bq_Aquaris_5","bq Aquaris 5"); | 444 | humanReadableNames.put("bq_Aquaris_5", "bq Aquaris 5"); | ||
444 | humanReadableNames.put("bq_Aquaris_5_HD","bq Aquaris 5 HD"); | 445 | humanReadableNames.put("bq_Aquaris_5_HD", "bq Aquaris 5 HD"); | ||
445 | humanReadableNames.put("google_sdk","Android Emulator"); | 446 | humanReadableNames.put("google_sdk", "Android Emulator"); | ||
446 | humanReadableNames.put("myTouch_4G_Slide","HTC myTouch 4G Slide"); | 447 | humanReadableNames.put("myTouch_4G_Slide", "HTC myTouch 4G Slide"); | ||
447 | 448 | | |||
448 | } | 449 | } | ||
449 | 450 | | |||
450 | public static String getAndroidDeviceName() { | 451 | public static String getAndroidDeviceName() { | ||
451 | String deviceName = null; | 452 | String deviceName = null; | ||
452 | try { | 453 | try { | ||
453 | String internalName = Build.MODEL.replace(' ', '_'); | 454 | String internalName = Build.MODEL.replace(' ', '_'); | ||
454 | String dictName = humanReadableNames.get(internalName); | 455 | String dictName = humanReadableNames.get(internalName); | ||
Show All 21 Lines | |||||
476 | 477 | | |||
477 | public static boolean isTablet() { | 478 | public static boolean isTablet() { | ||
478 | Configuration config = Resources.getSystem().getConfiguration(); | 479 | Configuration config = Resources.getSystem().getConfiguration(); | ||
479 | //This assumes that the values for the screen sizes are consecutive, so XXLARGE > XLARGE > LARGE | 480 | //This assumes that the values for the screen sizes are consecutive, so XXLARGE > XLARGE > LARGE | ||
480 | return ((config.screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_LARGE); | 481 | return ((config.screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_LARGE); | ||
481 | } | 482 | } | ||
482 | 483 | | |||
483 | //It returns getAndroidDeviceName() if no user-defined name has been set with setDeviceName(). | 484 | //It returns getAndroidDeviceName() if no user-defined name has been set with setDeviceName(). | ||
484 | public static String getDeviceName(Context context){ | 485 | public static String getDeviceName(Context context) { | ||
485 | SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context); | 486 | SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context); | ||
486 | // Could use prefrences.contains but would need to check for empty String anyway. | 487 | // Could use prefrences.contains but would need to check for empty String anyway. | ||
487 | String deviceName = preferences.getString(KEY_DEVICE_NAME_PREFERENCE, ""); | 488 | String deviceName = preferences.getString(KEY_DEVICE_NAME_PREFERENCE, ""); | ||
488 | if (deviceName.isEmpty()){ | 489 | if (deviceName.isEmpty()) { | ||
489 | deviceName = DeviceHelper.getAndroidDeviceName(); | 490 | deviceName = DeviceHelper.getAndroidDeviceName(); | ||
490 | Log.i("MainSettingsActivity", "New device name: " + deviceName); | 491 | Log.i("MainSettingsActivity", "New device name: " + deviceName); | ||
491 | preferences.edit().putString(KEY_DEVICE_NAME_PREFERENCE, deviceName).apply(); | 492 | preferences.edit().putString(KEY_DEVICE_NAME_PREFERENCE, deviceName).apply(); | ||
492 | } | 493 | } | ||
493 | return deviceName; | 494 | return deviceName; | ||
494 | } | 495 | } | ||
495 | 496 | | |||
496 | public static void setDeviceName(Context context, String name){ | 497 | public static void setDeviceName(Context context, String name) { | ||
497 | SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context); | 498 | SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context); | ||
498 | preferences.edit().putString(KEY_DEVICE_NAME_PREFERENCE, name).apply(); | 499 | preferences.edit().putString(KEY_DEVICE_NAME_PREFERENCE, name).apply(); | ||
499 | } | 500 | } | ||
500 | 501 | | |||
501 | public static String getDeviceId(Context context) { | 502 | public static String getDeviceId(Context context) { | ||
502 | return Settings.Secure.getString(context.getContentResolver(), Settings.Secure.ANDROID_ID); | 503 | return Settings.Secure.getString(context.getContentResolver(), Settings.Secure.ANDROID_ID); | ||
503 | } | 504 | } | ||
504 | } | 505 | } |