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

Commit 9444bea9 authored by Suchi Amalapurapu's avatar Suchi Amalapurapu
Browse files

Add null checks for strings

parent ee2b21db
Loading
Loading
Loading
Loading
+45 −41
Original line number Diff line number Diff line
@@ -2884,6 +2884,7 @@ class PackageManagerService extends IPackageManager.Stub {
                int i;
                for (i=0; i<N; i++) {
                    PackageParser.Provider p = pkg.providers.get(i);
                    if (p.info.authority != null) {
                        String names[] = p.info.authority.split(";");
                        for (int j = 0; j < names.length; j++) {
                            if (mProviders.containsKey(names[j])) {
@@ -2900,6 +2901,7 @@ class PackageManagerService extends IPackageManager.Stub {
                    }
                }
            }
        }

        final String pkgName = pkg.packageName;
        
@@ -3103,6 +3105,7 @@ class PackageManagerService extends IPackageManager.Stub {
                mProvidersByComponent.put(new ComponentName(p.info.packageName,
                        p.info.name), p);
                p.syncable = p.info.isSyncable;
                if (p.info.authority != null) {
                    String names[] = p.info.authority.split(";");
                    p.info.authority = null;
                    for (int j = 0; j < names.length; j++) {
@@ -3137,6 +3140,7 @@ class PackageManagerService extends IPackageManager.Stub {
                                            ? other.getComponentName().getPackageName() : "?"));
                        }
                    }
                }
                if ((parseFlags&PackageParser.PARSE_CHATTY) != 0) {
                    if (r == null) {
                        r = new StringBuilder(256);