profiles: Fix typo in static variable naming

Change-Id: Ic17febc55e6726f0efc18c201223856bbc2798b3
This commit is contained in:
Bruno Martins
2020-04-21 10:49:51 +01:00
parent bd39ad8c07
commit b485a25aa3
6 changed files with 18 additions and 16 deletions

View File

@@ -592,7 +592,7 @@ package lineageos.profiles {
public static class AirplaneModeSettings.BooleanState {
ctor public AirplaneModeSettings.BooleanState();
field public static final int STATE_DISALED = 0; // 0x0
field public static final int STATE_DISABLED = 0; // 0x0
field public static final int STATE_ENABLED = 1; // 0x1
}
@@ -635,7 +635,7 @@ package lineageos.profiles {
public static class ConnectionSettings.BooleanState {
ctor public ConnectionSettings.BooleanState();
field public static final int STATE_DISALED = 0; // 0x0
field public static final int STATE_DISABLED = 0; // 0x0
field public static final int STATE_ENABLED = 1; // 0x1
}

View File

@@ -1,5 +1,6 @@
/*
* Copyright (C) 2015 The CyanogenMod Project
* 2020 The LineageOS Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -65,7 +66,7 @@ public final class AirplaneModeSettings implements Parcelable {
*/
public static class BooleanState {
/** Disabled state */
public static final int STATE_DISALED = 0;
public static final int STATE_DISABLED = 0;
/** Enabled state */
public static final int STATE_ENABLED = 1;
}
@@ -80,16 +81,16 @@ public final class AirplaneModeSettings implements Parcelable {
/**
* Construct a {@link AirplaneModeSettings} with a default value of
* {@link BooleanState#STATE_DISALED}.
* {@link BooleanState#STATE_DISABLED}.
*/
public AirplaneModeSettings() {
this(BooleanState.STATE_DISALED, false);
this(BooleanState.STATE_DISABLED, false);
}
/**
* Construct a {@link AirplaneModeSettings} with a default value and whether or not it should
* override user settings.
* @param value ex: {@link BooleanState#STATE_DISALED}
* @param value ex: {@link BooleanState#STATE_DISABLED}
* @param override whether or not the setting should override user settings
*/
public AirplaneModeSettings(int value, boolean override) {
@@ -108,7 +109,7 @@ public final class AirplaneModeSettings implements Parcelable {
/**
* Set the default value for the {@link AirplaneModeSettings}
* @param value {@link BooleanState#STATE_DISALED}
* @param value {@link BooleanState#STATE_DISABLED}
*/
public void setValue(int value) {
mValue = value;

View File

@@ -52,7 +52,7 @@ import java.io.IOException;
* ConnectionSettings connectionSettings =
* new ConnectionSettings(ConnectionSettings.PROFILE_CONNECTION_SYNC,
* shouldBeEnabled() ?
* {@link BooleanState#STATE_ENABLED} : {@link BooleanState#STATE_DISALED},
* {@link BooleanState#STATE_ENABLED} : {@link BooleanState#STATE_DISABLED},
* true)
* profile.setConnectionSettings(connectionSettings);
* </pre>
@@ -146,7 +146,7 @@ public final class ConnectionSettings implements Parcelable {
*/
public static class BooleanState {
/** Disabled state */
public static final int STATE_DISALED = 0;
public static final int STATE_DISABLED = 0;
/** Enabled state */
public static final int STATE_ENABLED = 1;
}

View File

@@ -1,5 +1,6 @@
/**
* Copyright (c) 2016, The CyanogenMod Project
* Copyright (C) 2016 The CyanogenMod Project
* 2020 The LineageOS Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -42,7 +43,7 @@ public class AirplaneModeSettingsTest extends AndroidTestCase {
@SmallTest
public void testVerifyValue() {
int expectedValue = AirplaneModeSettings.BooleanState.STATE_DISALED;
int expectedValue = AirplaneModeSettings.BooleanState.STATE_DISABLED;
AirplaneModeSettings airplaneModeSettings =
new AirplaneModeSettings(
AirplaneModeSettings.BooleanState.STATE_ENABLED, true);

View File

@@ -35,9 +35,9 @@ public class ConnectionSettingsTest extends AndroidTestCase {
public void testConstructWholly() {
ConnectionSettings connectionSettings =
new ConnectionSettings(ConnectionSettings.PROFILE_CONNECTION_LOCATION,
ConnectionSettings.BooleanState.STATE_DISALED, true);
ConnectionSettings.BooleanState.STATE_DISABLED, true);
assertEquals(true, connectionSettings.isOverride());
assertEquals(ConnectionSettings.BooleanState.STATE_DISALED,
assertEquals(ConnectionSettings.BooleanState.STATE_DISABLED,
connectionSettings.getValue());
assertEquals(ConnectionSettings.PROFILE_CONNECTION_LOCATION,
connectionSettings.getConnectionId());
@@ -63,7 +63,7 @@ public class ConnectionSettingsTest extends AndroidTestCase {
@SmallTest
public void testVerifyValue() {
int expectedValue = ConnectionSettings.BooleanState.STATE_DISALED;
int expectedValue = ConnectionSettings.BooleanState.STATE_DISABLED;
ConnectionSettings connectionSettings = new ConnectionSettings(
ConnectionSettings.PROFILE_CONNECTION_2G3G4G);
connectionSettings.setValue(expectedValue);

View File

@@ -53,7 +53,7 @@ public class ProfileTest extends AndroidTestCase {
Profile profile = new Profile("Connection Profile");
ConnectionSettings expectedConnectionSettings =
new ConnectionSettings(ConnectionSettings.PROFILE_CONNECTION_LOCATION,
ConnectionSettings.BooleanState.STATE_DISALED, true);
ConnectionSettings.BooleanState.STATE_DISABLED, true);
profile.setConnectionSettings(expectedConnectionSettings);
// Write to parcel
@@ -349,7 +349,7 @@ public class ProfileTest extends AndroidTestCase {
profile.setConnectionSettings(expectedConnectionSettings1);
ConnectionSettings expectedConnectionSettings2 = new ConnectionSettings(
ConnectionSettings.PROFILE_CONNECTION_BLUETOOTH,
ConnectionSettings.BooleanState.STATE_DISALED, false);
ConnectionSettings.BooleanState.STATE_DISABLED, false);
profile.setConnectionSettings(expectedConnectionSettings2);
List<ConnectionSettings> expectedConnectionSettings = new ArrayList<>();