Skip to content
Snippets Groups Projects
Commit eb33cf47 authored by Ken Chen's avatar Ken Chen Committed by Gerrit Code Review
Browse files

Merge "Add hidden API getDataSaverViaCmFlag() for CTS" into main

parents f6020de5 9e87fc38
No related branches found
No related tags found
No related merge requests found
......@@ -23,6 +23,7 @@ import android.content.Context;
import android.os.IBinder;
import android.os.ServiceManager;
import com.android.net.flags.Flags;
import com.android.net.module.util.PermissionUtils;
/**
* Constants and utilities for client code communicating with the network stack service.
......@@ -103,4 +104,16 @@ public class NetworkStack {
final @NonNull String... otherPermissions) {
PermissionUtils.enforceNetworkStackPermissionOr(context, otherPermissions);
}
/**
* Get setting of the "set_data_saver_via_cm" flag.
*
* @hide
*/
// A workaround for aconfig. Currently, aconfig value read from platform and mainline code can
// be inconsistent. To avoid the problem, CTS for mainline code can get the flag value by this
// method.
public static boolean getDataSaverViaCmFlag() {
return Flags.setDataSaverViaCm();
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment