Merge "Avoid hardcoding BATTERY_PLUGGED_ANY constant." am: bdd3ca1ac6
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2609416 Change-Id: Ie244d203c62965d304c4f1f986bc579ee3a002e9 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -18,9 +18,7 @@ package com.android.cts.net.hostside;
|
||||
|
||||
import static android.app.job.JobScheduler.RESULT_SUCCESS;
|
||||
import static android.net.ConnectivityManager.ACTION_RESTRICT_BACKGROUND_CHANGED;
|
||||
import static android.os.BatteryManager.BATTERY_PLUGGED_AC;
|
||||
import static android.os.BatteryManager.BATTERY_PLUGGED_USB;
|
||||
import static android.os.BatteryManager.BATTERY_PLUGGED_WIRELESS;
|
||||
import static android.os.BatteryManager.BATTERY_PLUGGED_ANY;
|
||||
|
||||
import static com.android.cts.net.hostside.NetworkPolicyTestUtils.executeShellCommand;
|
||||
import static com.android.cts.net.hostside.NetworkPolicyTestUtils.forceRunJob;
|
||||
@@ -119,10 +117,6 @@ public abstract class AbstractRestrictBackgroundNetworkTestCase {
|
||||
protected static final String NOTIFICATION_TYPE_ACTION_BUNDLE = "ACTION_BUNDLE";
|
||||
protected static final String NOTIFICATION_TYPE_ACTION_REMOTE_INPUT = "ACTION_REMOTE_INPUT";
|
||||
|
||||
// TODO: Update BatteryManager.BATTERY_PLUGGED_ANY as @TestApi
|
||||
public static final int BATTERY_PLUGGED_ANY =
|
||||
BATTERY_PLUGGED_AC | BATTERY_PLUGGED_USB | BATTERY_PLUGGED_WIRELESS;
|
||||
|
||||
private static final String NETWORK_STATUS_SEPARATOR = "\\|";
|
||||
private static final int SECOND_IN_MS = 1000;
|
||||
static final int NETWORK_TIMEOUT_MS = 15 * SECOND_IN_MS;
|
||||
|
||||
Reference in New Issue
Block a user