Allow silent package install for device owner.
Allow the device owner to silently install and remove packages using the PackageInstaller APIs. Show notifications to the user after the installation / deletion was successful. Bug: 19422461 Change-Id: I0506e18c510efd9d04c4aea9b60a37456e689615
This commit is contained in:
@@ -44,7 +44,8 @@ interface IPackageInstaller {
|
||||
void registerCallback(IPackageInstallerCallback callback, int userId);
|
||||
void unregisterCallback(IPackageInstallerCallback callback);
|
||||
|
||||
void uninstall(String packageName, int flags, in IntentSender statusReceiver, int userId);
|
||||
void uninstall(String packageName, String callerPackageName, int flags,
|
||||
in IntentSender statusReceiver, int userId);
|
||||
|
||||
void setPermissionsResult(int sessionId, boolean accepted);
|
||||
}
|
||||
|
||||
@@ -423,7 +423,7 @@ public class PackageInstaller {
|
||||
*/
|
||||
public void uninstall(@NonNull String packageName, @NonNull IntentSender statusReceiver) {
|
||||
try {
|
||||
mInstaller.uninstall(packageName, 0, statusReceiver, mUserId);
|
||||
mInstaller.uninstall(packageName, mInstallerPackageName, 0, statusReceiver, mUserId);
|
||||
} catch (RemoteException e) {
|
||||
throw e.rethrowAsRuntimeException();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user