| | | |
Offset 48, 15 lines modified | Offset 48, 15 lines modified |
48 | ············this.mToggledGroups·=·new·ArraySet(); | 48 | ············this.mToggledGroups·=·new·ArraySet(); |
49 | ········} | 49 | ········} |
50 | ········this.mToggledGroups.add((Object)appPermissionGroup); | 50 | ········this.mToggledGroups.add((Object)appPermissionGroup); |
51 | ····} | 51 | ····} |
52 | ···· | 52 | ···· |
53 | ····private·static·void·bindUi(final·SettingsWithHeader·settingsWithHeader,·final·PermissionApps·permissionApps)·{ | 53 | ····private·static·void·bindUi(final·SettingsWithHeader·settingsWithHeader,·final·PermissionApps·permissionApps)·{ |
54 | ········permissionApps.getIcon(); | 54 | ········permissionApps.getIcon(); |
55 | ········settingsWithHeader.setHeader((Drawable)null,·(CharSequence)null,·(Intent)null,·(CharSequence)((Fragment)settingsWithHeader).getString(2131886389,·new·Object[]·{·permissionApps.getLabel()·})); | 55 | ········settingsWithHeader.setHeader((Drawable)null,·(CharSequence)null,·(Intent)null,·(CharSequence)((Fragment)settingsWithHeader).getString(2131886404,·new·Object[]·{·permissionApps.getLabel()·})); |
56 | ····} | 56 | ····} |
57 | ···· | 57 | ···· |
58 | ····private·PreferenceCategory·findOrCreateCategory(final·Context·context,·final·PreferenceScreen·preferenceScreen,·final·String·key,·final·int·title)·{ | 58 | ····private·PreferenceCategory·findOrCreateCategory(final·Context·context,·final·PreferenceScreen·preferenceScreen,·final·String·key,·final·int·title)·{ |
59 | ········PreferenceCategory·preferenceCategory·=·(PreferenceCategory)((PreferenceGroup)preferenceScreen).findPreference((CharSequence)key); | 59 | ········PreferenceCategory·preferenceCategory·=·(PreferenceCategory)((PreferenceGroup)preferenceScreen).findPreference((CharSequence)key); |
60 | ········if·(preferenceCategory·==·null)·{ | 60 | ········if·(preferenceCategory·==·null)·{ |
61 | ············preferenceCategory·=·new·PreferenceCategory(context); | 61 | ············preferenceCategory·=·new·PreferenceCategory(context); |
62 | ············((Preference)preferenceCategory).setKey(key); | 62 | ············((Preference)preferenceCategory).setKey(key); |
Offset 161, 45 lines modified | Offset 161, 45 lines modified |
161 | ················else·{ | 161 | ················else·{ |
162 | ····················preference·=·new·Preference(context); | 162 | ····················preference·=·new·Preference(context); |
163 | ····················preference.setOnPreferenceClickListener((Preference$OnPreferenceClickListener)this); | 163 | ····················preference.setOnPreferenceClickListener((Preference$OnPreferenceClickListener)this); |
164 | ····················preference.setKey(permissionApps$PermissionApp.getKey()); | 164 | ····················preference.setKey(permissionApps$PermissionApp.getKey()); |
165 | ····················preference.setIcon(permissionApps$PermissionApp.getIcon()); | 165 | ····················preference.setIcon(permissionApps$PermissionApp.getIcon()); |
166 | ····················preference.setTitle((CharSequence)permissionApps$PermissionApp.getLabel()); | 166 | ····················preference.setTitle((CharSequence)permissionApps$PermissionApp.getLabel()); |
167 | ····················if·(permissionApps$PermissionApp.isSystemFixed())·{ | 167 | ····················if·(permissionApps$PermissionApp.isSystemFixed())·{ |
168 | ························preference.setSummary((CharSequence)((Fragment)this).getString(2131886420)); | 168 | ························preference.setSummary((CharSequence)((Fragment)this).getString(2131886435)); |
169 | ····················} | 169 | ····················} |
170 | ····················else·if·(permissionApps$PermissionApp.isPolicyFixed())·{ | 170 | ····················else·if·(permissionApps$PermissionApp.isPolicyFixed())·{ |
171 | ························preference.setSummary((CharSequence)((Fragment)this).getString(2131886422)); | 171 | ························preference.setSummary((CharSequence)((Fragment)this).getString(2131886437)); |
172 | ····················} | 172 | ····················} |
173 | ····················preference.setPersistent(false); | 173 | ····················preference.setPersistent(false); |
174 | ····················preference.setEnabled(!permissionApps$PermissionApp.isSystemFixed()·&&·!permissionApps$PermissionApp.isPolicyFixed()); | 174 | ····················preference.setEnabled(!permissionApps$PermissionApp.isSystemFixed()·&&·!permissionApps$PermissionApp.isPolicyFixed()); |
175 | ················} | 175 | ················} |
176 | ················((PreferenceGroup)preferenceCategory3).addPreference(preference); | 176 | ················((PreferenceGroup)preferenceCategory3).addPreference(preference); |
177 | ············} | 177 | ············} |
178 | ············++i; | 178 | ············++i; |
179 | ········} | 179 | ········} |
180 | ········final·int·n·=·2131558615; | 180 | ········final·int·n·=·2131558617; |
181 | ········if·(!b)·{ | 181 | ········if·(!b)·{ |
182 | ············final·String·key2·=·"_noAppsAllowed"; | 182 | ············final·String·key2·=·"_noAppsAllowed"; |
183 | ············if·(!allPreferencesKeys.remove((Object)key2))·{ | 183 | ············if·(!allPreferencesKeys.remove((Object)key2))·{ |
184 | ················final·Preference·preference2·=·new·Preference(context); | 184 | ················final·Preference·preference2·=·new·Preference(context); |
185 | ················preference2.setKey(key2); | 185 | ················preference2.setKey(key2); |
186 | ················preference2.setLayoutResource(n); | 186 | ················preference2.setLayoutResource(n); |
187 | ················preference2.setTitle(2131886346); | 187 | ················preference2.setTitle(2131886354); |
188 | ················preference2.setEnabled(false); | 188 | ················preference2.setEnabled(false); |
189 | ················((PreferenceGroup)preferenceCategory).addPreference(preference2); | 189 | ················((PreferenceGroup)preferenceCategory).addPreference(preference2); |
190 | ············} | 190 | ············} |
191 | ········} | 191 | ········} |
192 | ········if·(!b2)·{ | 192 | ········if·(!b2)·{ |
193 | ············final·String·key3·=·"_noAppsDenied"; | 193 | ············final·String·key3·=·"_noAppsDenied"; |
194 | ············if·(!allPreferencesKeys2.remove((Object)key3))·{ | 194 | ············if·(!allPreferencesKeys2.remove((Object)key3))·{ |
195 | ················final·Preference·preference3·=·new·Preference(context); | 195 | ················final·Preference·preference3·=·new·Preference(context); |
196 | ················preference3.setKey(key3); | 196 | ················preference3.setKey(key3); |
197 | ················preference3.setLayoutResource(n); | 197 | ················preference3.setLayoutResource(n); |
198 | ················preference3.setTitle(2131886349); | 198 | ················preference3.setTitle(2131886357); |
199 | ················preference3.setEnabled(false); | 199 | ················preference3.setEnabled(false); |
200 | ················((PreferenceGroup)preferenceCategory2).addPreference(preference3); | 200 | ················((PreferenceGroup)preferenceCategory2).addPreference(preference3); |
201 | ············} | 201 | ············} |
202 | ········} | 202 | ········} |
203 | ········this.removePreferences((PreferenceGroup)preferenceCategory,·allPreferencesKeys); | 203 | ········this.removePreferences((PreferenceGroup)preferenceCategory,·allPreferencesKeys); |
204 | ········this.removePreferences((PreferenceGroup)preferenceCategory2,·allPreferencesKeys2); | 204 | ········this.removePreferences((PreferenceGroup)preferenceCategory2,·allPreferencesKeys2); |
205 | ····} | 205 | ····} |
Offset 213, 16 lines modified | Offset 213, 16 lines modified |
213 | ········super.onCreate(bundle); | 213 | ········super.onCreate(bundle); |
214 | ········((PermissionsFrameFragment)this).setLoading(true,·false); | 214 | ········((PermissionsFrameFragment)this).setLoading(true,·false); |
215 | ········this.mPermissionApps·=·new·PermissionApps((Context)((Fragment)this).getActivity(),·((Fragment)this).getArguments().getString("android.intent.extra.PERMISSION_NAME"),·(PermissionApps$Callback)this); | 215 | ········this.mPermissionApps·=·new·PermissionApps((Context)((Fragment)this).getActivity(),·((Fragment)this).getArguments().getString("android.intent.extra.PERMISSION_NAME"),·(PermissionApps$Callback)this); |
216 | ····} | 216 | ····} |
217 | ···· | 217 | ···· |
218 | ····public·void·onCreateOptionsMenu(final·Menu·menu,·final·MenuInflater·menuInflater)·{ | 218 | ····public·void·onCreateOptionsMenu(final·Menu·menu,·final·MenuInflater·menuInflater)·{ |
219 | ········if·(this.mHasSystemApps)·{ | 219 | ········if·(this.mHasSystemApps)·{ |
220 | ············this.mShowSystemMenu·=·menu.add(0,·1,·0,·2131886330); | 220 | ············this.mShowSystemMenu·=·menu.add(0,·1,·0,·2131886338); |
221 | ············this.mHideSystemMenu·=·menu.add(0,·2,·0,·2131886329); | 221 | ············this.mHideSystemMenu·=·menu.add(0,·2,·0,·2131886337); |
222 | ············this.updateMenu(); | 222 | ············this.updateMenu(); |
223 | ········} | 223 | ········} |
224 | ····} | 224 | ····} |
225 | ···· | 225 | ···· |
226 | ····public·boolean·onOptionsItemSelected(final·MenuItem·menuItem)·{ | 226 | ····public·boolean·onOptionsItemSelected(final·MenuItem·menuItem)·{ |
227 | ········final·int·itemId·=·menuItem.getItemId(); | 227 | ········final·int·itemId·=·menuItem.getItemId(); |
228 | ········boolean·mShowSystem·=·true; | 228 | ········boolean·mShowSystem·=·true; |
Offset 289, 38 lines modified | Offset 289, 38 lines modified |
289 | ········else·{ | 289 | ········else·{ |
290 | ············this.mExtraScreen·=·null; | 290 | ············this.mExtraScreen·=·null; |
291 | ········} | 291 | ········} |
292 | ········final·String·s·=·"_allowed"; | 292 | ········final·String·s·=·"_allowed"; |
293 | ········final·int·n·=·2131886124; | 293 | ········final·int·n·=·2131886124; |
294 | ········final·PreferenceCategory·orCreateCategory·=·this.findOrCreateCategory(context,·preferenceScreen,·s,·n); | 294 | ········final·PreferenceCategory·orCreateCategory·=·this.findOrCreateCategory(context,·preferenceScreen,·s,·n); |
295 | ········final·String·s2·=·"_denied"; | 295 | ········final·String·s2·=·"_denied"; |
296 | ········final·int·n2·=·2131886233; | 296 | ········final·int·n2·=·2131886240; |
297 | ········this.updateCategories(context,·orCreateCategory,·this.findOrCreateCategory(context,·preferenceScreen,·s2,·n2),·set); | 297 | ········this.updateCategories(context,·orCreateCategory,·this.findOrCreateCategory(context,·preferenceScreen,·s2,·n2),·set); |
298 | ········final·String·key·=·"_showSystem"; | 298 | ········final·String·key·=·"_showSystem"; |
299 | ········Preference·preference·=·((PreferenceGroup)preferenceScreen).findPreference((CharSequence)key); | 299 | ········Preference·preference·=·((PreferenceGroup)preferenceScreen).findPreference((CharSequence)key); |
300 | ········final·PreferenceScreen·mExtraScreen·=·this.mExtraScreen; | 300 | ········final·PreferenceScreen·mExtraScreen·=·this.mExtraScreen; |
301 | ········if·(mExtraScreen·!=·null)·{ | 301 | ········if·(mExtraScreen·!=·null)·{ |
302 | ············final·PreferenceCategory·orCreateCategory2·=·this.findOrCreateCategory(context,·mExtraScreen,·s,·n); | 302 | ············final·PreferenceCategory·orCreateCategory2·=·this.findOrCreateCategory(context,·mExtraScreen,·s,·n); |
303 | ············this.updateCategories(context,·orCreateCategory2,·this.findOrCreateCategory(context,·this.mExtraScreen,·s2,·n2),·set2); | 303 | ············this.updateCategories(context,·orCreateCategory2,·this.findOrCreateCategory(context,·this.mExtraScreen,·s2,·n2),·set2); |
304 | ············if·(preference·==·null)·{ | 304 | ············if·(preference·==·null)·{ |
305 | ················preference·=·new·Preference(context); | 305 | ················preference·=·new·Preference(context); |
306 | ················preference.setKey(key); | 306 | ················preference.setKey(key); |
307 | ················preference.setIcon(Utils.applyTint(context,·2131230911,·16843817)); | 307 | ················preference.setIcon(Utils.applyTint(context,·2131230913,·16843817)); |
308 | ················preference.setTitle(2131886426); | 308 | ················preference.setTitle(2131886467); |
309 | ················preference.setOnPreferenceClickListener((Preference$OnPreferenceClickListener)this); | 309 | ················preference.setOnPreferenceClickListener((Preference$OnPreferenceClickListener)this); |
310 | ················((PreferenceGroup)preferenceScreen).addPreference(preference); | 310 | ················((PreferenceGroup)preferenceScreen).addPreference(preference); |
311 | ············} | 311 | ············} |
312 | ············int·preferenceCount; | 312 | ············int·preferenceCount; |
313 | ············if·(((PreferenceGroup)orCreateCategory2).findPreference((CharSequence)"_noAppsAllowed")·!=·null)·{ | 313 | ············if·(((PreferenceGroup)orCreateCategory2).findPreference((CharSequence)"_noAppsAllowed")·!=·null)·{ |
314 | ················preferenceCount·=·0; | 314 | ················preferenceCount·=·0; |
315 | ············} | 315 | ············} |
316 | ············else·{ | 316 | ············else·{ |
317 | ················preferenceCount·=·((PreferenceGroup)orCreateCategory2).getPreferenceCount(); | 317 | ················preferenceCount·=·((PreferenceGroup)orCreateCategory2).getPreferenceCount(); |
318 | ············} | 318 | ············} |
319 | ············final·int·n3·=·2131886152; | 319 | ············final·int·n3·=·2131886157; |
320 | ············final·Object[]·array·=·{·preferenceCount,·null·}; | 320 | ············final·Object[]·array·=·{·preferenceCount,·null·}; |
321 | ············array[mHasSystemApps]·=·set2.size(); | 321 | ············array[mHasSystemApps]·=·set2.size(); |
322 | ············preference.setSummary((CharSequence)((Fragment)this).getString(n3,·array)); | 322 | ············preference.setSummary((CharSequence)((Fragment)this).getString(n3,·array)); |
323 | ········} | 323 | ········} |
324 | ········else·if·(preference·!=·null)·{ | 324 | ········else·if·(preference·!=·null)·{ |
325 | ············((PreferenceGroup)preferenceScreen).removePreference(preference); | 325 | ············((PreferenceGroup)preferenceScreen).removePreference(preference); |
326 | ········} | 326 | ········} |
Offset 368, 15 lines modified | Offset 368, 15 lines modified |
368 | ········beginTransaction2.replace(n,·(Fragment)appPermissionFragment); | 368 | ········beginTransaction2.replace(n,·(Fragment)appPermissionFragment); |
369 | ········beginTransaction2.addToBackStack((String)null); | 369 | ········beginTransaction2.addToBackStack((String)null); |
370 | ········beginTransaction2.commit(); | 370 | ········beginTransaction2.commit(); |
371 | ········return·b; | 371 | ········return·b; |
372 | ····} | 372 | ····} |
373 | ···· | 373 | ···· |
374 | ····protected·void·onSetEmptyText(final·TextView·textView)·{ | 374 | ····protected·void·onSetEmptyText(final·TextView·textView)·{ |
375 | ········textView.setText(2131886345); | 375 | ········textView.setText(2131886353); |
376 | ····} | 376 | ····} |
377 | ···· | 377 | ···· |
378 | ····public·void·onStart()·{ | 378 | ····public·void·onStart()·{ |
379 | ········super.onStart(); | 379 | ········super.onStart(); |
380 | ········final·boolean·b·=·true; | 380 | ········final·boolean·b·=·true; |
381 | ········((Fragment)this).setHasOptionsMenu(b); | 381 | ········((Fragment)this).setHasOptionsMenu(b); |
382 | ········final·ActionBar·actionBar·=·((Activity)((Fragment)this).getActivity()).getActionBar(); | 382 | ········final·ActionBar·actionBar·=·((Activity)((Fragment)this).getActivity()).getActionBar(); |