Loading packages/SystemUI/res/values-television/config.xml +6 −0 Original line number Diff line number Diff line Loading @@ -48,4 +48,10 @@ <!-- Change the volume row tint when it is inactive, i.e. when it is being dismissed --> <bool name="config_changeVolumeRowTintWhenInactive">false</bool> <!-- The duraction of the show animation for the volume dialog in milliseconds --> <integer name="config_dialogShowAnimationDurationMs">600</integer> <!-- The duraction of the hide animation for the volume dialog in milliseconds --> <integer name="config_dialogHideAnimationDurationMs">400</integer> </resources> packages/SystemUI/res/values/config.xml +6 −0 Original line number Diff line number Diff line Loading @@ -565,4 +565,10 @@ <!-- Change the volume row tint when it is inactive, i.e. when it is being dismissed --> <bool name="config_changeVolumeRowTintWhenInactive">true</bool> <!-- The duraction of the show animation for the volume dialog in milliseconds --> <integer name="config_dialogShowAnimationDurationMs">300</integer> <!-- The duraction of the hide animation for the volume dialog in milliseconds --> <integer name="config_dialogHideAnimationDurationMs">250</integer> </resources> packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java +13 −9 Original line number Diff line number Diff line Loading @@ -122,8 +122,11 @@ public class VolumeDialogImpl implements VolumeDialog, static final int DIALOG_SAFETYWARNING_TIMEOUT_MILLIS = 5000; static final int DIALOG_ODI_CAPTIONS_TOOLTIP_TIMEOUT_MILLIS = 5000; static final int DIALOG_HOVERING_TIMEOUT_MILLIS = 16000; static final int DIALOG_SHOW_ANIMATION_DURATION = 300; static final int DIALOG_HIDE_ANIMATION_DURATION = 250; private final int mDialogShowAnimationDurationMs; private final int mDialogHideAnimationDurationMs; private final boolean mShowLowMediaVolumeIcon; private final boolean mChangeVolumeRowTintWhenInactive; private final Context mContext; private final H mHandler = new H(); Loading Loading @@ -154,9 +157,6 @@ public class VolumeDialogImpl implements VolumeDialog, private boolean mShowing; private boolean mShowA11yStream; private final boolean mShowLowMediaVolumeIcon; private final boolean mChangeVolumeRowTintWhenInactive; private int mActiveStream; private int mPrevActiveStream; private boolean mAutomute = VolumePrefs.DEFAULT_ENABLE_AUTOMUTE; Loading Loading @@ -186,6 +186,10 @@ public class VolumeDialogImpl implements VolumeDialog, mContext.getResources().getBoolean(R.bool.config_showLowMediaVolumeIcon); mChangeVolumeRowTintWhenInactive = mContext.getResources().getBoolean(R.bool.config_changeVolumeRowTintWhenInactive); mDialogShowAnimationDurationMs = mContext.getResources().getInteger(R.integer.config_dialogShowAnimationDurationMs); mDialogHideAnimationDurationMs = mContext.getResources().getInteger(R.integer.config_dialogHideAnimationDurationMs); } @Override Loading Loading @@ -275,7 +279,7 @@ public class VolumeDialogImpl implements VolumeDialog, mDialogView.animate() .alpha(1) .translationX(0) .setDuration(DIALOG_SHOW_ANIMATION_DURATION) .setDuration(mDialogShowAnimationDurationMs) .setInterpolator(new SystemUIInterpolators.LogDecelerateInterpolator()) .withEndAction(() -> { if (!Prefs.getBoolean(mContext, Prefs.Key.TOUCHED_RINGER_TOGGLE, false)) { Loading Loading @@ -595,7 +599,7 @@ public class VolumeDialogImpl implements VolumeDialog, mODICaptionsTooltipView.setAlpha(0.f); mODICaptionsTooltipView.animate() .alpha(1.f) .setStartDelay(DIALOG_SHOW_ANIMATION_DURATION) .setStartDelay(mDialogShowAnimationDurationMs) .withEndAction(() -> { if (D.BUG) Log.d(TAG, "tool:checkODICaptionsTooltip() putBoolean true"); Prefs.putBoolean(mContext, Loading @@ -617,7 +621,7 @@ public class VolumeDialogImpl implements VolumeDialog, mODICaptionsTooltipView.animate() .alpha(0.f) .setStartDelay(0) .setDuration(DIALOG_HIDE_ANIMATION_DURATION) .setDuration(mDialogHideAnimationDurationMs) .withEndAction(() -> mODICaptionsTooltipView.setVisibility(INVISIBLE)) .start(); } Loading Loading @@ -796,7 +800,7 @@ public class VolumeDialogImpl implements VolumeDialog, mDialogView.setAlpha(1); ViewPropertyAnimator animator = mDialogView.animate() .alpha(0) .setDuration(DIALOG_HIDE_ANIMATION_DURATION) .setDuration(mDialogHideAnimationDurationMs) .setInterpolator(new SystemUIInterpolators.LogAccelerateInterpolator()) .withEndAction(() -> mHandler.postDelayed(() -> { mDialog.dismiss(); Loading Loading
packages/SystemUI/res/values-television/config.xml +6 −0 Original line number Diff line number Diff line Loading @@ -48,4 +48,10 @@ <!-- Change the volume row tint when it is inactive, i.e. when it is being dismissed --> <bool name="config_changeVolumeRowTintWhenInactive">false</bool> <!-- The duraction of the show animation for the volume dialog in milliseconds --> <integer name="config_dialogShowAnimationDurationMs">600</integer> <!-- The duraction of the hide animation for the volume dialog in milliseconds --> <integer name="config_dialogHideAnimationDurationMs">400</integer> </resources>
packages/SystemUI/res/values/config.xml +6 −0 Original line number Diff line number Diff line Loading @@ -565,4 +565,10 @@ <!-- Change the volume row tint when it is inactive, i.e. when it is being dismissed --> <bool name="config_changeVolumeRowTintWhenInactive">true</bool> <!-- The duraction of the show animation for the volume dialog in milliseconds --> <integer name="config_dialogShowAnimationDurationMs">300</integer> <!-- The duraction of the hide animation for the volume dialog in milliseconds --> <integer name="config_dialogHideAnimationDurationMs">250</integer> </resources>
packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java +13 −9 Original line number Diff line number Diff line Loading @@ -122,8 +122,11 @@ public class VolumeDialogImpl implements VolumeDialog, static final int DIALOG_SAFETYWARNING_TIMEOUT_MILLIS = 5000; static final int DIALOG_ODI_CAPTIONS_TOOLTIP_TIMEOUT_MILLIS = 5000; static final int DIALOG_HOVERING_TIMEOUT_MILLIS = 16000; static final int DIALOG_SHOW_ANIMATION_DURATION = 300; static final int DIALOG_HIDE_ANIMATION_DURATION = 250; private final int mDialogShowAnimationDurationMs; private final int mDialogHideAnimationDurationMs; private final boolean mShowLowMediaVolumeIcon; private final boolean mChangeVolumeRowTintWhenInactive; private final Context mContext; private final H mHandler = new H(); Loading Loading @@ -154,9 +157,6 @@ public class VolumeDialogImpl implements VolumeDialog, private boolean mShowing; private boolean mShowA11yStream; private final boolean mShowLowMediaVolumeIcon; private final boolean mChangeVolumeRowTintWhenInactive; private int mActiveStream; private int mPrevActiveStream; private boolean mAutomute = VolumePrefs.DEFAULT_ENABLE_AUTOMUTE; Loading Loading @@ -186,6 +186,10 @@ public class VolumeDialogImpl implements VolumeDialog, mContext.getResources().getBoolean(R.bool.config_showLowMediaVolumeIcon); mChangeVolumeRowTintWhenInactive = mContext.getResources().getBoolean(R.bool.config_changeVolumeRowTintWhenInactive); mDialogShowAnimationDurationMs = mContext.getResources().getInteger(R.integer.config_dialogShowAnimationDurationMs); mDialogHideAnimationDurationMs = mContext.getResources().getInteger(R.integer.config_dialogHideAnimationDurationMs); } @Override Loading Loading @@ -275,7 +279,7 @@ public class VolumeDialogImpl implements VolumeDialog, mDialogView.animate() .alpha(1) .translationX(0) .setDuration(DIALOG_SHOW_ANIMATION_DURATION) .setDuration(mDialogShowAnimationDurationMs) .setInterpolator(new SystemUIInterpolators.LogDecelerateInterpolator()) .withEndAction(() -> { if (!Prefs.getBoolean(mContext, Prefs.Key.TOUCHED_RINGER_TOGGLE, false)) { Loading Loading @@ -595,7 +599,7 @@ public class VolumeDialogImpl implements VolumeDialog, mODICaptionsTooltipView.setAlpha(0.f); mODICaptionsTooltipView.animate() .alpha(1.f) .setStartDelay(DIALOG_SHOW_ANIMATION_DURATION) .setStartDelay(mDialogShowAnimationDurationMs) .withEndAction(() -> { if (D.BUG) Log.d(TAG, "tool:checkODICaptionsTooltip() putBoolean true"); Prefs.putBoolean(mContext, Loading @@ -617,7 +621,7 @@ public class VolumeDialogImpl implements VolumeDialog, mODICaptionsTooltipView.animate() .alpha(0.f) .setStartDelay(0) .setDuration(DIALOG_HIDE_ANIMATION_DURATION) .setDuration(mDialogHideAnimationDurationMs) .withEndAction(() -> mODICaptionsTooltipView.setVisibility(INVISIBLE)) .start(); } Loading Loading @@ -796,7 +800,7 @@ public class VolumeDialogImpl implements VolumeDialog, mDialogView.setAlpha(1); ViewPropertyAnimator animator = mDialogView.animate() .alpha(0) .setDuration(DIALOG_HIDE_ANIMATION_DURATION) .setDuration(mDialogHideAnimationDurationMs) .setInterpolator(new SystemUIInterpolators.LogAccelerateInterpolator()) .withEndAction(() -> mHandler.postDelayed(() -> { mDialog.dismiss(); Loading