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

Commit 820c12c9 authored by Robert Greenwalt's avatar Robert Greenwalt Committed by Android (Google) Code Review
Browse files

Merge "Move the net transition wakelock to ConnService."

parents 1091e008 14f2ef4c
Loading
Loading
Loading
Loading
+16 −1
Original line number Diff line number Diff line
@@ -525,4 +525,19 @@ public class ConnectivityManager
            return TETHER_ERROR_SERVICE_UNAVAIL;
        }
    }

    /**
     * Ensure the device stays awake until we connect with the next network
     * @param forWhome The name of the network going down for logging purposes
     * @return {@code true} on success, {@code false} on failure
     * {@hide}
     */
    public boolean requestNetworkTransitionWakelock(String forWhom) {
        try {
            mService.requestNetworkTransitionWakelock(forWhom);
            return true;
        } catch (RemoteException e) {
            return false;
        }
    }
}
+2 −0
Original line number Diff line number Diff line
@@ -72,4 +72,6 @@ interface IConnectivityManager
    String[] getTetherableUsbRegexs();

    String[] getTetherableWifiRegexs();

    void requestNetworkTransitionWakelock(in String forWhom);
}
+1 −6
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ public interface NetworkStateTracker {
    public static final int EVENT_ROAMING_CHANGED = 5;
    public static final int EVENT_NETWORK_SUBTYPE_CHANGED = 6;
    public static final int EVENT_RESTORE_DEFAULT_NETWORK = 7;
    public static final int EVENT_CLEAR_NET_TRANSITION_WAKELOCK = 8;

    /**
     * Fetch NetworkInfo for the network
@@ -95,12 +96,6 @@ public interface NetworkStateTracker {
     */
    public boolean isTeardownRequested();

    /**
     * Release the wakelock, if any, that may be held while handling a
     * disconnect operation.
     */
    public void releaseWakeLock();

    public void startMonitoring();

    /**
+7 −0
Original line number Diff line number Diff line
@@ -344,6 +344,13 @@
        android:description="@string/permdesc_accountManagerService"
        android:label="@string/permlab_accountManagerService" />

    <!-- Allows an internal user to use privaledged ConnectivityManager
    APIs.
        @hide -->
    <permission android:name="android.permission.CONNECTIVITY_INTERNAL"
        android:permissionGroup="android.permission-group.NETWORK"
        android:protectionLevel="signatureOrSystem" />

    <!-- ================================== -->
    <!-- Permissions for accessing accounts -->
    <!-- ================================== -->
+3 −0
Original line number Diff line number Diff line
@@ -98,6 +98,9 @@
        <item>"0,1"</item>
    </string-array>

    <!-- The maximum duration (in milliseconds) we expect a network transition to take -->
    <integer name="config_networkTransitionTimeout">60000</integer>

    <!-- List of regexpressions describing the interface (if any) that represent tetherable
         USB interfaces.  If the device doesn't want to support tething over USB this should
         be empty.  An example would be "usb.*" -->
Loading