Add a hidden telephony API for querying SIM derived locales.
bug: 19818550 Change-Id: Ide6c05ad8fe7b0cff6f20ddfe755e83e9b3a21aa
This commit is contained in:
@@ -4580,4 +4580,18 @@ public class TelephonyManager {
|
||||
} catch (RemoteException e) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/** @hide */
|
||||
public String getLocaleFromDefaultSim() {
|
||||
try {
|
||||
final ITelephony telephony = getITelephony();
|
||||
if (telephony != null) {
|
||||
return telephony.getLocaleFromDefaultSim();
|
||||
}
|
||||
} catch (RemoteException ex) {
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -945,4 +945,12 @@ interface ITelephony {
|
||||
int getSubIdForPhoneAccount(in PhoneAccount phoneAccount);
|
||||
|
||||
void factoryReset(int subId);
|
||||
|
||||
/**
|
||||
* An estimate of the users's current locale based on the default SIM.
|
||||
*
|
||||
* The returned string will be a well formed BCP-47 language tag, or {@code null}
|
||||
* if no locale could be derived.
|
||||
*/
|
||||
String getLocaleFromDefaultSim();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user