Update SubscriptionManager API by replacing 'id' & 'idx' with 'index'.
am: 56eaeedbb4
Change-Id: I6ff74db8a3bcc83768418293a4410e1b05daa732
This commit is contained in:
@@ -466,19 +466,19 @@ public class MmsHttpClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Invoke hidden SubscriptionManager.getSlotId(int)
|
* Invoke hidden SubscriptionManager.getSlotIndex(int)
|
||||||
*
|
*
|
||||||
* @param subId the subId
|
* @param subId the subId
|
||||||
* @return the SIM slot ID
|
* @return the SIM slot ID
|
||||||
*/
|
*/
|
||||||
private static int getSlotId(final int subId) {
|
private static int getSlotId(final int subId) {
|
||||||
try {
|
try {
|
||||||
final Method method = SubscriptionManager.class.getMethod("getSlotId", Integer.TYPE);
|
final Method method = SubscriptionManager.class.getMethod("getSlotIndex", Integer.TYPE);
|
||||||
if (method != null) {
|
if (method != null) {
|
||||||
return (Integer) method.invoke(null, subId);
|
return (Integer) method.invoke(null, subId);
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Log.w(MmsService.TAG, "SubscriptionManager.getSlotId failed " + e);
|
Log.w(MmsService.TAG, "SubscriptionManager.getSlotIndex failed " + e);
|
||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user