Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3bba3511 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Introduce CrossProfileApps API"

parents e33bc3b9 1b708e68
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -159,6 +159,7 @@ LOCAL_SRC_FILES += \
	core/java/android/content/ISyncServiceAdapter.aidl \
	core/java/android/content/ISyncStatusObserver.aidl \
	core/java/android/content/om/IOverlayManager.aidl \
	core/java/android/content/pm/crossprofile/ICrossProfileApps.aidl \
	core/java/android/content/pm/IDexModuleRegisterCallback.aidl \
	core/java/android/content/pm/ILauncherApps.aidl \
	core/java/android/content/pm/IOnAppsChangedListener.aidl \
+10 −0
Original line number Diff line number Diff line
@@ -9106,6 +9106,7 @@ package android.content {
    field public static final int CONTEXT_IGNORE_SECURITY = 2; // 0x2
    field public static final int CONTEXT_INCLUDE_CODE = 1; // 0x1
    field public static final int CONTEXT_RESTRICTED = 4; // 0x4
    field public static final java.lang.String CROSS_PROFILE_APPS_SERVICE = "crossprofileapps";
    field public static final java.lang.String DEVICE_POLICY_SERVICE = "device_policy";
    field public static final java.lang.String DISPLAY_SERVICE = "display";
    field public static final java.lang.String DOWNLOAD_SERVICE = "download";
@@ -11227,6 +11228,15 @@ package android.content.pm {
}
package android.content.pm.crossprofile {
  public class CrossProfileApps {
    method public java.util.List<android.os.UserHandle> getTargetUserProfiles();
    method public void startMainActivity(android.content.ComponentName, android.os.UserHandle, android.graphics.Rect, android.os.Bundle);
  }
}
package android.content.res {
  public class AssetFileDescriptor implements java.io.Closeable android.os.Parcelable {
+10 −0
Original line number Diff line number Diff line
@@ -9627,6 +9627,7 @@ package android.content {
    field public static final int CONTEXT_IGNORE_SECURITY = 2; // 0x2
    field public static final int CONTEXT_INCLUDE_CODE = 1; // 0x1
    field public static final int CONTEXT_RESTRICTED = 4; // 0x4
    field public static final java.lang.String CROSS_PROFILE_APPS_SERVICE = "crossprofileapps";
    field public static final java.lang.String DEVICE_POLICY_SERVICE = "device_policy";
    field public static final java.lang.String DISPLAY_SERVICE = "display";
    field public static final java.lang.String DOWNLOAD_SERVICE = "download";
@@ -11960,6 +11961,15 @@ package android.content.pm {
}
package android.content.pm.crossprofile {
  public class CrossProfileApps {
    method public java.util.List<android.os.UserHandle> getTargetUserProfiles();
    method public void startMainActivity(android.content.ComponentName, android.os.UserHandle, android.graphics.Rect, android.os.Bundle);
  }
}
package android.content.pm.permission {
  public final class RuntimePermissionPresentationInfo implements android.os.Parcelable {
+10 −0
Original line number Diff line number Diff line
@@ -9183,6 +9183,7 @@ package android.content {
    field public static final int CONTEXT_IGNORE_SECURITY = 2; // 0x2
    field public static final int CONTEXT_INCLUDE_CODE = 1; // 0x1
    field public static final int CONTEXT_RESTRICTED = 4; // 0x4
    field public static final java.lang.String CROSS_PROFILE_APPS_SERVICE = "crossprofileapps";
    field public static final java.lang.String DEVICE_POLICY_SERVICE = "device_policy";
    field public static final java.lang.String DISPLAY_SERVICE = "display";
    field public static final java.lang.String DOWNLOAD_SERVICE = "download";
@@ -11316,6 +11317,15 @@ package android.content.pm {
}
package android.content.pm.crossprofile {
  public class CrossProfileApps {
    method public java.util.List<android.os.UserHandle> getTargetUserProfiles();
    method public void startMainActivity(android.content.ComponentName, android.os.UserHandle, android.graphics.Rect, android.os.Bundle);
  }
}
package android.content.res {
  public class AssetFileDescriptor implements java.io.Closeable android.os.Parcelable {
+14 −0
Original line number Diff line number Diff line
@@ -41,6 +41,8 @@ import android.content.pm.IShortcutService;
import android.content.pm.LauncherApps;
import android.content.pm.PackageManager;
import android.content.pm.ShortcutManager;
import android.content.pm.crossprofile.CrossProfileApps;
import android.content.pm.crossprofile.ICrossProfileApps;
import android.content.res.Resources;
import android.hardware.ConsumerIrManager;
import android.hardware.ISerialManager;
@@ -922,6 +924,18 @@ final class SystemServiceRegistry {
            public RulesManager createService(ContextImpl ctx) {
                return new RulesManager(ctx.getOuterContext());
            }});

        registerService(Context.CROSS_PROFILE_APPS_SERVICE, CrossProfileApps.class,
                new CachedServiceFetcher<CrossProfileApps>() {
                    @Override
                    public CrossProfileApps createService(ContextImpl ctx)
                            throws ServiceNotFoundException {
                        IBinder b = ServiceManager.getServiceOrThrow(
                                Context.CROSS_PROFILE_APPS_SERVICE);
                        return new CrossProfileApps(ctx.getOuterContext(),
                                ICrossProfileApps.Stub.asInterface(b));
                    }
                });
    }

    /**
Loading