No-op refactor on EmergencyGesturePreferenceController.
Move custom intent launching logic into a separate controller (EmergencyGestureEntrypointPreferenceController). This is in preparation of a mini-IA refresh and fixing a search bug. The custom intent logic is only needed by the entrypoint pref, and putting in the gesture PrefControler makes any fix hard to implement. Bug: 171067360 Bug: 172609395 Test: RunSettingsRoboTests Change-Id: I1e26393872bfada98db80a1cc33e3e13dacb086b
This commit is contained in:
@@ -22,12 +22,11 @@ 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 TogglePreferenceController {
|
||||
public class EmergencyGestureSoundPreferenceController extends GesturePreferenceController {
|
||||
|
||||
@VisibleForTesting
|
||||
static final int ON = 1;
|
||||
@@ -40,6 +39,11 @@ public class EmergencyGestureSoundPreferenceController extends TogglePreferenceC
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user