Enable TETHER_ENABLE_SYNC_SM by default
The tether_enable_sync_sm flag has been successfully rolled out to public stage on Pixel devices without any observed regressions. As a result, this flag should be enabled by default with a kill switch, allowing the feature to be deployed to all production devices. Test: atest TetheringTests CtsTetheringTest Change-Id: I2f0f55c1586e1f4987b28488082c4c1f4cae0f5e
This commit is contained in:
parent
2e24584910
commit
d13f09d7a3
3 changed files with 18 additions and 4 deletions
|
|
@ -142,7 +142,7 @@ public class TetheringConfiguration {
|
|||
public static final int DEFAULT_TETHER_OFFLOAD_POLL_INTERVAL_MS = 5000;
|
||||
|
||||
/** A flag for using synchronous or asynchronous state machine. */
|
||||
public static boolean USE_SYNC_SM = false;
|
||||
public static boolean USE_SYNC_SM = true;
|
||||
|
||||
/**
|
||||
* A feature flag to control whether the active sessions metrics should be enabled.
|
||||
|
|
@ -195,6 +195,10 @@ public class TetheringConfiguration {
|
|||
return DeviceConfigUtils.isTetheringFeatureEnabled(context, name);
|
||||
}
|
||||
|
||||
boolean isFeatureNotChickenedOut(@NonNull Context context, @NonNull String name) {
|
||||
return DeviceConfigUtils.isTetheringFeatureNotChickenedOut(context, name);
|
||||
}
|
||||
|
||||
boolean getDeviceConfigBoolean(@NonNull String namespace, @NonNull String name,
|
||||
boolean defaultValue) {
|
||||
return DeviceConfig.getBoolean(namespace, name, defaultValue);
|
||||
|
|
@ -394,7 +398,7 @@ public class TetheringConfiguration {
|
|||
* use the async state machine.
|
||||
*/
|
||||
public void readEnableSyncSM(final Context ctx) {
|
||||
USE_SYNC_SM = mDeps.isFeatureEnabled(ctx, TETHER_ENABLE_SYNC_SM);
|
||||
USE_SYNC_SM = mDeps.isFeatureNotChickenedOut(ctx, TETHER_ENABLE_SYNC_SM);
|
||||
}
|
||||
|
||||
/** Does the dumping.*/
|
||||
|
|
|
|||
|
|
@ -32,6 +32,11 @@ public class FakeTetheringConfiguration extends TetheringConfiguration {
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean isFeatureNotChickenedOut(@NonNull Context context, @NonNull String name) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean getDeviceConfigBoolean(@NonNull String namespace, @NonNull String name,
|
||||
boolean defaultValue) {
|
||||
|
|
|
|||
|
|
@ -159,6 +159,11 @@ public class TetheringConfigurationTest {
|
|||
return isMockFlagEnabled(name, false /* defaultEnabled */);
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean isFeatureNotChickenedOut(@NonNull Context context, @NonNull String name) {
|
||||
return isMockFlagEnabled(name, true /* defaultEnabled */);
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean getDeviceConfigBoolean(@NonNull String namespace, @NonNull String name,
|
||||
boolean defaultValue) {
|
||||
|
|
@ -767,9 +772,9 @@ public class TetheringConfigurationTest {
|
|||
|
||||
@Test
|
||||
public void testEnableSyncSMFlag() throws Exception {
|
||||
// Test default disabled
|
||||
// Test default enabled
|
||||
setTetherEnableSyncSMFlagEnabled(null);
|
||||
assertEnableSyncSM(false);
|
||||
assertEnableSyncSM(true);
|
||||
|
||||
setTetherEnableSyncSMFlagEnabled(true);
|
||||
assertEnableSyncSM(true);
|
||||
|
|
|
|||
Loading…
Reference in a new issue