Merge "Default emergency gesture setting On."

This commit is contained in:
TreeHugger Robot
2021-01-21 02:49:25 +00:00
committed by Android (Google) Code Review
12 changed files with 29 additions and 37 deletions

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.android.settings.gestures;
package com.android.settings.emergency;
import android.content.Context;
import android.content.Intent;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.android.settings.gestures;
package com.android.settings.emergency;
import static android.content.DialogInterface.BUTTON_POSITIVE;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.android.settings.gestures;
package com.android.settings.emergency;
import static com.android.settingslib.emergencynumber.EmergencyNumberUtils.EMERGENCY_NUMBER_OVERRIDE_AUTHORITY;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.android.settings.gestures;
package com.android.settings.emergency;
import android.content.Context;
import android.provider.Settings;
@@ -71,7 +71,7 @@ public class EmergencyGesturePreferenceController extends BasePreferenceControll
@VisibleForTesting
public boolean isChecked() {
return Settings.Secure.getInt(mContext.getContentResolver(), SECURE_KEY, OFF) == ON;
return Settings.Secure.getInt(mContext.getContentResolver(), SECURE_KEY, ON) == ON;
}
@Override

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.android.settings.gestures;
package com.android.settings.emergency;
import android.app.settings.SettingsEnums;
import android.content.Context;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.android.settings.gestures;
package com.android.settings.emergency;
import android.content.Context;
import android.provider.Settings;
@@ -22,11 +22,12 @@ import android.provider.Settings;
import androidx.annotation.VisibleForTesting;
import com.android.settings.R;
import com.android.settings.core.TogglePreferenceController;
/**
* Preference controller for emergency sos gesture setting
*/
public class EmergencyGestureSoundPreferenceController extends GesturePreferenceController {
public class EmergencyGestureSoundPreferenceController extends TogglePreferenceController {
@VisibleForTesting
static final int ON = 1;
@@ -39,11 +40,6 @@ public class EmergencyGestureSoundPreferenceController extends GesturePreference
super(context, key);
}
@Override
protected String getVideoPrefKey() {
return "emergency_gesture_screen_video";
}
private static boolean isGestureAvailable(Context context) {
return context.getResources()
.getBoolean(R.bool.config_show_emergency_gesture_settings);