Offset 1, 11 lines modifiedOffset 1, 13 lines modified
  
1 package·com.android.permissioncontroller.permission.ui.handheld;1 package·com.android.permissioncontroller.permission.ui.handheld;
  
2 import·androidx.recyclerview.widget.RecyclerView$ViewHolder;2 import·androidx.recyclerview.widget.RecyclerView$ViewHolder;
 3 import·com.android.permissioncontroller.permission.debug.UtilsKt;
 4 import·com.android.permissioncontroller.permission.model.AppPermissionUsage$GroupUsage;
3 import·android.content.res.Resources;5 import·android.content.res.Resources;
4 import·androidx.preference.Preference$OnPreferenceClickListener;6 import·androidx.preference.Preference$OnPreferenceClickListener;
5 import·android.text.TextUtils$TruncateAt;7 import·android.text.TextUtils$TruncateAt;
6 import·android.widget.TextView;8 import·android.widget.TextView;
7 import·android.view.View;9 import·android.view.View;
8 import·android.widget.ImageView;10 import·android.widget.ImageView;
9 import·android.view.LayoutInflater;11 import·android.view.LayoutInflater;
Offset 72, 16 lines modifiedOffset 74, 16 lines modified
72 ············i·=·(list.isEmpty()·?·1·:·0);74 ············i·=·(list.isEmpty()·?·1·:·0);
73 ············if·(i·==·0)·{75 ············if·(i·==·0)·{
74 ················i·=·0;76 ················i·=·0;
75 ················viewGroup.setVisibility(0);77 ················viewGroup.setVisibility(0);
76 ················viewGroup.removeAllViews();78 ················viewGroup.removeAllViews();
77 ················final·LayoutInflater·layoutInflater·=·(LayoutInflater)this.mContext.getSystemService((Class)LayoutInflater.class);79 ················final·LayoutInflater·layoutInflater·=·(LayoutInflater)this.mContext.getSystemService((Class)LayoutInflater.class);
78 ················while·(i·<·list.size())·{80 ················while·(i·<·list.size())·{
79 ····················final·ViewGroup·viewGroup2·=·(ViewGroup)layoutInflater.inflate(2131558644,·(ViewGroup)null);81 ····················final·ViewGroup·viewGroup2·=·(ViewGroup)layoutInflater.inflate(2131558646,·(ViewGroup)null);
80 ····················((ImageView)viewGroup2.requireViewById(2131362174)).setImageResource((int)(Integer)list.get(i));82 ····················((ImageView)viewGroup2.requireViewById(2131362178)).setImageResource((int)(Integer)list.get(i));
81 ····················viewGroup.addView((View)viewGroup2);83 ····················viewGroup.addView((View)viewGroup2);
82 ····················++i;84 ····················++i;
83 ················}85 ················}
84 ················return;86 ················return;
85 ············}87 ············}
86 ········}88 ········}
87 ········if·(viewGroup·!=·null)·{89 ········if·(viewGroup·!=·null)·{
Offset 89, 33 lines modifiedOffset 91, 107 lines modified
89 ········}91 ········}
90 ····}92 ····}
91 ····93 ····
92 ····public·void·onBindViewHolder(final·PreferenceViewHolder·preferenceViewHolder)·{94 ····public·void·onBindViewHolder(final·PreferenceViewHolder·preferenceViewHolder)·{
93 ········if·(this.mUseSmallerIcon)·{95 ········if·(this.mUseSmallerIcon)·{
94 ············final·ImageView·imageView·=·(ImageView)preferenceViewHolder.findViewById(16908294);96 ············final·ImageView·imageView·=·(ImageView)preferenceViewHolder.findViewById(16908294);
95 ············final·Resources·resources·=·this.mContext.getResources();97 ············final·Resources·resources·=·this.mContext.getResources();
96 ············final·int·n·=·2131165879;98 ············final·int·n·=·2131165881;
97 ············imageView.setMaxWidth(resources.getDimensionPixelSize(n));99 ············imageView.setMaxWidth(resources.getDimensionPixelSize(n));
98 ············imageView.setMaxHeight(this.mContext.getResources().getDimensionPixelSize(n));100 ············imageView.setMaxHeight(this.mContext.getResources().getDimensionPixelSize(n));
99 ········}101 ········}
100 ········super.onBindViewHolder(preferenceViewHolder);102 ········super.onBindViewHolder(preferenceViewHolder);
101 ········if·(this.mWidgetIcon·!=·null)·{103 ········if·(this.mWidgetIcon·!=·null)·{
102 ············((ImageView)preferenceViewHolder.findViewById(16908312).findViewById(2131362174)).setImageDrawable(this.mWidgetIcon);104 ············((ImageView)preferenceViewHolder.findViewById(16908312).findViewById(2131362178)).setImageDrawable(this.mWidgetIcon);
103 ········}105 ········}
104 ········if·(this.mEllipsizeEnd)·{106 ········if·(this.mEllipsizeEnd)·{
105 ············final·TextView·textView·=·(TextView)preferenceViewHolder.findViewById(16908310);107 ············final·TextView·textView·=·(TextView)preferenceViewHolder.findViewById(16908310);
106 ············textView.setMaxLines(1);108 ············textView.setMaxLines(1);
107 ············textView.setEllipsize(TextUtils$TruncateAt.END);109 ············textView.setEllipsize(TextUtils$TruncateAt.END);
108 ········}110 ········}
109 ········this.setIcons(preferenceViewHolder,·this.mSummaryIcons,·2131362445);111 ········this.setIcons(preferenceViewHolder,·this.mSummaryIcons,·2131362454);
110 ········this.setIcons(preferenceViewHolder,·this.mTitleIcons,·2131362480);112 ········this.setIcons(preferenceViewHolder,·this.mTitleIcons,·2131362491);
111 ········this.setOnPreferenceClickListener((Preference$OnPreferenceClickListener)new·-$$Lambda$PermissionControlPreference$w7Xk9szNdvHquUCKAzSia9QGn-w(this,·preferenceViewHolder));113 ········this.setOnPreferenceClickListener((Preference$OnPreferenceClickListener)new·-$$Lambda$PermissionControlPreference$w7Xk9szNdvHquUCKAzSia9QGn-w(this,·preferenceViewHolder));
112 ····}114 ····}
113 ····115 ····
114 ····public·void·setEllipsizeEnd()·{116 ····public·void·setEllipsizeEnd()·{
115 ········this.mEllipsizeEnd·=·true;117 ········this.mEllipsizeEnd·=·true;
116 ····}118 ····}
117 ····119 ····
 120 ····public·void·setRightIcon(final·Drawable·mWidgetIcon)·{
 121 ········this.mWidgetIcon·=·mWidgetIcon;
 122 ········this.setWidgetLayoutResource(2131558492);
 123 ····}
 124 ····
 125 ····public·void·setTitleIcons(final·List·mTitleIcons)·{
 126 ········this.mTitleIcons·=·mTitleIcons;
 127 ········this.setLayoutResource(2131558621);
 128 ····}
 129 ····
 130 ····public·void·setUsageSummary(final·AppPermissionUsage$GroupUsage·appPermissionUsage$GroupUsage,·final·String·s)·{
 131 ········final·long·backgroundAccessCount·=·appPermissionUsage$GroupUsage.getBackgroundAccessCount();
 132 ········final·String·name·=·appPermissionUsage$GroupUsage.getGroup().getName();
 133 ········final·boolean·equals·=·name.equals("android.permission-group.CAMERA");
 134 ········final·long·n·=·0L;
 135 ········long·accessDuration;
 136 ········if·(!equals·&&·!name.equals("android.permission-group.MICROPHONE"))·{
 137 ············accessDuration·=·n;
 138 ········}
 139 ········else·{
 140 ············accessDuration·=·appPermissionUsage$GroupUsage.getAccessDuration();
 141 ········}
 142 ········final·int·n2·=·lcmp(backgroundAccessCount,·n);
 143 ········final·int·n3·=·3;
 144 ········final·int·n4·=·2;
 145 ········final·int·n5·=·1;
 146 ········if·(n2·==·0)·{
 147 ············final·long·foregroundAccessCount·=·appPermissionUsage$GroupUsage.getForegroundAccessCount();
 148 ············if·(accessDuration·==·n)·{
 149 ················final·Resources·resources·=·this.mContext.getResources();
 150 ················final·int·n6·=·2131755016;
 151 ················final·int·n7·=·(int)foregroundAccessCount;
 152 ················final·Object[]·array·=·new·Object[n4];
 153 ················array[0]·=·s;
 154 ················array[n5]·=·foregroundAccessCount;
 155 ················this.setSummary((CharSequence)resources.getQuantityString(n6,·n7,·array));
 156 ············}
 157 ············else·{
 158 ················final·Resources·resources2·=·this.mContext.getResources();
 159 ················final·int·n8·=·2131755019;
 160 ················final·int·n9·=·(int)foregroundAccessCount;
 161 ················final·Object[]·array2·=·new·Object[n3];
 162 ················array2[0]·=·s;
 163 ················array2[n5]·=·foregroundAccessCount;
 164 ················array2[n4]·=·UtilsKt.getUsageDurationString(this.mContext,·appPermissionUsage$GroupUsage);
 165 ················this.setSummary((CharSequence)resources2.getQuantityString(n8,·n9,·array2));
 166 ············}
 167 ········}
 168 ········else·{
 169 ············final·long·accessCount·=·appPermissionUsage$GroupUsage.getAccessCount();
 170 ············if·(accessDuration·==·n)·{
 171 ················final·Resources·resources3·=·this.mContext.getResources();
 172 ················final·int·n10·=·2131755017;
 173 ················final·int·n11·=·(int)accessCount;
 174 ················final·Object[]·array3·=·new·Object[n3];
 175 ················array3[0]·=·s;
 176 ················array3[n5]·=·accessCount;
 177 ················array3[n4]·=·backgroundAccessCount;
 178 ················this.setSummary((CharSequence)resources3.getQuantityString(n10,·n11,·array3));
 179 ············}
 180 ············else·{
 181 ················final·Resources·resources4·=·this.mContext.getResources();
 182 ················final·int·n12·=·2131755018;
 183 ················final·int·n13·=·(int)accessCount;
 184 ················final·Object[]·array4·=·new·Object[4];
 185 ················array4[0]·=·s;
 186 ················array4[n5]·=·accessCount;
 187 ················array4[n4]·=·backgroundAccessCount;
 188 ················array4[n3]·=·UtilsKt.getUsageDurationString(this.mContext,·appPermissionUsage$GroupUsage);
 189 ················this.setSummary((CharSequence)resources4.getQuantityString(n12,·n13,·array4));
 190 ············}
 191 ········}
 192 ····}
 193 ····
118 ····public·void·useSmallerIcon()·{194 ····public·void·useSmallerIcon()·{
119 ········this.mUseSmallerIcon·=·true;195 ········this.mUseSmallerIcon·=·true;
120 ····}196 ····}
121 }197 }