Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7ff76d63 authored by Narayan Kamath's avatar Narayan Kamath
Browse files

Add a hidden telephony API for querying SIM derived locales.

bug: 19818550
Change-Id: Ide6c05ad8fe7b0cff6f20ddfe755e83e9b3a21aa
parent 25d9f5f3
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -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;
    }
}
+8 −0
Original line number Diff line number Diff line
@@ -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();
}