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

Commit d4205fe1 authored by Nicolas Prévot's avatar Nicolas Prévot Committed by Android (Google) Code Review
Browse files

Merge "Don't crash in AccountManagerService if a uid has no packages"

parents 5c5e31ae f7d8df19
Loading
Loading
Loading
Loading
+9 −7
Original line number Diff line number Diff line
@@ -928,6 +928,7 @@ public class AccountManagerService
        String interestedPackages = null;
        try {
            String[] allPackages = mPackageManager.getPackagesForUid(uid);
            if (allPackages != null) {
                for(String aPackage : allPackages) {
                    ApplicationInfo ai = mPackageManager.getApplicationInfo(aPackage,
                            PackageManager.GET_META_DATA);
@@ -937,6 +938,7 @@ public class AccountManagerService
                    }
                    interestedPackages = b.getString("android.accounts.SupportedLoginTypes");
                }
            }
        } catch (PackageManager.NameNotFoundException e) {
            Log.d("NameNotFoundException", e.getMessage());
        }