Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3f61958c authored by Lais Andrade's avatar Lais Andrade Committed by Android (Google) Code Review
Browse files

Merge "[Catalyst] Migrate ring vibration slider preference" into main

parents fb1a216e 8d4dcc74
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package com.android.settings.accessibility;
import android.content.Context;

/** Preference controller for ringtone vibration intensity */
// LINT.IfChange
public class RingVibrationIntensityPreferenceController
        extends VibrationIntensityPreferenceController {

@@ -37,3 +38,4 @@ public class RingVibrationIntensityPreferenceController
        return AVAILABLE;
    }
}
// LINT.ThenChange(RingVibrationIntensitySliderPreference.kt)
+37 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2025 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.android.settings.accessibility

import android.os.VibrationAttributes
import android.provider.Settings
import com.android.settings.R

/** Accessibility settings for ring vibration, using an intensity slider. */
// LINT.IfChange
class RingVibrationIntensitySliderPreference :
    VibrationIntensitySliderPreference(
        key = KEY,
        vibrationUsage = VibrationAttributes.USAGE_RINGTONE,
        title = R.string.accessibility_ring_vibration_title,
    ) {
    override val keywords: Int
        get() = R.string.keywords_ring_vibration

    companion object {
        const val KEY = Settings.System.RING_VIBRATION_INTENSITY
    }
}
// LINT.ThenChange(RingVibrationIntensityPreferenceController.java)
+1 −1
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@ import android.os.VibrationAttributes
import android.provider.Settings
import com.android.settings.R

/** Accessibility settings for ring vibration. */
/** Accessibility settings for ring vibration, using a switch toggle. */
// LINT.IfChange
class RingVibrationIntensitySwitchPreference :
    VibrationIntensitySwitchPreference(
+1 −1
Original line number Diff line number Diff line
@@ -31,4 +31,4 @@ public class RingVibrationTogglePreferenceController extends VibrationTogglePref
        return AVAILABLE;
    }
}
// LINT.ThenChange(RingVibrationIntensitySwitchPreference.java)
// LINT.ThenChange(RingVibrationIntensitySwitchPreference.kt)
+2 −0
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@ import com.android.settingslib.widget.SliderPreference;
 * Abstract preference controller for a vibration intensity setting, that displays multiple
 * intensity levels to the user as a slider.
 */
// LINT.IfChange
public abstract class VibrationIntensityPreferenceController extends SliderPreferenceController
        implements LifecycleObserver, OnStart, OnStop {

@@ -139,3 +140,4 @@ public abstract class VibrationIntensityPreferenceController extends SliderPrefe
        return position;
    }
}
// LINT.ThenChange(VibrationIntensitySliderPreference.kt)
Loading