API Review: Improvements to RestrictionsManager API
Use an activity intent for local approval instead of a type.
Use PeristableBundle instead of Bundle.
Pass requestId as an explicit argument in cases where it's required.
Bug: 16400892
Change-Id: Id882033f17c39aa9cd63a7eeb73bb7b51f98cf5b
diff --git a/core/java/android/content/IRestrictionsManager.aidl b/core/java/android/content/IRestrictionsManager.aidl
index b1c0a3a..495ac2e 100644
--- a/core/java/android/content/IRestrictionsManager.aidl
+++ b/core/java/android/content/IRestrictionsManager.aidl
@@ -16,7 +16,9 @@
package android.content;
+import android.content.Intent;
import android.os.Bundle;
+import android.os.PersistableBundle;
/**
* Interface used by the RestrictionsManager
@@ -25,6 +27,8 @@
interface IRestrictionsManager {
Bundle getApplicationRestrictions(in String packageName);
boolean hasRestrictionsProvider();
- void requestPermission(in String packageName, in String requestTemplate, in Bundle requestData);
- void notifyPermissionResponse(in String packageName, in Bundle response);
+ void requestPermission(in String packageName, in String requestType, in String requestId,
+ in PersistableBundle requestData);
+ void notifyPermissionResponse(in String packageName, in PersistableBundle response);
+ Intent getLocalApprovalIntent();
}