Remove Language and Input duplicates
Change the keys in the Language and Input screen for the gesture and tts-output settings so they can be disabled in search. Then change the preference controllers to take a key as input to avoid crashes on the other screens with these settings. Merge for: ag/2098173/ Test: make RunSettingsRoboTests Bug: 33701673 Change-Id: I8bc0776131fcac5a6edf7e8271bc53252c2fc719
This commit is contained in:
@@ -21,26 +21,24 @@ import android.content.Context;
|
||||
import android.provider.Settings;
|
||||
import android.support.v7.preference.Preference;
|
||||
|
||||
import android.util.ArrayMap;
|
||||
import com.android.internal.hardware.AmbientDisplayConfiguration;
|
||||
import com.android.settings.search2.InlineSwitchPayload;
|
||||
import com.android.settings.search2.ResultPayload;
|
||||
import com.android.settingslib.core.lifecycle.Lifecycle;
|
||||
|
||||
public class PickupGesturePreferenceController extends GesturePreferenceController {
|
||||
|
||||
private static final String PREF_VIDEO_KEY = "gesture_pick_up_video";
|
||||
private static final String PREF_KEY_PICK_UP = "gesture_pick_up";
|
||||
private final String mPickUpPrefKey;
|
||||
|
||||
private final AmbientDisplayConfiguration mAmbientConfig;
|
||||
@UserIdInt
|
||||
private final int mUserId;
|
||||
|
||||
public PickupGesturePreferenceController(Context context, Lifecycle lifecycle,
|
||||
AmbientDisplayConfiguration config, @UserIdInt int userId) {
|
||||
AmbientDisplayConfiguration config, @UserIdInt int userId, String key) {
|
||||
super(context, lifecycle);
|
||||
mAmbientConfig = config;
|
||||
mUserId = userId;
|
||||
mPickUpPrefKey = key;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -60,7 +58,7 @@ public class PickupGesturePreferenceController extends GesturePreferenceControll
|
||||
|
||||
@Override
|
||||
public String getPreferenceKey() {
|
||||
return PREF_KEY_PICK_UP;
|
||||
return mPickUpPrefKey;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user