Merge "Propagate calling UID to AM from CrossProfileApps" into pi-dev

This commit is contained in:
android-build-team Robot
2018-05-04 19:35:44 +00:00
committed by Android (Google) Code Review
4 changed files with 68 additions and 26 deletions

View File

@@ -64,7 +64,11 @@ public class CrossProfileApps {
public void startMainActivity(@NonNull ComponentName component,
@NonNull UserHandle targetUser) {
try {
mService.startActivityAsUser(mContext.getPackageName(), component, targetUser);
mService.startActivityAsUser(
mContext.getIApplicationThread(),
mContext.getPackageName(),
component,
targetUser);
} catch (RemoteException ex) {
throw ex.rethrowFromSystemServer();
}

View File

@@ -16,6 +16,7 @@
package android.content.pm;
import android.app.IApplicationThread;
import android.content.ComponentName;
import android.content.Intent;
import android.graphics.Rect;
@@ -26,7 +27,7 @@ import android.os.UserHandle;
* @hide
*/
interface ICrossProfileApps {
void startActivityAsUser(in String callingPackage, in ComponentName component,
in UserHandle user);
void startActivityAsUser(in IApplicationThread caller, in String callingPackage,
in ComponentName component, in UserHandle user);
List<UserHandle> getTargetUserProfiles(in String callingPackage);
}