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

Commit 9620dfc6 authored by Nathan Harold's avatar Nathan Harold Committed by android-build-merger
Browse files

Merge "Use TM SubId in getDataState and getDataActivity" am: 28a7b597 am: 08698af5

am: c51d10ea

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

     @UnsupportedAppUsage
     int getDataActivity();
     @UnsupportedAppUsage
     int getDataState();
    /**
     * Returns a constant indicating the type of activity on a data connection
     * (cellular).
     *
     * @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.