Post system_server toasts as system_server
Test: atest com.android.cts.devicepolicy.MixedProfileOwnerTest#testPrintingPolicy Change-Id: I7ac337dee93bc3843ef2440c2ce7a3b6f7ce094e Fixes: 119169211
This commit is contained in:
@@ -146,13 +146,14 @@ public final class PrintManagerService extends SystemService {
|
||||
final long identity = Binder.clearCallingIdentity();
|
||||
try {
|
||||
disabledMessage = dpmi.getPrintingDisabledReasonForUser(callingUserId);
|
||||
|
||||
if (disabledMessage != null) {
|
||||
Toast.makeText(mContext, Looper.getMainLooper(), disabledMessage,
|
||||
Toast.LENGTH_LONG).show();
|
||||
}
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(identity);
|
||||
}
|
||||
if (disabledMessage != null) {
|
||||
Toast.makeText(mContext, Looper.getMainLooper(), disabledMessage,
|
||||
Toast.LENGTH_LONG).show();
|
||||
}
|
||||
try {
|
||||
adapter.start();
|
||||
} catch (RemoteException re) {
|
||||
|
||||
Reference in New Issue
Block a user