Merge "INSTALLER_V2 is a permanent permission protecting streaming APIs." into rvc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
a614cef78d
@@ -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"
|
||||
|
||||
@@ -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.");
|
||||
}
|
||||
|
||||
return resolved;
|
||||
}
|
||||
Slog.e(TAG, "Didn't find any matching data loader service provider.");
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user