Loading core/java/android/app/ApplicationPackageManager.java +14 −0 Original line number Original line Diff line number Diff line Loading @@ -3285,6 +3285,20 @@ public class ApplicationPackageManager extends PackageManager { } } } } /** * @hide */ @Override public boolean removeCrossProfileIntentFilter(IntentFilter filter, int sourceUserId, int targetUserId, int flags) { try { return mPM.removeCrossProfileIntentFilter(filter, mContext.getOpPackageName(), sourceUserId, targetUserId, flags); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } /** /** * @hide * @hide */ */ Loading core/java/android/content/pm/IPackageManager.aidl +3 −0 Original line number Original line Diff line number Diff line Loading @@ -281,6 +281,9 @@ interface IPackageManager { void addCrossProfileIntentFilter(in IntentFilter intentFilter, String ownerPackage, void addCrossProfileIntentFilter(in IntentFilter intentFilter, String ownerPackage, int sourceUserId, int targetUserId, int flags); int sourceUserId, int targetUserId, int flags); boolean removeCrossProfileIntentFilter(in IntentFilter intentFilter, String ownerPackage, int sourceUserId, int targetUserId, int flags); void clearCrossProfileIntentFilters(int sourceUserId, String ownerPackage); void clearCrossProfileIntentFilters(int sourceUserId, String ownerPackage); String[] setDistractingPackageRestrictionsAsUser(in String[] packageNames, int restrictionFlags, String[] setDistractingPackageRestrictionsAsUser(in String[] packageNames, int restrictionFlags, Loading core/java/android/content/pm/PackageManager.java +17 −0 Original line number Original line Diff line number Diff line Loading @@ -9632,6 +9632,23 @@ public abstract class PackageManager { public abstract void addCrossProfileIntentFilter(@NonNull IntentFilter filter, public abstract void addCrossProfileIntentFilter(@NonNull IntentFilter filter, @UserIdInt int sourceUserId, @UserIdInt int targetUserId, int flags); @UserIdInt int sourceUserId, @UserIdInt int targetUserId, int flags); /** * Removes all {@code CrossProfileIntentFilter}s which matches the specified intent filer, * source, target and flag. * * @param filter The {@link IntentFilter} the intent has to match * @param sourceUserId The source user id. * @param targetUserId The target user id. * @param flags The possible values are {@link #SKIP_CURRENT_PROFILE} and * {@link #ONLY_IF_NO_MATCH_FOUND}. * @hide */ public boolean removeCrossProfileIntentFilter(@NonNull IntentFilter filter, @UserIdInt int sourceUserId, @UserIdInt int targetUserId, int flags) { throw new UnsupportedOperationException( "removeCrossProfileIntentFilter not implemented in subclass"); } /** /** * Clearing {@code CrossProfileIntentFilter}s which have the specified user * Clearing {@code CrossProfileIntentFilter}s which have the specified user * as their source, and have been set by the app calling this method. * as their source, and have been set by the app calling this method. Loading services/core/java/com/android/server/pm/DefaultCrossProfileIntentFilter.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -30,7 +30,7 @@ import java.lang.annotation.RetentionPolicy; * Representation of an immutable default cross-profile intent filter. * Representation of an immutable default cross-profile intent filter. */ */ @Immutable @Immutable final class DefaultCrossProfileIntentFilter { public final class DefaultCrossProfileIntentFilter { @IntDef({ @IntDef({ Direction.TO_PARENT, Direction.TO_PARENT, Loading services/core/java/com/android/server/pm/DefaultCrossProfileIntentFiltersUtils.java +9 −0 Original line number Original line Diff line number Diff line Loading @@ -320,6 +320,15 @@ public class DefaultCrossProfileIntentFiltersUtils { MOBILE_NETWORK_SETTINGS); MOBILE_NETWORK_SETTINGS); } } /** * Returns default telephony related intent filters for managed profile. */ public static List<DefaultCrossProfileIntentFilter> getDefaultManagedProfileTelephonyFilters() { return Arrays.asList( DIAL_DATA, SMS_MMS); } /** /** * Clone profile's DefaultCrossProfileIntentFilter * Clone profile's DefaultCrossProfileIntentFilter */ */ Loading Loading
core/java/android/app/ApplicationPackageManager.java +14 −0 Original line number Original line Diff line number Diff line Loading @@ -3285,6 +3285,20 @@ public class ApplicationPackageManager extends PackageManager { } } } } /** * @hide */ @Override public boolean removeCrossProfileIntentFilter(IntentFilter filter, int sourceUserId, int targetUserId, int flags) { try { return mPM.removeCrossProfileIntentFilter(filter, mContext.getOpPackageName(), sourceUserId, targetUserId, flags); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } /** /** * @hide * @hide */ */ Loading
core/java/android/content/pm/IPackageManager.aidl +3 −0 Original line number Original line Diff line number Diff line Loading @@ -281,6 +281,9 @@ interface IPackageManager { void addCrossProfileIntentFilter(in IntentFilter intentFilter, String ownerPackage, void addCrossProfileIntentFilter(in IntentFilter intentFilter, String ownerPackage, int sourceUserId, int targetUserId, int flags); int sourceUserId, int targetUserId, int flags); boolean removeCrossProfileIntentFilter(in IntentFilter intentFilter, String ownerPackage, int sourceUserId, int targetUserId, int flags); void clearCrossProfileIntentFilters(int sourceUserId, String ownerPackage); void clearCrossProfileIntentFilters(int sourceUserId, String ownerPackage); String[] setDistractingPackageRestrictionsAsUser(in String[] packageNames, int restrictionFlags, String[] setDistractingPackageRestrictionsAsUser(in String[] packageNames, int restrictionFlags, Loading
core/java/android/content/pm/PackageManager.java +17 −0 Original line number Original line Diff line number Diff line Loading @@ -9632,6 +9632,23 @@ public abstract class PackageManager { public abstract void addCrossProfileIntentFilter(@NonNull IntentFilter filter, public abstract void addCrossProfileIntentFilter(@NonNull IntentFilter filter, @UserIdInt int sourceUserId, @UserIdInt int targetUserId, int flags); @UserIdInt int sourceUserId, @UserIdInt int targetUserId, int flags); /** * Removes all {@code CrossProfileIntentFilter}s which matches the specified intent filer, * source, target and flag. * * @param filter The {@link IntentFilter} the intent has to match * @param sourceUserId The source user id. * @param targetUserId The target user id. * @param flags The possible values are {@link #SKIP_CURRENT_PROFILE} and * {@link #ONLY_IF_NO_MATCH_FOUND}. * @hide */ public boolean removeCrossProfileIntentFilter(@NonNull IntentFilter filter, @UserIdInt int sourceUserId, @UserIdInt int targetUserId, int flags) { throw new UnsupportedOperationException( "removeCrossProfileIntentFilter not implemented in subclass"); } /** /** * Clearing {@code CrossProfileIntentFilter}s which have the specified user * Clearing {@code CrossProfileIntentFilter}s which have the specified user * as their source, and have been set by the app calling this method. * as their source, and have been set by the app calling this method. Loading
services/core/java/com/android/server/pm/DefaultCrossProfileIntentFilter.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -30,7 +30,7 @@ import java.lang.annotation.RetentionPolicy; * Representation of an immutable default cross-profile intent filter. * Representation of an immutable default cross-profile intent filter. */ */ @Immutable @Immutable final class DefaultCrossProfileIntentFilter { public final class DefaultCrossProfileIntentFilter { @IntDef({ @IntDef({ Direction.TO_PARENT, Direction.TO_PARENT, Loading
services/core/java/com/android/server/pm/DefaultCrossProfileIntentFiltersUtils.java +9 −0 Original line number Original line Diff line number Diff line Loading @@ -320,6 +320,15 @@ public class DefaultCrossProfileIntentFiltersUtils { MOBILE_NETWORK_SETTINGS); MOBILE_NETWORK_SETTINGS); } } /** * Returns default telephony related intent filters for managed profile. */ public static List<DefaultCrossProfileIntentFilter> getDefaultManagedProfileTelephonyFilters() { return Arrays.asList( DIAL_DATA, SMS_MMS); } /** /** * Clone profile's DefaultCrossProfileIntentFilter * Clone profile's DefaultCrossProfileIntentFilter */ */ Loading