Merge "Update lottie illustration for tablet" into tm-qpr-dev
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
res/raw-sw600dp/lottie_system_nav_3_button.json
Normal file
1
res/raw-sw600dp/lottie_system_nav_3_button.json
Normal file
File diff suppressed because one or more lines are too long
1
res/raw-sw600dp/lottie_system_nav_fully_gestural.json
Normal file
1
res/raw-sw600dp/lottie_system_nav_fully_gestural.json
Normal file
File diff suppressed because one or more lines are too long
@@ -27,6 +27,7 @@
|
|||||||
android:key="bubbles_illustration"
|
android:key="bubbles_illustration"
|
||||||
settings:searchable="false"
|
settings:searchable="false"
|
||||||
app:lottie_rawRes="@raw/lottie_bubbles"
|
app:lottie_rawRes="@raw/lottie_bubbles"
|
||||||
|
settings:dynamicColor="true"
|
||||||
settings:controller="com.android.settings.notification.BubbleNotificationIllustrationPreferenceController"/>
|
settings:controller="com.android.settings.notification.BubbleNotificationIllustrationPreferenceController"/>
|
||||||
|
|
||||||
<com.android.settingslib.widget.MainSwitchPreference
|
<com.android.settingslib.widget.MainSwitchPreference
|
||||||
|
@@ -18,6 +18,7 @@ package com.android.settings.gestures;
|
|||||||
|
|
||||||
import static android.os.UserHandle.USER_CURRENT;
|
import static android.os.UserHandle.USER_CURRENT;
|
||||||
import static android.provider.Settings.Secure.ACCESSIBILITY_BUTTON_MODE_FLOATING_MENU;
|
import static android.provider.Settings.Secure.ACCESSIBILITY_BUTTON_MODE_FLOATING_MENU;
|
||||||
|
import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY;
|
||||||
import static android.view.WindowManagerPolicyConstants.NAV_BAR_MODE_2BUTTON_OVERLAY;
|
import static android.view.WindowManagerPolicyConstants.NAV_BAR_MODE_2BUTTON_OVERLAY;
|
||||||
import static android.view.WindowManagerPolicyConstants.NAV_BAR_MODE_3BUTTON_OVERLAY;
|
import static android.view.WindowManagerPolicyConstants.NAV_BAR_MODE_3BUTTON_OVERLAY;
|
||||||
import static android.view.WindowManagerPolicyConstants.NAV_BAR_MODE_GESTURAL_OVERLAY;
|
import static android.view.WindowManagerPolicyConstants.NAV_BAR_MODE_GESTURAL_OVERLAY;
|
||||||
@@ -74,6 +75,8 @@ public class SystemNavigationGestureSettings extends RadioButtonPickerFragment i
|
|||||||
|
|
||||||
private static final String KEY_SHOW_A11Y_TUTORIAL_DIALOG = "show_a11y_tutorial_dialog_bool";
|
private static final String KEY_SHOW_A11Y_TUTORIAL_DIALOG = "show_a11y_tutorial_dialog_bool";
|
||||||
|
|
||||||
|
private static final int MIN_LARGESCREEN_WIDTH_DP = 600;
|
||||||
|
|
||||||
private boolean mA11yTutorialDialogShown = false;
|
private boolean mA11yTutorialDialogShown = false;
|
||||||
|
|
||||||
private IOverlayManager mOverlayManager;
|
private IOverlayManager mOverlayManager;
|
||||||
@@ -112,6 +115,11 @@ public class SystemNavigationGestureSettings extends RadioButtonPickerFragment i
|
|||||||
ServiceManager.getService(Context.OVERLAY_SERVICE));
|
ServiceManager.getService(Context.OVERLAY_SERVICE));
|
||||||
|
|
||||||
mVideoPreference = new IllustrationPreference(context);
|
mVideoPreference = new IllustrationPreference(context);
|
||||||
|
Context windowContext = context.createWindowContext(TYPE_APPLICATION_OVERLAY, null);
|
||||||
|
if (windowContext.getResources()
|
||||||
|
.getConfiguration().smallestScreenWidthDp >= MIN_LARGESCREEN_WIDTH_DP) {
|
||||||
|
mVideoPreference.applyDynamicColor();
|
||||||
|
}
|
||||||
setIllustrationVideo(mVideoPreference, getDefaultKey());
|
setIllustrationVideo(mVideoPreference, getDefaultKey());
|
||||||
|
|
||||||
migrateOverlaySensitivityToSettings(context, mOverlayManager);
|
migrateOverlaySensitivityToSettings(context, mOverlayManager);
|
||||||
|
@@ -18,11 +18,7 @@ package com.android.settings.notification;
|
|||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
|
||||||
import androidx.preference.PreferenceScreen;
|
|
||||||
|
|
||||||
import com.android.settings.core.BasePreferenceController;
|
import com.android.settings.core.BasePreferenceController;
|
||||||
import com.android.settingslib.widget.IllustrationPreference;
|
|
||||||
import com.android.settingslib.widget.LottieColorUtils;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Controller for the illustration shown for the feature level settings screen for bubbles.
|
* Controller for the illustration shown for the feature level settings screen for bubbles.
|
||||||
@@ -37,13 +33,4 @@ public class BubbleNotificationIllustrationPreferenceController extends BasePref
|
|||||||
public int getAvailabilityStatus() {
|
public int getAvailabilityStatus() {
|
||||||
return AVAILABLE;
|
return AVAILABLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void displayPreference(PreferenceScreen screen) {
|
|
||||||
super.displayPreference(screen);
|
|
||||||
IllustrationPreference illustrationPreference = screen.findPreference(getPreferenceKey());
|
|
||||||
illustrationPreference.setOnBindListener(animationView -> {
|
|
||||||
LottieColorUtils.applyDynamicColors(mContext, animationView);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user