Merge "Update the illustrations to Lottie format." into sc-dev
This commit is contained in:
0
res/raw/lottie_adaptive_battery.json
Normal file
0
res/raw/lottie_adaptive_battery.json
Normal file
File diff suppressed because one or more lines are too long
0
res/raw/lottie_flip_camera_for_selfie.json
Normal file
0
res/raw/lottie_flip_camera_for_selfie.json
Normal file
0
res/raw/lottie_lift_to_check_phone.json
Normal file
0
res/raw/lottie_lift_to_check_phone.json
Normal file
0
res/raw/lottie_one_hand_mode.json
Normal file
0
res/raw/lottie_one_hand_mode.json
Normal file
0
res/raw/lottie_prevent_ringing.json
Normal file
0
res/raw/lottie_prevent_ringing.json
Normal file
0
res/raw/lottie_quick_open_camera.json
Normal file
0
res/raw/lottie_quick_open_camera.json
Normal file
0
res/raw/lottie_swipe_fingerprint.json
Normal file
0
res/raw/lottie_swipe_fingerprint.json
Normal file
0
res/raw/lottie_tap_to_check_phone.json
Normal file
0
res/raw/lottie_tap_to_check_phone.json
Normal file
@@ -25,6 +25,7 @@
|
||||
|
||||
<com.android.settingslib.widget.IllustrationPreference
|
||||
android:key="bubbles_illustration"
|
||||
settings:searchable="false"
|
||||
app:lottie_rawRes="@raw/lottie_bubbles"/>
|
||||
|
||||
<com.android.settingslib.widget.MainSwitchPreference
|
||||
|
@@ -17,21 +17,20 @@
|
||||
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:settings="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:title="@string/double_tap_power_for_camera_title">
|
||||
|
||||
<com.android.settings.widget.VideoPreference
|
||||
<com.android.settingslib.widget.IllustrationPreference
|
||||
android:key="gesture_double_tap_power_video"
|
||||
app:animation="@raw/gesture_double_tap"
|
||||
app:preview="@drawable/gesture_double_tap"
|
||||
app:controller="com.android.settings.widget.VideoPreferenceController" />
|
||||
settings:searchable="false"
|
||||
app:lottie_rawRes="@raw/lottie_quick_open_camera"/>
|
||||
|
||||
<SwitchPreference
|
||||
android:key="gesture_double_tap_power"
|
||||
android:title="@string/double_tap_power_for_camera_title"
|
||||
android:summary="@string/double_tap_power_for_camera_summary"
|
||||
app:keywords="@string/keywords_gesture"
|
||||
app:controller="com.android.settings.gestures.DoubleTapPowerPreferenceController"
|
||||
app:allowDividerAbove="true" />
|
||||
app:controller="com.android.settings.gestures.DoubleTapPowerPreferenceController"/>
|
||||
|
||||
</PreferenceScreen>
|
||||
|
@@ -17,21 +17,20 @@
|
||||
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:settings="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:title="@string/double_twist_for_camera_mode_title">
|
||||
|
||||
<com.android.settings.widget.VideoPreference
|
||||
<com.android.settingslib.widget.IllustrationPreference
|
||||
android:key="gesture_double_twist_video"
|
||||
app:animation="@raw/gesture_twist"
|
||||
app:preview="@drawable/gesture_twist"
|
||||
app:controller="com.android.settings.widget.VideoPreferenceController" />
|
||||
settings:searchable="false"
|
||||
app:lottie_rawRes="@raw/lottie_flip_camera_for_selfie"/>
|
||||
|
||||
<SwitchPreference
|
||||
android:key="gesture_double_twist"
|
||||
android:title="@string/double_twist_for_camera_mode_title"
|
||||
android:summary="@string/double_twist_for_camera_mode_summary"
|
||||
app:keywords="@string/keywords_gesture"
|
||||
app:controller="com.android.settings.gestures.DoubleTwistPreferenceController"
|
||||
app:allowDividerAbove="true" />
|
||||
app:controller="com.android.settings.gestures.DoubleTwistPreferenceController" />
|
||||
|
||||
</PreferenceScreen>
|
||||
|
@@ -18,16 +18,14 @@
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:settings="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:persistent="false"
|
||||
android:title="@string/one_handed_title">
|
||||
|
||||
<com.android.settingslib.widget.LayoutPreference
|
||||
<com.android.settingslib.widget.IllustrationPreference
|
||||
android:key="one_handed_header"
|
||||
android:layout="@layout/one_handed_header"
|
||||
android:persistent="false"
|
||||
android:selectable="false"
|
||||
settings:allowDividerBelow="false"
|
||||
settings:searchable="false"/>
|
||||
settings:searchable="false"
|
||||
app:lottie_rawRes="@raw/lottie_one_hand_mode"/>
|
||||
|
||||
<com.android.settingslib.widget.MainSwitchPreference
|
||||
android:key="gesture_one_handed_mode_enabled_main_switch"
|
||||
|
@@ -17,21 +17,21 @@
|
||||
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:settings="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:title="@string/ambient_display_pickup_title">
|
||||
|
||||
<com.android.settings.widget.VideoPreference
|
||||
<com.android.settingslib.widget.IllustrationPreference
|
||||
android:key="gesture_pick_up_video"
|
||||
app:animation="@raw/gesture_ambient_lift"
|
||||
app:preview="@drawable/gesture_ambient_lift"
|
||||
app:controller="com.android.settings.widget.VideoPreferenceController" />
|
||||
settings:searchable="false"
|
||||
app:lottie_rawRes="@raw/lottie_lift_to_check_phone"/>
|
||||
|
||||
|
||||
<SwitchPreference
|
||||
android:key="gesture_pick_up"
|
||||
android:title="@string/ambient_display_pickup_title"
|
||||
android:summary="@string/ambient_display_pickup_summary"
|
||||
app:keywords="@string/keywords_gesture"
|
||||
app:controller="com.android.settings.gestures.PickupGesturePreferenceController"
|
||||
app:allowDividerAbove="true" />
|
||||
app:controller="com.android.settings.gestures.PickupGesturePreferenceController" />
|
||||
|
||||
</PreferenceScreen>
|
||||
|
@@ -17,14 +17,14 @@
|
||||
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:settings="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:title="@string/gesture_prevent_ringing_screen_title">
|
||||
|
||||
<com.android.settings.widget.VideoPreference
|
||||
<com.android.settingslib.widget.IllustrationPreference
|
||||
android:key="gesture_prevent_ringing_video"
|
||||
app:animation="@raw/gesture_prevent_ringing"
|
||||
app:preview="@drawable/gesture_prevent_ringing"
|
||||
app:controller="com.android.settings.widget.VideoPreferenceController" />
|
||||
settings:searchable="false"
|
||||
app:lottie_rawRes="@raw/lottie_prevent_ringing"/>
|
||||
|
||||
<com.android.settingslib.widget.MainSwitchPreference
|
||||
android:key="gesture_prevent_ringing_switch" />
|
||||
|
@@ -16,22 +16,21 @@
|
||||
-->
|
||||
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:settings="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:key="gesture_swipe_down_fingerprint_screen"
|
||||
android:title="@string/fingerprint_gesture_screen_title">
|
||||
|
||||
<com.android.settings.widget.VideoPreference
|
||||
<com.android.settingslib.widget.IllustrationPreference
|
||||
android:key="gesture_swipe_down_fingerprint_video"
|
||||
app:animation="@raw/gesture_fingerprint_swipe"
|
||||
app:preview="@drawable/gesture_fingerprint_swipe"
|
||||
app:controller="com.android.settings.widget.VideoPreferenceController" />
|
||||
settings:searchable="false"
|
||||
app:lottie_rawRes="@raw/lottie_swipe_fingerprint"/>
|
||||
|
||||
<SwitchPreference
|
||||
android:key="gesture_swipe_down_fingerprint"
|
||||
android:title="@string/fingerprint_swipe_for_notifications_title"
|
||||
android:summary="@string/fingerprint_swipe_for_notifications_summary"
|
||||
app:keywords="@string/keywords_gesture"
|
||||
app:controller="com.android.settings.gestures.SwipeToNotificationPreferenceController"
|
||||
app:allowDividerAbove="true" />
|
||||
app:controller="com.android.settings.gestures.SwipeToNotificationPreferenceController" />
|
||||
|
||||
</PreferenceScreen>
|
@@ -17,21 +17,20 @@
|
||||
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:settings="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:title="@string/ambient_display_tap_screen_title">
|
||||
|
||||
<com.android.settings.widget.VideoPreference
|
||||
<com.android.settingslib.widget.IllustrationPreference
|
||||
android:key="gesture_tap_screen_video"
|
||||
app:animation="@raw/gesture_ambient_tap_screen"
|
||||
app:preview="@drawable/gesture_ambient_tap_screen"
|
||||
app:controller="com.android.settings.widget.VideoPreferenceController" />
|
||||
settings:searchable="false"
|
||||
app:lottie_rawRes="@raw/lottie_tap_to_check_phone"/>
|
||||
|
||||
<SwitchPreference
|
||||
android:key="gesture_tap"
|
||||
android:title="@string/ambient_display_tap_screen_title"
|
||||
android:summary="@string/ambient_display_tap_screen_summary"
|
||||
app:keywords="@string/keywords_gesture"
|
||||
app:controller="com.android.settings.gestures.TapScreenGesturePreferenceController"
|
||||
app:allowDividerAbove="true" />
|
||||
app:controller="com.android.settings.gestures.TapScreenGesturePreferenceController" />
|
||||
|
||||
</PreferenceScreen>
|
||||
|
@@ -42,9 +42,12 @@ public abstract class GesturePreferenceController extends TogglePreferenceContro
|
||||
public void displayPreference(PreferenceScreen screen) {
|
||||
super.displayPreference(screen);
|
||||
if (isAvailable()) {
|
||||
final Preference pref = screen.findPreference(getVideoPrefKey());
|
||||
if (pref instanceof VideoPreference) {
|
||||
mVideoPreference = screen.findPreference(getVideoPrefKey());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateState(Preference preference) {
|
||||
|
@@ -30,7 +30,6 @@ import androidx.preference.PreferenceScreen;
|
||||
import com.android.internal.annotations.VisibleForTesting;
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.core.PreferenceControllerMixin;
|
||||
import com.android.settings.widget.VideoPreference;
|
||||
import com.android.settingslib.core.AbstractPreferenceController;
|
||||
import com.android.settingslib.core.lifecycle.Lifecycle;
|
||||
import com.android.settingslib.core.lifecycle.LifecycleObserver;
|
||||
@@ -52,8 +51,6 @@ public class PreventRingingGesturePreferenceController extends AbstractPreferenc
|
||||
private final String KEY = "gesture_prevent_ringing_category";
|
||||
private final Context mContext;
|
||||
|
||||
private VideoPreference mVideoPreference;
|
||||
|
||||
@VisibleForTesting
|
||||
PreferenceCategory mPreferenceCategory;
|
||||
@VisibleForTesting
|
||||
@@ -85,8 +82,6 @@ public class PreventRingingGesturePreferenceController extends AbstractPreferenc
|
||||
if (mPreferenceCategory != null) {
|
||||
mSettingObserver = new SettingObserver(mPreferenceCategory);
|
||||
}
|
||||
|
||||
mVideoPreference = screen.findPreference(getVideoPrefKey());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -142,10 +137,6 @@ public class PreventRingingGesturePreferenceController extends AbstractPreferenc
|
||||
mSettingObserver.register(mContext.getContentResolver());
|
||||
mSettingObserver.onChange(false, null);
|
||||
}
|
||||
|
||||
if (mVideoPreference != null) {
|
||||
mVideoPreference.onViewVisible();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -153,10 +144,6 @@ public class PreventRingingGesturePreferenceController extends AbstractPreferenc
|
||||
if (mSettingObserver != null) {
|
||||
mSettingObserver.unregister(mContext.getContentResolver());
|
||||
}
|
||||
|
||||
if (mVideoPreference != null) {
|
||||
mVideoPreference.onViewInvisible();
|
||||
}
|
||||
}
|
||||
|
||||
private int keyToSetting(String key) {
|
||||
|
Reference in New Issue
Block a user