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

Commit b8eb1cb7 authored by Christopher Tate's avatar Christopher Tate
Browse files

Be sure to include shared lib path info when dealing with agents

In particular, this ensures that on the client side the full classpath is known
and used by the class loader during execution of the agent.
parent cfc7f1aa
Loading
Loading
Loading
Loading
+15 −5
Original line number Diff line number Diff line
@@ -649,6 +649,7 @@ class BackupManagerService extends IBackupManager.Stub {
        int N = packages.size();
        for (int a = N-1; a >= 0; a--) {
            PackageInfo pkg = packages.get(a);
            try {
                ApplicationInfo app = pkg.applicationInfo;
                if (((app.flags&ApplicationInfo.FLAG_ALLOW_BACKUP) == 0)
                        || app.backupAgentName == null
@@ -656,6 +657,15 @@ class BackupManagerService extends IBackupManager.Stub {
                                pkg.packageName) != PackageManager.PERMISSION_GRANTED)) {
                    packages.remove(a);
                }
                else {
                    // we will need the shared library path, so look that up and store it here
                    app = mPackageManager.getApplicationInfo(pkg.packageName,
                            PackageManager.GET_SHARED_LIBRARY_FILES);
                    pkg.applicationInfo.sharedLibraryFiles = app.sharedLibraryFiles;
                }
            } catch (NameNotFoundException e) {
                packages.remove(a);
            }
        }
        return packages;
    }