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

Commit 6af18768 authored by Pengquan Meng's avatar Pengquan Meng
Browse files

Remove dead method from TelephonyManager

TelephonyManager.getCompleteVoiceMailNumber &
TelephonyManager.getCompleteVoiceMailNumberForSubscriber have no
reference after lollipop. It's a good time to remove the dead code.

Test: no test
Bug: 78788614
Change-Id: I99091dd9a47f2b5aeca3d320e873b7b7c2baf36f
parent d4dcdb11
Loading
Loading
Loading
Loading
+0 −31
Original line number Diff line number Diff line
@@ -3283,37 +3283,6 @@ public class TelephonyManager {
        }
    }

    /**
     * Returns the complete voice mail number. Return null if it is unavailable.
     *
     * @hide
     */
    @RequiresPermission(android.Manifest.permission.CALL_PRIVILEGED)
    public String getCompleteVoiceMailNumber() {
        return getCompleteVoiceMailNumber(getSubId());
    }

    /**
     * Returns the complete voice mail number. Return null if it is unavailable.
     *
     * @param subId
     * @hide
     */
    @RequiresPermission(android.Manifest.permission.CALL_PRIVILEGED)
    public String getCompleteVoiceMailNumber(int subId) {
        try {
            IPhoneSubInfo info = getSubscriberInfo();
            if (info == null)
                return null;
            return info.getCompleteVoiceMailNumberForSubscriber(subId);
        } catch (RemoteException ex) {
            return null;
        } catch (NullPointerException ex) {
            // This could happen before phone restarts due to crashing
            return null;
        }
    }

    /**
     * Sets the voice mail number.
     *
+0 −10
Original line number Diff line number Diff line
@@ -124,16 +124,6 @@ interface IPhoneSubInfo {
     */
    String getVoiceMailNumberForSubscriber(int subId, String callingPackage);

    /**
     * Retrieves the complete voice mail number.
     */
    String getCompleteVoiceMailNumber();

    /**
     * Retrieves the complete voice mail number for particular subId
     */
    String getCompleteVoiceMailNumberForSubscriber(int subId);

    /**
     * Retrieves the Carrier information used to encrypt IMSI and IMPI.
     */