Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/com/android/server/telecom/TelecomServiceImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -3887,6 +3887,16 @@ private boolean canGetPhoneAccount(String callingPackage, PhoneAccountHandle acc
// ignore
}

// Needed for calls with multi sim phones, since AA cannot hold
// READ_PRIVILEGED_PHONE_STATE as a sandboxed app, causing getPhoneAccount()
// to fail and SIM selection to never appear. Mirrors getUserSelectedOutgoingPhoneAccount.
try {
mContext.enforceCallingOrSelfPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE_ANDROID_AUTO, null);
return true;
} catch (SecurityException e) {
// ignore
}

try {
mContext.enforceCallingOrSelfPermission(READ_PRIVILEGED_PHONE_STATE, null);
return true;
Expand Down