Loading src/com/android/server/telecom/TelecomServiceImpl.java +17 −1 Original line number Diff line number Diff line Loading @@ -181,7 +181,12 @@ public class TelecomServiceImpl { boolean includeDisabledAccounts, String callingPackage) { try { Log.startSession("TSI.gCCPA"); if (!canReadPhoneState(callingPackage, "getDefaultOutgoingPhoneAccount")) { if (includeDisabledAccounts && !canReadPrivilegedPhoneState( callingPackage, "getCallCapablePhoneAccounts")) { return Collections.emptyList(); } if (!canReadPhoneState(callingPackage, "getCallCapablePhoneAccounts")) { return Collections.emptyList(); } synchronized (mLock) { Loading Loading @@ -2027,6 +2032,17 @@ public class TelecomServiceImpl { } } private boolean canReadPrivilegedPhoneState(String callingPackage, String message) { // The system/default dialer can always read phone state - so that emergency calls will // still work. if (isPrivilegedDialerCalling(callingPackage)) { return true; } mContext.enforceCallingOrSelfPermission(READ_PRIVILEGED_PHONE_STATE, message); return true; } private boolean isDialerOrPrivileged(String callingPackage, String message) { // The system/default dialer can always read phone state - so that emergency calls will // still work. Loading Loading
src/com/android/server/telecom/TelecomServiceImpl.java +17 −1 Original line number Diff line number Diff line Loading @@ -181,7 +181,12 @@ public class TelecomServiceImpl { boolean includeDisabledAccounts, String callingPackage) { try { Log.startSession("TSI.gCCPA"); if (!canReadPhoneState(callingPackage, "getDefaultOutgoingPhoneAccount")) { if (includeDisabledAccounts && !canReadPrivilegedPhoneState( callingPackage, "getCallCapablePhoneAccounts")) { return Collections.emptyList(); } if (!canReadPhoneState(callingPackage, "getCallCapablePhoneAccounts")) { return Collections.emptyList(); } synchronized (mLock) { Loading Loading @@ -2027,6 +2032,17 @@ public class TelecomServiceImpl { } } private boolean canReadPrivilegedPhoneState(String callingPackage, String message) { // The system/default dialer can always read phone state - so that emergency calls will // still work. if (isPrivilegedDialerCalling(callingPackage)) { return true; } mContext.enforceCallingOrSelfPermission(READ_PRIVILEGED_PHONE_STATE, message); return true; } private boolean isDialerOrPrivileged(String callingPackage, String message) { // The system/default dialer can always read phone state - so that emergency calls will // still work. Loading