Offset 71, 19 lines modifiedOffset 71, 19 lines modified
71 ····private·void·addAutoRevokePreferences(final·PreferenceScreen·preferenceScreen)·{71 ····private·void·addAutoRevokePreferences(final·PreferenceScreen·preferenceScreen)·{
72 ········final·Context·context·=·((Preference)preferenceScreen).getPreferenceManager().getContext();72 ········final·Context·context·=·((Preference)preferenceScreen).getPreferenceManager().getContext();
73 ········final·PreferenceCategory·preferenceCategory·=·new·PreferenceCategory(context);73 ········final·PreferenceCategory·preferenceCategory·=·new·PreferenceCategory(context);
74 ········((Preference)preferenceCategory).setKey("_AUTO_REVOKE_KEY");74 ········((Preference)preferenceCategory).setKey("_AUTO_REVOKE_KEY");
75 ········((PreferenceGroup)preferenceScreen).addPreference((Preference)preferenceCategory);75 ········((PreferenceGroup)preferenceScreen).addPreference((Preference)preferenceCategory);
76 ········final·SwitchPreference·switchPreference·=·new·SwitchPreference(context);76 ········final·SwitchPreference·switchPreference·=·new·SwitchPreference(context);
77 ········((Preference)switchPreference).setOnPreferenceClickListener((Preference$OnPreferenceClickListener)new·-$$Lambda$AppPermissionGroupsFragment$hFyaUi7fwk3rc6rOhrr5hw4eqGU(this,·switchPreference));77 ········((Preference)switchPreference).setOnPreferenceClickListener((Preference$OnPreferenceClickListener)new·-$$Lambda$AppPermissionGroupsFragment$hFyaUi7fwk3rc6rOhrr5hw4eqGU(this,·switchPreference));
78 ········((Preference)switchPreference).setTitle(2131886176);78 ········((Preference)switchPreference).setTitle(2131886182);
79 ········((Preference)switchPreference).setKey("_AUTO_REVOKE_SWITCH_KEY");79 ········((Preference)switchPreference).setKey("_AUTO_REVOKE_SWITCH_KEY");
80 ········((PreferenceGroup)preferenceCategory).addPreference((Preference)switchPreference);80 ········((PreferenceGroup)preferenceCategory).addPreference((Preference)switchPreference);
81 ········final·Preference·preference·=·new·Preference(context);81 ········final·Preference·preference·=·new·Preference(context);
82 ········preference.setIcon(Utils.applyTint((Context)((Fragment)this).getActivity(),·2131230887,·16843817));82 ········preference.setIcon(Utils.applyTint((Context)((Fragment)this).getActivity(),·2131230889,·16843817));
83 ········preference.setKey("_AUTO_REVOKE_SUMMARY_KEY");83 ········preference.setKey("_AUTO_REVOKE_SUMMARY_KEY");
84 ········((PreferenceGroup)preferenceCategory).addPreference(preference);84 ········((PreferenceGroup)preferenceCategory).addPreference(preference);
85 ····}85 ····}
86 ····86 ····
87 ····private·static·void·bindUi(final·SettingsWithLargeHeader·settingsWithLargeHeader,·final·String·s,·final·UserHandle·userHandle)·{87 ····private·static·void·bindUi(final·SettingsWithLargeHeader·settingsWithLargeHeader,·final·String·s,·final·UserHandle·userHandle)·{
88 ········final·FragmentActivity·activity·=·((Fragment)settingsWithLargeHeader).getActivity();88 ········final·FragmentActivity·activity·=·((Fragment)settingsWithLargeHeader).getActivity();
89 ········final·boolean·booleanExtra·=·((Activity)activity).getIntent().getBooleanExtra("hideInfoButton",·false);89 ········final·boolean·booleanExtra·=·((Activity)activity).getIntent().getBooleanExtra("hideInfoButton",·false);
Offset 123, 24 lines modifiedOffset 123, 24 lines modified
123 ····}123 ····}
124 ····124 ····
125 ····private·void·logAppPermissionGroupsFragmentView()·{125 ····private·void·logAppPermissionGroupsFragmentView()·{
126 ········final·Context·context·=·((PreferenceFragmentCompat)this).getPreferenceManager().getContext();126 ········final·Context·context·=·((PreferenceFragmentCompat)this).getPreferenceManager().getContext();
127 ········if·(context·==·null)·{127 ········if·(context·==·null)·{
128 ············return;128 ············return;
129 ········}129 ········}
130 ········final·String·string·=·context.getString(2131886413);130 ········final·String·string·=·context.getString(2131886428);
131 ········final·long·long1·=·((Fragment)this).getArguments().getLong("com.android.permissioncontroller.extra.SESSION_ID",·0L);131 ········final·long·long1·=·((Fragment)this).getArguments().getLong("com.android.permissioncontroller.extra.SESSION_ID",·0L);
132 ········final·long·nextLong·=·new·Random().nextLong();132 ········final·long·nextLong·=·new·Random().nextLong();
133 ········final·PreferenceCategory·preferenceCategory·=·(PreferenceCategory)((PreferenceFragmentCompat)this).findPreference((CharSequence)Category.ALLOWED.getCategoryName());133 ········final·PreferenceCategory·preferenceCategory·=·(PreferenceCategory)((PreferenceFragmentCompat)this).findPreference((CharSequence)Category.ALLOWED.getCategoryName());
134 ········final·int·preferenceCount·=·((PreferenceGroup)preferenceCategory).getPreferenceCount();134 ········final·int·preferenceCount·=·((PreferenceGroup)preferenceCategory).getPreferenceCount();
135 ········int·i·=·0;135 ········int·i·=·0;
136 ········int·n;136 ········int·n;
137 ········for·(int·j·=·0;·j·<·preferenceCount;·j·=·n·+·1)·{137 ········for·(int·j·=·0;·j·<·preferenceCount;·j·=·n·+·1)·{
138 ············final·Preference·preference·=·((PreferenceGroup)preferenceCategory).getPreference(j);138 ············final·Preference·preference·=·((PreferenceGroup)preferenceCategory).getPreference(j);
139 ············if·(preference.getTitle().equals(((Fragment)this).getString(2131886352)))·{139 ············if·(preference.getTitle().equals(((Fragment)this).getString(2131886361)))·{
140 ················n·=·j;140 ················n·=·j;
141 ············}141 ············}
142 ············else·{142 ············else·{
143 ················int·n2;143 ················int·n2;
144 ················if·(preference.getSummary()·!=·null·&&·string.contentEquals(preference.getSummary()))·{144 ················if·(preference.getSummary()·!=·null·&&·string.contentEquals(preference.getSummary()))·{
145 ····················n2·=·2;145 ····················n2·=·2;
146 ················}146 ················}
Offset 150, 15 lines modifiedOffset 150, 15 lines modified
150 ················final·String·key·=·preference.getKey();150 ················final·String·key·=·preference.getKey();
151 ················n·=·j;151 ················n·=·j;
152 ················this.logAppPermissionsFragmentViewEntry(long1,·nextLong,·key,·n2);152 ················this.logAppPermissionsFragmentViewEntry(long1,·nextLong,·key,·n2);
153 ············}153 ············}
154 ········}154 ········}
155 ········for·(PreferenceCategory·preferenceCategory2·=·(PreferenceCategory)((PreferenceFragmentCompat)this).findPreference((CharSequence)Category.DENIED.getCategoryName());·i·<·((PreferenceGroup)preferenceCategory2).getPreferenceCount();·++i)·{155 ········for·(PreferenceCategory·preferenceCategory2·=·(PreferenceCategory)((PreferenceFragmentCompat)this).findPreference((CharSequence)Category.DENIED.getCategoryName());·i·<·((PreferenceGroup)preferenceCategory2).getPreferenceCount();·++i)·{
156 ············final·Preference·preference2·=·((PreferenceGroup)preferenceCategory2).getPreference(i);156 ············final·Preference·preference2·=·((PreferenceGroup)preferenceCategory2).getPreference(i);
157 ············if·(!preference2.getTitle().equals(((Fragment)this).getString(2131886353)))·{157 ············if·(!preference2.getTitle().equals(((Fragment)this).getString(2131886362)))·{
158 ················this.logAppPermissionsFragmentViewEntry(long1,·nextLong,·preference2.getKey(),·3);158 ················this.logAppPermissionsFragmentViewEntry(long1,·nextLong,·preference2.getKey(),·3);
159 ············}159 ············}
160 ········}160 ········}
161 ····}161 ····}
162 ····162 ····
163 ····private·void·logAppPermissionsFragmentViewEntry(final·long·n,·final·long·n2,·final·String·s,·final·int·n3)·{163 ····private·void·logAppPermissionsFragmentViewEntry(final·long·n,·final·long·n2,·final·String·s,·final·int·n3)·{
164 ········final·Integer·packageUid·=·KotlinUtils.INSTANCE.getPackageUid(((Activity)((Fragment)this).getActivity()).getApplication(),·this.mPackageName,·this.mUser);164 ········final·Integer·packageUid·=·KotlinUtils.INSTANCE.getPackageUid(((Activity)((Fragment)this).getActivity()).getApplication(),·this.mPackageName,·this.mUser);
Offset 186, 38 lines modifiedOffset 186, 40 lines modified
186 ····private·void·setAutoRevokeToggleState(final·AutoRevokeState·autoRevokeState)·{186 ····private·void·setAutoRevokeToggleState(final·AutoRevokeState·autoRevokeState)·{
187 ········if·(autoRevokeState·!=·null·&&·this.mViewModel.getPackagePermGroupsLiveData().isInitialized()·&&·((PreferenceFragmentCompat)this).getListView()·!=·null)·{187 ········if·(autoRevokeState·!=·null·&&·this.mViewModel.getPackagePermGroupsLiveData().isInitialized()·&&·((PreferenceFragmentCompat)this).getListView()·!=·null)·{
188 ············if·(((Fragment)this).getView()·!=·null)·{188 ············if·(((Fragment)this).getView()·!=·null)·{
189 ················final·PreferenceCategory·preferenceCategory·=·(PreferenceCategory)((PreferenceGroup)((PreferenceFragmentCompat)this).getPreferenceScreen()).findPreference((CharSequence)"_AUTO_REVOKE_KEY");189 ················final·PreferenceCategory·preferenceCategory·=·(PreferenceCategory)((PreferenceGroup)((PreferenceFragmentCompat)this).getPreferenceScreen()).findPreference((CharSequence)"_AUTO_REVOKE_KEY");
190 ················final·SwitchPreference·switchPreference·=·(SwitchPreference)((PreferenceGroup)preferenceCategory).findPreference((CharSequence)"_AUTO_REVOKE_SWITCH_KEY");190 ················final·SwitchPreference·switchPreference·=·(SwitchPreference)((PreferenceGroup)preferenceCategory).findPreference((CharSequence)"_AUTO_REVOKE_SWITCH_KEY");
191 ················final·Preference·preference·=·((PreferenceGroup)preferenceCategory).findPreference((CharSequence)"_AUTO_REVOKE_SUMMARY_KEY");191 ················final·Preference·preference·=·((PreferenceGroup)preferenceCategory).findPreference((CharSequence)"_AUTO_REVOKE_SUMMARY_KEY");
192 ················if·(autoRevokeState.isEnabledGlobal()·&&·autoRevokeState.getShouldShowSwitch())·{192 ················if·(autoRevokeState.isEnabledGlobal()·&&·autoRevokeState.getShouldShowSwitch())·{
193 ····················final·int·n·=·1;193 ····················final·int·visible·=·1;
194 ····················((Preference)switchPreference).setVisible((boolean)(n·!=·0));194 ····················((Preference)preferenceCategory).setVisible((boolean)(visible·!=·0));
195 ····················preference.setVisible((boolean)(n·!=·0));195 ····················((Preference)switchPreference).setVisible((boolean)(visible·!=·0));
 196 ····················preference.setVisible((boolean)(visible·!=·0));
196 ····················((TwoStatePreference)switchPreference).setChecked(autoRevokeState.isEnabledForApp());197 ····················((TwoStatePreference)switchPreference).setChecked(autoRevokeState.isEnabledForApp());
197 ····················final·ArrayList<String>·list·=·new·ArrayList<String>();198 ····················final·ArrayList<String>·list·=·new·ArrayList<String>();
198 ····················final·Iterator<String>·iterator·=·autoRevokeState.getRevocableGroupNames().iterator();199 ····················final·Iterator<String>·iterator·=·autoRevokeState.getRevocableGroupNames().iterator();
199 ····················while·(iterator.hasNext())·{200 ····················while·(iterator.hasNext())·{
200 ························final·Preference·preference2·=·((PreferenceGroup)((PreferenceGroup)((PreferenceFragmentCompat)this).getPreferenceScreen()).findPreference((CharSequence)Category.ALLOWED.getCategoryName())).findPreference((CharSequence)(String)iterator.next());201 ························final·Preference·preference2·=·((PreferenceGroup)((PreferenceGroup)((PreferenceFragmentCompat)this).getPreferenceScreen()).findPreference((CharSequence)Category.ALLOWED.getCategoryName())).findPreference((CharSequence)(String)iterator.next());
201 ························if·(preference2·!=·null)·{202 ························if·(preference2·!=·null)·{
202 ····························list.add(preference2.getTitle().toString());203 ····························list.add(preference2.getTitle().toString());
203 ························}204 ························}
204 ····················}205 ····················}
205 ····················list.sort(this.mCollator);206 ····················list.sort(this.mCollator);
206 ····················if·(list.isEmpty())·{207 ····················if·(list.isEmpty())·{
207 ························preference.setSummary(2131886185);208 ························preference.setSummary(2131886191);
208 ····················}209 ····················}
209 ····················else·{210 ····················else·{
210 ························final·int·n2·=·2131886186;211 ························final·int·n·=·2131886192;
211 ························final·Object[]·array·=·new·Object[n];212 ························final·Object[]·array·=·new·Object[visible];
212 ························array[0]·=·ListFormatter.getInstance().format((Collection)list);213 ························array[0]·=·ListFormatter.getInstance().format((Collection)list);
213 ························preference.setSummary((CharSequence)((Fragment)this).getString(n2,·array));214 ························preference.setSummary((CharSequence)((Fragment)this).getString(n,·array));
214 ····················}215 ····················}
215 ····················return;216 ····················return;
216 ················}217 ················}
 218 ················((Preference)preferenceCategory).setVisible(false);
217 ················((Preference)switchPreference).setVisible(false);219 ················((Preference)switchPreference).setVisible(false);
218 ················preference.setVisible(false);220 ················preference.setVisible(false);
219 ············}221 ············}
220 ········}222 ········}
221 ····}223 ····}
222 ····224 ····
223 ····private·void·setNoPermissionPreference(final·PreferenceCategory·preferenceCategory,·final·int·n,·final·Context·context)·{225 ····private·void·setNoPermissionPreference(final·PreferenceCategory·preferenceCategory,·final·int·n,·final·Context·context)·{
Offset 226, 15 lines modifiedOffset 228, 15 lines modified
226 ········preference.setTitle((CharSequence)preference.getKey());228 ········preference.setTitle((CharSequence)preference.getKey());
227 ········preference.setSelectable(false);229 ········preference.setSelectable(false);
228 ········((PreferenceGroup)preferenceCategory).addPreference(preference);230 ········((PreferenceGroup)preferenceCategory).addPreference(preference);
229 ····}231 ····}
230 ····232 ····
231 ····private·Preference·setUpCustomPermissionsScreen(final·Context·context,·final·int·n,·final·String·s)·{233 ····private·Preference·setUpCustomPermissionsScreen(final·Context·context,·final·int·n,·final·String·s)·{
232 ········final·Preference·preference·=·new·Preference(context);234 ········final·Preference·preference·=·new·Preference(context);
233 ········preference.setIcon(Utils.applyTint((Context)((Fragment)this).getActivity(),·2131230911,·16843817));235 ········preference.setIcon(Utils.applyTint((Context)((Fragment)this).getActivity(),·2131230913,·16843817));
234 ········preference.setTitle(2131886112);236 ········preference.setTitle(2131886112);
235 ········final·StringBuilder·sb·=·new·StringBuilder();237 ········final·StringBuilder·sb·=·new·StringBuilder();
236 ········sb.append((Object)preference.getTitle());238 ········sb.append((Object)preference.getTitle());
237 ········sb.append(s);239 ········sb.append(s);
238 ········preference.setKey(sb.toString());240 ········preference.setKey(sb.toString());
239 ········preference.setOnPreferenceClickListener((Preference$OnPreferenceClickListener)new·-$$Lambda$AppPermissionGroupsFragment$LP0st3ccdhhTmtUZT8FqtFIHSWU(this));241 ········preference.setOnPreferenceClickListener((Preference$OnPreferenceClickListener)new·-$$Lambda$AppPermissionGroupsFragment$LP0st3ccdhhTmtUZT8FqtFIHSWU(this));
240 ········preference.setSummary((CharSequence)((Fragment)this).getResources().getQuantityString(2131755008,·n,·new·Object[]·{·n·}));242 ········preference.setSummary((CharSequence)((Fragment)this).getResources().getQuantityString(2131755008,·n,·new·Object[]·{·n·}));
Offset 296, 25 lines modifiedOffset 298, 25 lines modified
296 ················final·long·n4·=·long1;298 ················final·long·n4·=·long1;
297 ················final·Category·category2·=·category;299 ················final·Category·category2·=·category;
298 ················new·PermissionControlPreference(context,·mPackageName,·groupName,·mUser,·name,·long1,·categoryName,·b);300 ················new·PermissionControlPreference(context,·mPackageName,·groupName,·mUser,·name,·long1,·categoryName,·b);
299 ················((Preference)permissionControlPreference3).setTitle(KotlinUtils.INSTANCE.getPermGroupLabel(context,·groupName));301 ················((Preference)permissionControlPreference3).setTitle(KotlinUtils.INSTANCE.getPermGroupLabel(context,·groupName));
300 ················((Preference)permissionControlPreference3).setIcon(KotlinUtils.INSTANCE.getPermGroupIcon(context,·groupName));302 ················((Preference)permissionControlPreference3).setIcon(KotlinUtils.INSTANCE.getPermGroupIcon(context,·groupName));
301 ················((Preference)permissionControlPreference3).setKey(groupName);303 ················((Preference)permissionControlPreference3).setKey(groupName);
302 ················final·int·n5·=·AppPermissionGroupsFragment$1.$SwitchMap$com$android$permissioncontroller$permission$ui$model$AppPermissionGroupsViewModel$PermSubtitle[((Enum)appPermissionGroupsViewModel$GroupUiInfo.getSubtitle()).ordinal()];304 ················final·int·n5·=·AppPermissionGroupsFragment$1.$SwitchMap$com$android$permissioncontroller$permission$ui$model$AppPermissionGroupsViewModel$PermSubtitle[((Enum)appPermissionGroupsViewModel$GroupUiInfo.getSubtitle()).ordinal()];
303 ················final·int·n6·=·2131886413;305 ················final·int·n6·=·2131886428;
304 ················final·int·n7·=·1;306 ················final·int·n7·=·1;
305 ················final·float·n8·=·Float.MIN_VALUE;307 ················final·float·n8·=·Float.MIN_VALUE;
306 ················if·(n5·!=·n7)·{308 ················if·(n5·!=·n7)·{
307 ····················if·(n5·!=·2)·{309 ····················if·(n5·!=·2)·{
308 ························if·(n5·==·3)·{310 ························if·(n5·==·3)·{
309 ····························((Preference)permissionControlPreference3).setSummary(2131886411);311 ····························((Preference)permissionControlPreference3).setSummary(2131886426);
310 ························}312 ························}
311 ····················}313 ····················}
312 ····················else·{314 ····················else·{
313 ························((Preference)permissionControlPreference3).setSummary(2131886412);315 ························((Preference)permissionControlPreference3).setSummary(2131886427);
314 ····················}316 ····················}
315 ················}317 ················}
316 ················else·{318 ················else·{
317 ····················((Preference)permissionControlPreference3).setSummary(n6);319 ····················((Preference)permissionControlPreference3).setSummary(n6);
318 ················}320 ················}
319 ················if·(appPermissionGroupsViewModel$GroupUiInfo.getSubtitle()·==·AppPermissionGroupsViewModel$PermSubtitle.FOREGROUND_ONLY)·{321 ················if·(appPermissionGroupsViewModel$GroupUiInfo.getSubtitle()·==·AppPermissionGroupsViewModel$PermSubtitle.FOREGROUND_ONLY)·{
320 ····················((Preference)permissionControlPreference3).setSummary(n6);322 ····················((Preference)permissionControlPreference3).setSummary(n6);
Offset 339, 18 lines modifiedOffset 341, 18 lines modified
339 ············final·PreferenceCategory·preferenceCategory2·=·(PreferenceCategory)preference;341 ············final·PreferenceCategory·preferenceCategory2·=·(PreferenceCategory)preference;
340 ············final·int·n10·=·visible;342 ············final·int·n10·=·visible;
341 ············final·float·n11·=·n;343 ············final·float·n11·=·n;
342 ············final·long·n12·=·long1;344 ············final·long·n12·=·long1;
343 ············final·Category·category3·=·category;345 ············final·Category·category3·=·category;
344 ············int·n13;346 ············int·n13;
345 ············if·(((Enum)category).equals(Category.DENIED))·{347 ············if·(((Enum)category).equals(Category.DENIED))·{
346 ················n13·=·2131886353;348 ················n13·=·2131886362;
347 ············}349 ············}
348 ············else·{350 ············else·{
349 ················n13·=·2131886352;351 ················n13·=·2131886361;
350 ············}352 ············}
351 ············if·(n9·>·0)·{353 ············if·(n9·>·0)·{
352 ················((PreferenceGroup)preferenceCategory2).addPreference(this.setUpCustomPermissionsScreen(context,·n9,·category3.getCategoryName()));354 ················((PreferenceGroup)preferenceCategory2).addPreference(this.setUpCustomPermissionsScreen(context,·n9,·category3.getCategoryName()));
353 ············}355 ············}
354 ············if·(((PreferenceGroup)preferenceCategory2).getPreferenceCount()·==·0)·{356 ············if·(((PreferenceGroup)preferenceCategory2).getPreferenceCount()·==·0)·{
355 ················this.setNoPermissionPreference(preferenceCategory2,·n13,·context);357 ················this.setNoPermissionPreference(preferenceCategory2,·n13,·context);
356 ············}358 ············}
Offset 389, 20 lines modifiedOffset 391, 20 lines modified
389 ········}391 ········}
390 ····}392 ····}
391 ····393 ····
392 ····public·void·onCreateOptionsMenu(final·Menu·menu,·final·MenuInflater·menuInflater)·{394 ····public·void·onCreateOptionsMenu(final·Menu·menu,·final·MenuInflater·menuInflater)·{
393 ········super.onCreateOptionsMenu(menu,·menuInflater);395 ········super.onCreateOptionsMenu(menu,·menuInflater);
394 ········if·(this.mIsSystemPermsScreen)·{396 ········if·(this.mIsSystemPermsScreen)·{
395 ············menu.add(0,·2,·0,·2131886118);397 ············menu.add(0,·2,·0,·2131886118);
396 ············HelpUtils.prepareHelpMenuItem((Activity)((Fragment)this).getActivity(),·menu,·2131886266,·AppPermissionGroupsFragment.class.getName());398 ············HelpUtils.prepareHelpMenuItem((Activity)((Fragment)this).getActivity(),·menu,·2131886273,·AppPermissionGroupsFragment.class.getName());
397 ········}399 ········}
398 ····}400 ····}
399 ····401 ····
400 ····public·View·onCreateView(final·LayoutInflater·layoutInflater,·final·ViewGroup·viewGroup,·final·Bundle·bundle)·{402 ····public·View·onCreateView(final·LayoutInflater·layoutInflater,·final·ViewGroup·viewGroup,·final·Bundle·bundle)·{
401 ········((Activity)((Fragment)this).getActivity()).setTitle(2131886149);403 ········((Activity)((Fragment)this).getActivity()).setTitle(2131886154);
402 ········return·super.onCreateView(layoutInflater,·viewGroup,·bundle);404 ········return·super.onCreateView(layoutInflater,·viewGroup,·bundle);
403 ····}405 ····}
404 ····406 ····
405 ····public·boolean·onOptionsItemSelected(final·MenuItem·menuItem)·{407 ····public·boolean·onOptionsItemSelected(final·MenuItem·menuItem)·{
406 ········final·int·itemId·=·menuItem.getItemId();408 ········final·int·itemId·=·menuItem.getItemId();
407 ········final·int·n·=·2;409 ········final·int·n·=·2;
408 ········final·boolean·b·=·true;410 ········final·boolean·b·=·true;