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

Commit 44173ee7 authored by Nathan Harold's avatar Nathan Harold
Browse files

Revert "Use TM SubId in getDataState and getDataActivity"

This reverts commit b2ab846c.

Reason for revert: Decision has been made to keep the unsupported AIDL API.

Change-Id: I31219606974019ac46da789ec31ca9cb3a86eb13
parent b2ab846c
Loading
Loading
Loading
Loading
+2 −4
Original line number Original line Diff line number Diff line
@@ -4733,8 +4733,7 @@ public class TelephonyManager {
            ITelephony telephony = getITelephony();
            ITelephony telephony = getITelephony();
            if (telephony == null)
            if (telephony == null)
                return DATA_ACTIVITY_NONE;
                return DATA_ACTIVITY_NONE;
            return telephony.getDataActivity(
            return telephony.getDataActivity();
                    getSubId(SubscriptionManager.getActiveDataSubscriptionId()));
        } catch (RemoteException ex) {
        } catch (RemoteException ex) {
            // the phone process is restarting.
            // the phone process is restarting.
            return DATA_ACTIVITY_NONE;
            return DATA_ACTIVITY_NONE;
@@ -4782,8 +4781,7 @@ public class TelephonyManager {
            ITelephony telephony = getITelephony();
            ITelephony telephony = getITelephony();
            if (telephony == null)
            if (telephony == null)
                return DATA_DISCONNECTED;
                return DATA_DISCONNECTED;
            return telephony.getDataState(
            return telephony.getDataState();
                    getSubId(SubscriptionManager.getActiveDataSubscriptionId()));
        } catch (RemoteException ex) {
        } catch (RemoteException ex) {
            // the phone process is restarting.
            // the phone process is restarting.
            return DATA_DISCONNECTED;
            return DATA_DISCONNECTED;
+6 −24
Original line number Original line Diff line number Diff line
@@ -316,28 +316,10 @@ interface ITelephony {
     */
     */
     int getCallStateForSlot(int slotIndex);
     int getCallStateForSlot(int slotIndex);


    /**
     @UnsupportedAppUsage
     * Returns a constant indicating the type of activity on a data connection
     int getDataActivity();
     * (cellular).
     @UnsupportedAppUsage
     *
     int getDataState();
     * @see #DATA_ACTIVITY_NONE
     * @see #DATA_ACTIVITY_IN
     * @see #DATA_ACTIVITY_OUT
     * @see #DATA_ACTIVITY_INOUT
     * @see #DATA_ACTIVITY_DORMANT
     */
    int getDataActivity(int subId);

    /**
     * Returns a constant indicating the current data connection state
     * (cellular).
     *
     * @see #DATA_DISCONNECTED
     * @see #DATA_CONNECTING
     * @see #DATA_CONNECTED
     * @see #DATA_SUSPENDED
     */
    int getDataState(int subId);


    /**
    /**
     * Returns the current active phone type as integer.
     * Returns the current active phone type as integer.