Break direct calls to UserController object in AMS from activity classes (12/n)

Make calls from activity classes go through ActivityManagerInternal
interface to case UserController instead of calling AMS.mUserController
object directly. Note that calls to UserController should not hold the
AMS lock.

Bug: 80414790
Test: Existing tests pass
Change-Id: Ie56f08d10b62d609e9b5e31f45b5f0d6eed3a9d4
This commit is contained in:
Wale Ogunwale
2018-07-02 08:42:43 -07:00
parent 9333840e90
commit 86b7446c2b
16 changed files with 162 additions and 90 deletions

View File

@@ -22,6 +22,7 @@ import android.content.ComponentName;
import android.content.IIntentSender;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.content.pm.UserInfo;
import android.content.res.Configuration;
import android.os.Bundle;
import android.os.IBinder;
@@ -216,4 +217,16 @@ public abstract class ActivityManagerInternal {
public abstract void updateOomAdj();
public abstract void sendForegroundProfileChanged(int userId);
/**
* Returns whether the given user requires credential entry at this time. This is used to
* intercept activity launches for work apps when the Work Challenge is present.
*/
public abstract boolean shouldConfirmCredentials(int userId);
public abstract int[] getCurrentProfileIds();
public abstract UserInfo getCurrentUser();
public abstract void ensureNotSpecialUser(int userId);
public abstract boolean isCurrentProfile(int userId);
public abstract boolean hasStartedUserState(int userId);
public abstract void finishUserSwitch(Object uss);
}