diff options
author | Svet Ganov <svetoslavganov@google.com> | 2015-04-17 21:34:02 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-04-17 21:34:04 +0000 |
commit | d3c1ddb892f2ef8ae1b8eb0e4c50dfef302c0beb (patch) | |
tree | 5abd54a3da632d215a5ac1f1bad5b189852ef048 /telecomm/java | |
parent | f2004061505cdcb2a37072b430104586ca848df2 (diff) | |
parent | 16a16899505ec0a9ede5b76650bfb8817b3227c7 (diff) | |
download | frameworks_base-d3c1ddb892f2ef8ae1b8eb0e4c50dfef302c0beb.zip frameworks_base-d3c1ddb892f2ef8ae1b8eb0e4c50dfef302c0beb.tar.gz frameworks_base-d3c1ddb892f2ef8ae1b8eb0e4c50dfef302c0beb.tar.bz2 |
Merge "Add OP_READ_PHONE_STATE app op - framework"
Diffstat (limited to 'telecomm/java')
-rw-r--r-- | telecomm/java/android/telecom/TelecomManager.java | 29 | ||||
-rw-r--r-- | telecomm/java/com/android/internal/telecom/ITelecomService.aidl | 26 |
2 files changed, 31 insertions, 24 deletions
diff --git a/telecomm/java/android/telecom/TelecomManager.java b/telecomm/java/android/telecom/TelecomManager.java index 5abbb50..a72172c 100644 --- a/telecomm/java/android/telecom/TelecomManager.java +++ b/telecomm/java/android/telecom/TelecomManager.java @@ -359,7 +359,8 @@ public class TelecomManager { public PhoneAccountHandle getDefaultOutgoingPhoneAccount(String uriScheme) { try { if (isServiceConnected()) { - return getTelecomService().getDefaultOutgoingPhoneAccount(uriScheme); + return getTelecomService().getDefaultOutgoingPhoneAccount(uriScheme, + mContext.getOpPackageName()); } } catch (RemoteException e) { Log.e(TAG, "Error calling ITelecomService#getDefaultOutgoingPhoneAccount", e); @@ -443,7 +444,7 @@ public class TelecomManager { public List<PhoneAccountHandle> getSimCallManagers() { try { if (isServiceConnected()) { - return getTelecomService().getSimCallManagers(); + return getTelecomService().getSimCallManagers(mContext.getOpPackageName()); } } catch (RemoteException e) { Log.e(TAG, "Error calling ITelecomService#getSimCallManagers"); @@ -491,7 +492,8 @@ public class TelecomManager { public List<PhoneAccountHandle> getPhoneAccountsSupportingScheme(String uriScheme) { try { if (isServiceConnected()) { - return getTelecomService().getPhoneAccountsSupportingScheme(uriScheme); + return getTelecomService().getPhoneAccountsSupportingScheme(uriScheme, + mContext.getOpPackageName()); } } catch (RemoteException e) { Log.e(TAG, "Error calling ITelecomService#getPhoneAccountsSupportingScheme", e); @@ -511,7 +513,7 @@ public class TelecomManager { public List<PhoneAccountHandle> getCallCapablePhoneAccounts() { try { if (isServiceConnected()) { - return getTelecomService().getCallCapablePhoneAccounts(); + return getTelecomService().getCallCapablePhoneAccounts(mContext.getOpPackageName()); } } catch (RemoteException e) { Log.e(TAG, "Error calling ITelecomService#getCallCapablePhoneAccounts", e); @@ -711,7 +713,8 @@ public class TelecomManager { public boolean isVoiceMailNumber(PhoneAccountHandle accountHandle, String number) { try { if (isServiceConnected()) { - return getTelecomService().isVoiceMailNumber(accountHandle, number); + return getTelecomService().isVoiceMailNumber(accountHandle, number, + mContext.getOpPackageName()); } } catch (RemoteException e) { Log.e(TAG, "RemoteException calling ITelecomService#isVoiceMailNumber.", e); @@ -729,7 +732,8 @@ public class TelecomManager { public String getVoiceMailNumber(PhoneAccountHandle accountHandle) { try { if (isServiceConnected()) { - return getTelecomService().getVoiceMailNumber(accountHandle); + return getTelecomService().getVoiceMailNumber(accountHandle, + mContext.getOpPackageName()); } } catch (RemoteException e) { Log.e(TAG, "RemoteException calling ITelecomService#hasVoiceMailNumber.", e); @@ -746,7 +750,8 @@ public class TelecomManager { public String getLine1Number(PhoneAccountHandle accountHandle) { try { if (isServiceConnected()) { - return getTelecomService().getLine1Number(accountHandle); + return getTelecomService().getLine1Number(accountHandle, + mContext.getOpPackageName()); } } catch (RemoteException e) { Log.e(TAG, "RemoteException calling ITelecomService#getLine1Number.", e); @@ -764,7 +769,7 @@ public class TelecomManager { public boolean isInCall() { try { if (isServiceConnected()) { - return getTelecomService().isInCall(); + return getTelecomService().isInCall(mContext.getOpPackageName()); } } catch (RemoteException e) { Log.e(TAG, "RemoteException calling isInCall().", e); @@ -806,7 +811,7 @@ public class TelecomManager { public boolean isRinging() { try { if (isServiceConnected()) { - return getTelecomService().isRinging(); + return getTelecomService().isRinging(mContext.getOpPackageName()); } } catch (RemoteException e) { Log.e(TAG, "RemoteException attempting to get ringing state of phone app.", e); @@ -872,7 +877,7 @@ public class TelecomManager { public boolean isTtySupported() { try { if (isServiceConnected()) { - return getTelecomService().isTtySupported(); + return getTelecomService().isTtySupported(mContext.getOpPackageName()); } } catch (RemoteException e) { Log.e(TAG, "RemoteException attempting to get TTY supported state.", e); @@ -893,7 +898,7 @@ public class TelecomManager { public int getCurrentTtyMode() { try { if (isServiceConnected()) { - return getTelecomService().getCurrentTtyMode(); + return getTelecomService().getCurrentTtyMode(mContext.getOpPackageName()); } } catch (RemoteException e) { Log.e(TAG, "RemoteException attempting to get the current TTY mode.", e); @@ -1045,7 +1050,7 @@ public class TelecomManager { ITelecomService service = getTelecomService(); if (service != null) { try { - service.showInCallScreen(showDialpad); + service.showInCallScreen(showDialpad, mContext.getOpPackageName()); } catch (RemoteException e) { Log.e(TAG, "Error calling ITelecomService#showCallScreen", e); } diff --git a/telecomm/java/com/android/internal/telecom/ITelecomService.aidl b/telecomm/java/com/android/internal/telecom/ITelecomService.aidl index 35db97f..727fd4b 100644 --- a/telecomm/java/com/android/internal/telecom/ITelecomService.aidl +++ b/telecomm/java/com/android/internal/telecom/ITelecomService.aidl @@ -33,12 +33,12 @@ interface ITelecomService { * * @param showDialpad if true, make the dialpad visible initially. */ - void showInCallScreen(boolean showDialpad); + void showInCallScreen(boolean showDialpad, String callingPackage); /** * @see TelecomServiceImpl#getDefaultOutgoingPhoneAccount */ - PhoneAccountHandle getDefaultOutgoingPhoneAccount(in String uriScheme); + PhoneAccountHandle getDefaultOutgoingPhoneAccount(in String uriScheme, String callingPackage); /** * @see TelecomServiceImpl#getUserSelectedOutgoingPhoneAccount @@ -53,12 +53,13 @@ interface ITelecomService { /** * @see TelecomServiceImpl#getCallCapablePhoneAccounts */ - List<PhoneAccountHandle> getCallCapablePhoneAccounts(); + List<PhoneAccountHandle> getCallCapablePhoneAccounts(String callingPackage); /** * @see TelecomManager#getPhoneAccountsSupportingScheme */ - List<PhoneAccountHandle> getPhoneAccountsSupportingScheme(in String uriScheme); + List<PhoneAccountHandle> getPhoneAccountsSupportingScheme(in String uriScheme, + String callingPackage); /** * @see TelecomManager#getPhoneAccountsForPackage @@ -98,7 +99,7 @@ interface ITelecomService { /** * @see TelecomServiceImpl#getSimCallManagers */ - List<PhoneAccountHandle> getSimCallManagers(); + List<PhoneAccountHandle> getSimCallManagers(String callingPackage); /** * @see TelecomServiceImpl#registerPhoneAccount @@ -118,17 +119,18 @@ interface ITelecomService { /** * @see TelecomServiceImpl#isVoiceMailNumber */ - boolean isVoiceMailNumber(in PhoneAccountHandle accountHandle, String number); + boolean isVoiceMailNumber(in PhoneAccountHandle accountHandle, String number, + String callingPackage); /** * @see TelecomServiceImpl#getVoiceMailNumber */ - String getVoiceMailNumber(in PhoneAccountHandle accountHandle); + String getVoiceMailNumber(in PhoneAccountHandle accountHandle, String callingPackage); /** * @see TelecomServiceImpl#getLine1Number */ - String getLine1Number(in PhoneAccountHandle accountHandle); + String getLine1Number(in PhoneAccountHandle accountHandle, String callingPackage); /** * @see TelecomServiceImpl#getDefaultPhoneApp @@ -147,12 +149,12 @@ interface ITelecomService { /** * @see TelecomServiceImpl#isInCall */ - boolean isInCall(); + boolean isInCall(String callingPackage); /** * @see TelecomServiceImpl#isRinging */ - boolean isRinging(); + boolean isRinging(String callingPackage); /** * @see TelecomServiceImpl#getCallState @@ -192,12 +194,12 @@ interface ITelecomService { /** * @see TelecomServiceImpl#isTtySupported */ - boolean isTtySupported(); + boolean isTtySupported(String callingPackage); /** * @see TelecomServiceImpl#getCurrentTtyMode */ - int getCurrentTtyMode(); + int getCurrentTtyMode(String callingPackage); /** * @see TelecomServiceImpl#addNewIncomingCall |