Merge "Have proper permission check in getConfigForSubId"
This commit is contained in:
@@ -7809,7 +7809,7 @@ Lcom/android/internal/telephony/GsmAlphabet;->sLanguageTables:[Ljava/lang/String
|
|||||||
Lcom/android/internal/telephony/GsmAlphabet;->stringToGsm7BitPacked(Ljava/lang/String;IZII)[B
|
Lcom/android/internal/telephony/GsmAlphabet;->stringToGsm7BitPacked(Ljava/lang/String;IZII)[B
|
||||||
Lcom/android/internal/telephony/GsmAlphabet;->stringToGsm7BitPackedWithHeader(Ljava/lang/String;[BII)[B
|
Lcom/android/internal/telephony/GsmAlphabet;->stringToGsm7BitPackedWithHeader(Ljava/lang/String;[BII)[B
|
||||||
Lcom/android/internal/telephony/GsmAlphabet;->stringToGsm8BitPacked(Ljava/lang/String;)[B
|
Lcom/android/internal/telephony/GsmAlphabet;->stringToGsm8BitPacked(Ljava/lang/String;)[B
|
||||||
Lcom/android/internal/telephony/ICarrierConfigLoader;->getConfigForSubId(I)Landroid/os/PersistableBundle;
|
Lcom/android/internal/telephony/ICarrierConfigLoader;->getConfigForSubId(ILjava/lang/String;)Landroid/os/PersistableBundle;
|
||||||
Lcom/android/internal/telephony/IMms$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/telephony/IMms;
|
Lcom/android/internal/telephony/IMms$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/telephony/IMms;
|
||||||
Lcom/android/internal/telephony/IPhoneStateListener$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/telephony/IPhoneStateListener;
|
Lcom/android/internal/telephony/IPhoneStateListener$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/telephony/IPhoneStateListener;
|
||||||
Lcom/android/internal/telephony/IPhoneStateListener;->onCallForwardingIndicatorChanged(Z)V
|
Lcom/android/internal/telephony/IPhoneStateListener;->onCallForwardingIndicatorChanged(Z)V
|
||||||
|
|||||||
@@ -490,7 +490,7 @@ final class SystemServiceRegistry {
|
|||||||
new CachedServiceFetcher<CarrierConfigManager>() {
|
new CachedServiceFetcher<CarrierConfigManager>() {
|
||||||
@Override
|
@Override
|
||||||
public CarrierConfigManager createService(ContextImpl ctx) {
|
public CarrierConfigManager createService(ContextImpl ctx) {
|
||||||
return new CarrierConfigManager();
|
return new CarrierConfigManager(ctx.getOuterContext());
|
||||||
}});
|
}});
|
||||||
|
|
||||||
registerService(Context.TELECOM_SERVICE, TelecomManager.class,
|
registerService(Context.TELECOM_SERVICE, TelecomManager.class,
|
||||||
|
|||||||
@@ -51,10 +51,13 @@ public class CarrierConfigManager {
|
|||||||
public static final String EXTRA_SUBSCRIPTION_INDEX =
|
public static final String EXTRA_SUBSCRIPTION_INDEX =
|
||||||
SubscriptionManager.EXTRA_SUBSCRIPTION_INDEX;
|
SubscriptionManager.EXTRA_SUBSCRIPTION_INDEX;
|
||||||
|
|
||||||
|
private final Context mContext;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
public CarrierConfigManager() {
|
public CarrierConfigManager(Context context) {
|
||||||
|
mContext = context;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2281,7 +2284,7 @@ public class CarrierConfigManager {
|
|||||||
+ " ICarrierConfigLoader is null");
|
+ " ICarrierConfigLoader is null");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return loader.getConfigForSubId(subId);
|
return loader.getConfigForSubId(subId, mContext.getOpPackageName());
|
||||||
} catch (RemoteException ex) {
|
} catch (RemoteException ex) {
|
||||||
Rlog.e(TAG, "Error getting config for subId " + subId + ": "
|
Rlog.e(TAG, "Error getting config for subId " + subId + ": "
|
||||||
+ ex.toString());
|
+ ex.toString());
|
||||||
|
|||||||
@@ -6554,7 +6554,7 @@ public class TelephonyManager {
|
|||||||
try {
|
try {
|
||||||
ITelephony telephony = getITelephony();
|
ITelephony telephony = getITelephony();
|
||||||
if (telephony != null) {
|
if (telephony != null) {
|
||||||
return telephony.canChangeDtmfToneLength();
|
return telephony.canChangeDtmfToneLength(mSubId, getOpPackageName());
|
||||||
}
|
}
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
Log.e(TAG, "Error calling ITelephony#canChangeDtmfToneLength", e);
|
Log.e(TAG, "Error calling ITelephony#canChangeDtmfToneLength", e);
|
||||||
@@ -6573,7 +6573,7 @@ public class TelephonyManager {
|
|||||||
try {
|
try {
|
||||||
ITelephony telephony = getITelephony();
|
ITelephony telephony = getITelephony();
|
||||||
if (telephony != null) {
|
if (telephony != null) {
|
||||||
return telephony.isWorldPhone();
|
return telephony.isWorldPhone(mSubId, getOpPackageName());
|
||||||
}
|
}
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
Log.e(TAG, "Error calling ITelephony#isWorldPhone", e);
|
Log.e(TAG, "Error calling ITelephony#isWorldPhone", e);
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ import android.os.PersistableBundle;
|
|||||||
*/
|
*/
|
||||||
interface ICarrierConfigLoader {
|
interface ICarrierConfigLoader {
|
||||||
|
|
||||||
PersistableBundle getConfigForSubId(int subId);
|
PersistableBundle getConfigForSubId(int subId, String callingPackage);
|
||||||
|
|
||||||
void notifyConfigChangedForSubId(int subId);
|
void notifyConfigChangedForSubId(int subId);
|
||||||
|
|
||||||
|
|||||||
@@ -1123,16 +1123,19 @@ interface ITelephony {
|
|||||||
/**
|
/**
|
||||||
* Whether the DTMF tone length can be changed.
|
* Whether the DTMF tone length can be changed.
|
||||||
*
|
*
|
||||||
|
* @param subId The subscription to use.
|
||||||
|
* @param callingPackage The package making the call.
|
||||||
* @return {@code true} if the DTMF tone length can be changed.
|
* @return {@code true} if the DTMF tone length can be changed.
|
||||||
*/
|
*/
|
||||||
boolean canChangeDtmfToneLength();
|
boolean canChangeDtmfToneLength(int subId, String callingPackage);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether the device is a world phone.
|
* Whether the device is a world phone.
|
||||||
*
|
*
|
||||||
|
* @param callingPackage The package making the call.
|
||||||
* @return {@code true} if the devices is a world phone.
|
* @return {@code true} if the devices is a world phone.
|
||||||
*/
|
*/
|
||||||
boolean isWorldPhone();
|
boolean isWorldPhone(int subId, String callingPackage);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether the phone supports TTY mode.
|
* Whether the phone supports TTY mode.
|
||||||
|
|||||||
Reference in New Issue
Block a user