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

Commit 0f001d3e authored by Kenny Root's avatar Kenny Root
Browse files

Try to avoid possible NPE

For some reason .getParent() appears to be returning null for a data
directory. We don't need to use the parent; we can just use the path.

Bug: 7151733
Change-Id: I5e17cc14fe53669882329d67d8a7b4ec35b81104
parent 568e3ebb
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -4108,7 +4108,7 @@ public class PackageManagerService extends IPackageManager.Stub {
                    }
                    }
                } else if (!isForwardLocked(pkg) && !isExternal(pkg)) {
                } else if (!isForwardLocked(pkg) && !isExternal(pkg)) {
                    // Update native library dir if it starts with /data/data
                    // Update native library dir if it starts with /data/data
                    if (nativeLibraryDir.getParent().startsWith(dataPathString)) {
                    if (nativeLibraryDir.getPath().startsWith(dataPathString)) {
                        setInternalAppNativeLibraryPath(pkg, pkgSetting);
                        setInternalAppNativeLibraryPath(pkg, pkgSetting);
                        nativeLibraryDir = new File(pkg.applicationInfo.nativeLibraryDir);
                        nativeLibraryDir = new File(pkg.applicationInfo.nativeLibraryDir);
                    }
                    }