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

Commit b342a82b authored by Collin Fijalkovich's avatar Collin Fijalkovich Committed by Android (Google) Code Review
Browse files

Merge "TelephonyManager: cache service handles"

parents 4e489961 c73a2814
Loading
Loading
Loading
Loading
+4 −16
Original line number Diff line number Diff line
@@ -801,11 +801,7 @@ public final class SmsManager {
                    "Invalid pdu format. format must be either 3gpp or 3gpp2");
        }
        try {
            ISms iSms = ISms.Stub.asInterface(
                    TelephonyFrameworkInitializer
                            .getTelephonyServiceManager()
                            .getSmsServiceRegisterer()
                            .get());
            ISms iSms = TelephonyManager.getSmsService();
            if (iSms != null) {
                iSms.injectSmsPduForSubscriber(
                        getSubscriptionId(), pdu, format, receivedIntent);
@@ -1642,7 +1638,7 @@ public final class SmsManager {
     * the service does not exist.
     */
    private static ISms getISmsServiceOrThrow() {
        ISms iSms = getISmsService();
        ISms iSms = TelephonyManager.getSmsService();
        if (iSms == null) {
            throw new UnsupportedOperationException("Sms is not supported");
        }
@@ -1650,11 +1646,7 @@ public final class SmsManager {
    }

    private static ISms getISmsService() {
        return ISms.Stub.asInterface(
                TelephonyFrameworkInitializer
                        .getTelephonyServiceManager()
                        .getSmsServiceRegisterer()
                        .get());
        return TelephonyManager.getSmsService();
    }

    /**
@@ -2091,11 +2083,7 @@ public final class SmsManager {
    public boolean isSMSPromptEnabled() {
        ISms iSms = null;
        try {
            iSms = ISms.Stub.asInterface(
                    TelephonyFrameworkInitializer
                            .getTelephonyServiceManager()
                            .getSmsServiceRegisterer()
                            .get());
            iSms = TelephonyManager.getSmsService();
            return iSms.isSMSPromptEnabled();
        } catch (RemoteException ex) {
            return false;
+42 −210

File changed.

Preview size limit exceeded, changes collapsed.

+196 −33

File changed.

Preview size limit exceeded, changes collapsed.