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

Commit 7c0e899a authored by Alex Buynytskyy's avatar Alex Buynytskyy Committed by Automerger Merge Worker
Browse files

Merge "INSTALLER_V2 is a permanent permission protecting streaming APIs." into...

Merge "INSTALLER_V2 is a permanent permission protecting streaming APIs." into rvc-dev am: a614cef7 am: 46f946f1 am: e6eff503

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11707945

Change-Id: Ieefc2df0cf35359e5cbde61ebd6604a6f8fb1ac0
parents b4568cc7 e6eff503
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -3656,7 +3656,8 @@
         <p>The package installer v2 APIs are still a work in progress and we're
         currently validating they work in all scenarios.
         <p>Not for use by third-party applications.
         TODO(b/152310230): remove this permission once the APIs are confirmed to be sufficient.
         TODO(b/152310230): use this permission to protect only Incremental installations
         once the APIs are confirmed to be sufficient.
         @hide
    -->
    <permission android:name="com.android.permission.USE_INSTALLER_V2"
+1 −14
Original line number Diff line number Diff line
@@ -21,7 +21,6 @@ import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.content.pm.ApplicationInfo;
import android.content.pm.DataLoaderParamsParcel;
import android.content.pm.IDataLoader;
import android.content.pm.IDataLoaderManager;
@@ -122,19 +121,7 @@ public class DataLoaderManagerService extends SystemService {
                        ri.serviceInfo.packageName, ri.serviceInfo.name);
                // There should only be one matching provider inside the given package.
                // If there's more than one, return the first one found.
                try {
                    ApplicationInfo ai = pm.getApplicationInfo(resolved.getPackageName(), 0);
                    if (!ai.isPrivilegedApp()) {
                        Slog.w(TAG,
                                "Data loader: " + resolved + " is not a privileged app, skipping.");
                        continue;
                    }
                return resolved;
                } catch (PackageManager.NameNotFoundException ex) {
                    Slog.w(TAG,
                            "Privileged data loader: " + resolved + " not found, skipping.");
                }

            }
            Slog.e(TAG, "Didn't find any matching data loader service provider.");
            return null;