Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 99b22cba authored by lindatseng's avatar lindatseng Committed by Linda Tseng
Browse files

Avoid NPE in app storage page

Adding null check for ProviderInfo. Skip adding count to map if
the Provider cannot be found, to avoid NPE.

Fixes: 128368170
Test: Manual
Change-Id: I3d3b5301e6ca25a671077c9b93ada89be46e23fd
parent 30d0e6c7
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -421,6 +421,10 @@ public class AppStorageSettings extends AppInfoWithHeader
        for (GrantedUriPermission perm : perms) {
            String authority = perm.uri.getAuthority();
            ProviderInfo provider = pm.resolveContentProvider(authority, 0);
            if (provider == null) {
                continue;
            }

            CharSequence app = provider.applicationInfo.loadLabel(pm);
            MutableInt count = uriCounters.get(app);
            if (count == null) {