mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-27 02:55:50 +01:00
Merge branch 'master' of https://github.com/Freeyourgadget/Gadgetbridge
This commit is contained in:
commit
fe310a9df8
@ -48,6 +48,7 @@ public class AppBlacklistActivity extends GBActivity {
|
||||
};
|
||||
|
||||
private SharedPreferences sharedPrefs;
|
||||
private IdentityHashMap<ApplicationInfo, String> nameMap;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
@ -61,7 +62,7 @@ public class AppBlacklistActivity extends GBActivity {
|
||||
ListView appListView = (ListView) findViewById(R.id.appListView);
|
||||
|
||||
// sort the package list by label and blacklist status
|
||||
final IdentityHashMap<ApplicationInfo, String> nameMap = new IdentityHashMap<>(packageList.size());
|
||||
nameMap = new IdentityHashMap<>(packageList.size());
|
||||
for (ApplicationInfo ai : packageList) {
|
||||
CharSequence name = pm.getApplicationLabel(ai);
|
||||
if (name == null) {
|
||||
@ -98,7 +99,7 @@ public class AppBlacklistActivity extends GBActivity {
|
||||
CheckBox checkbox = (CheckBox) view.findViewById(R.id.item_checkbox);
|
||||
|
||||
deviceAppVersionAuthorLabel.setText(appInfo.packageName);
|
||||
deviceAppNameLabel.setText(appInfo.loadLabel(pm));
|
||||
deviceAppNameLabel.setText(nameMap.get(appInfo));
|
||||
deviceImageView.setImageDrawable(appInfo.loadIcon(pm));
|
||||
|
||||
checkbox.setChecked(GBApplication.blacklist.contains(appInfo.packageName));
|
||||
|
Loading…
Reference in New Issue
Block a user