summaryrefslogtreecommitdiffstats
path: root/core/java/android/app
diff options
context:
space:
mode:
authorNicolas Prevot <nprevot@google.com>2014-05-06 12:47:57 +0100
committerNicolas Prevot <nprevot@google.com>2014-05-06 13:54:48 +0100
commitc79586ede6dcd6a167bc8360f058cb5cc655b33d (patch)
tree06b4111aa0d02dabb8f4ee6e738ae4e17ee2a2fc /core/java/android/app
parent6fee7d4cf991a8d39bdefb782937250c87f60f25 (diff)
downloadframeworks_base-c79586ede6dcd6a167bc8360f058cb5cc655b33d.zip
frameworks_base-c79586ede6dcd6a167bc8360f058cb5cc655b33d.tar.gz
frameworks_base-c79586ede6dcd6a167bc8360f058cb5cc655b33d.tar.bz2
Cleaning code related to the forwarding intent filters.
Checking for INTERACT_ACROSS_USERS_FULL Adding equivalent methods in the PackageManager Change-Id: Iaa1328fa666613a78e67ca669ea045144275e895
Diffstat (limited to 'core/java/android/app')
-rw-r--r--core/java/android/app/ApplicationPackageManager.java25
-rw-r--r--core/java/android/app/admin/DevicePolicyManager.java10
-rw-r--r--core/java/android/app/admin/IDevicePolicyManager.aidl2
3 files changed, 31 insertions, 6 deletions
diff --git a/core/java/android/app/ApplicationPackageManager.java b/core/java/android/app/ApplicationPackageManager.java
index ab62427..efd3d86 100644
--- a/core/java/android/app/ApplicationPackageManager.java
+++ b/core/java/android/app/ApplicationPackageManager.java
@@ -1440,6 +1440,31 @@ final class ApplicationPackageManager extends PackageManager {
return null;
}
+ /**
+ * @hide
+ */
+ @Override
+ public void addForwardingIntentFilter(IntentFilter filter, boolean removable, int userIdOrig,
+ int userIdDest) {
+ try {
+ mPM.addForwardingIntentFilter(filter, removable, userIdOrig, userIdDest);
+ } catch (RemoteException e) {
+ // Should never happen!
+ }
+ }
+
+ /**
+ * @hide
+ */
+ @Override
+ public void clearForwardingIntentFilters(int userIdOrig) {
+ try {
+ mPM.clearForwardingIntentFilters(userIdOrig);
+ } catch (RemoteException e) {
+ // Should never happen!
+ }
+ }
+
private final ContextImpl mContext;
private final IPackageManager mPM;
diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java
index 6f68dfb..929bf65 100644
--- a/core/java/android/app/admin/DevicePolicyManager.java
+++ b/core/java/android/app/admin/DevicePolicyManager.java
@@ -173,12 +173,12 @@ public class DevicePolicyManager {
public static final String ACTION_SET_NEW_PASSWORD
= "android.app.action.SET_NEW_PASSWORD";
/**
- * Flag for {@link #forwardMatchingIntents}: the intents will forwarded to the primary user.
+ * Flag for {@link #addForwardingIntentFilter}: the intents will forwarded to the primary user.
*/
public static int FLAG_TO_PRIMARY_USER = 0x0001;
/**
- * Flag for {@link #forwardMatchingIntents}: the intents will be forwarded to the managed
+ * Flag for {@link #addForwardingIntentFilter}: the intents will be forwarded to the managed
* profile.
*/
public static int FLAG_TO_MANAGED_PROFILE = 0x0002;
@@ -1949,10 +1949,10 @@ public class DevicePolicyManager {
* @param admin Which {@link DeviceAdminReceiver} this request is associated with.
* @param filter if an intent matches this IntentFilter, then it can be forwarded.
*/
- public void forwardMatchingIntents(ComponentName admin, IntentFilter filter, int flags) {
+ public void addForwardingIntentFilter(ComponentName admin, IntentFilter filter, int flags) {
if (mService != null) {
try {
- mService.forwardMatchingIntents(admin, filter, flags);
+ mService.addForwardingIntentFilter(admin, filter, flags);
} catch (RemoteException e) {
Log.w(TAG, "Failed talking with device policy service", e);
}
@@ -1960,7 +1960,7 @@ public class DevicePolicyManager {
}
/**
- * Called by a profile owner to remove all the forwarding intent filters from the current user
+ * Called by a profile owner to remove the forwarding intent filters from the current user
* and from the owner.
* @param admin Which {@link DeviceAdminReceiver} this request is associated with.
*/
diff --git a/core/java/android/app/admin/IDevicePolicyManager.aidl b/core/java/android/app/admin/IDevicePolicyManager.aidl
index 495a5f9..e3090b6 100644
--- a/core/java/android/app/admin/IDevicePolicyManager.aidl
+++ b/core/java/android/app/admin/IDevicePolicyManager.aidl
@@ -120,6 +120,6 @@ interface IDevicePolicyManager {
Bundle getApplicationRestrictions(in ComponentName who, in String packageName);
void setUserRestriction(in ComponentName who, in String key, boolean enable);
- void forwardMatchingIntents(in ComponentName admin, in IntentFilter filter, int flags);
+ void addForwardingIntentFilter(in ComponentName admin, in IntentFilter filter, int flags);
void clearForwardingIntentFilters(in ComponentName admin);
}