Add new RIL commands to read/write NV items and reset NV config. am: 5f5d4337b1

Original change: undetermined

Change-Id: I5f706d2f4bbe94b61d25aeead140ec8e5e2e1ad1
This commit is contained in:
Jake Hamby
2021-05-31 06:56:29 +00:00
committed by Automerger Merge Worker
2 changed files with 13 additions and 6 deletions

View File

@@ -800,6 +800,8 @@ public class ConnectivityManager {
* Ensure that a network route exists to deliver traffic to the specified
* host via the specified network interface. An attempt to add a route that
* already exists is ignored, but treated as successful.
* <p>This method requires the caller to hold the permission
* {@link android.Manifest.permission#CHANGE_NETWORK_STATE}.
* @param networkType the type of the network over which traffic to the specified
* host is to be routed
* @param hostAddress the IP address of the host to which the route is desired

View File

@@ -169,9 +169,9 @@ public class ConnectivityService extends IConnectivityManager.Stub {
private static final String TAG = "ConnectivityService";
private static final boolean DBG = true;
private static final boolean VDBG = false;
private static final boolean VDBG = true;
private static final boolean LOGD_RULES = false;
private static final boolean LOGD_RULES = true;
// TODO: create better separation between radio types and network types
@@ -4495,11 +4495,16 @@ public class ConnectivityService extends IConnectivityManager.Stub {
* @param seconds
*/
private static void sleep(int seconds) {
try {
Thread.sleep(seconds * 1000);
} catch (InterruptedException e) {
e.printStackTrace();
log("XXXXX sleeping for " + seconds + " sec");
long stopTime = System.nanoTime() + (seconds * 1000000000);
long sleepTime;
while ((sleepTime = stopTime - System.nanoTime()) > 0) {
try {
Thread.sleep(sleepTime / 1000000);
} catch (InterruptedException ignored) {
}
}
log("XXXXX returning from sleep");
}
private static void log(String s) {