Merge "Make ATMService#mUiContext mockable" into tm-qpr-dev am: de5f0ae846 am: d0eb2c42e4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19907890 Change-Id: I95221660a3dd69c1694fa3683c115dbc7f994eec Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -2120,7 +2120,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
|
||||
|
||||
mActivityRecordInputSink = new ActivityRecordInputSink(this, sourceRecord);
|
||||
|
||||
updateEnterpriseThumbnailDrawable(mAtmService.mUiContext);
|
||||
updateEnterpriseThumbnailDrawable(mAtmService.getUiContext());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -7424,7 +7424,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
|
||||
}
|
||||
final Rect frame = win.getRelativeFrame();
|
||||
final Drawable thumbnailDrawable = task.mUserId == mWmService.mCurrentUserId
|
||||
? mAtmService.mUiContext.getDrawable(R.drawable.ic_account_circle)
|
||||
? mAtmService.getUiContext().getDrawable(R.drawable.ic_account_circle)
|
||||
: mEnterpriseThumbnailDrawable;
|
||||
final HardwareBuffer thumbnail = getDisplayContent().mAppTransition
|
||||
.createCrossProfileAppsThumbnail(thumbnailDrawable, frame);
|
||||
|
||||
@@ -345,7 +345,7 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
|
||||
* This Context is themable and meant for UI display (AlertDialogs, etc.). The theme can
|
||||
* change at runtime. Use mContext for non-UI purposes.
|
||||
*/
|
||||
final Context mUiContext;
|
||||
private final Context mUiContext;
|
||||
final ActivityThread mSystemThread;
|
||||
H mH;
|
||||
UiHandler mUiHandler;
|
||||
@@ -1040,6 +1040,10 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
|
||||
}
|
||||
}
|
||||
|
||||
Context getUiContext() {
|
||||
return mUiContext;
|
||||
}
|
||||
|
||||
UserManagerService getUserManager() {
|
||||
if (mUserManager == null) {
|
||||
IBinder b = ServiceManager.getService(Context.USER_SERVICE);
|
||||
|
||||
@@ -421,7 +421,7 @@ public class DisplayPolicy {
|
||||
mService = service;
|
||||
mContext = displayContent.isDefaultDisplay ? service.mContext
|
||||
: service.mContext.createDisplayContext(displayContent.getDisplay());
|
||||
mUiContext = displayContent.isDefaultDisplay ? service.mAtmService.mUiContext
|
||||
mUiContext = displayContent.isDefaultDisplay ? service.mAtmService.getUiContext()
|
||||
: service.mAtmService.mSystemThread
|
||||
.getSystemUiContext(displayContent.getDisplayId());
|
||||
mDisplayContent = displayContent;
|
||||
|
||||
Reference in New Issue
Block a user