Loading packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java +9 −4 Original line number Original line Diff line number Diff line Loading @@ -282,7 +282,7 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable, @GuardedBy("mSafetyWarningLock") @GuardedBy("mSafetyWarningLock") private CsdWarningDialog mCsdDialog; private CsdWarningDialog mCsdDialog; private boolean mHovering = false; private boolean mHovering = false; private final boolean mShowActiveStreamOnly; private final boolean mIsTv; private boolean mConfigChanged = false; private boolean mConfigChanged = false; private boolean mIsAnimatingDismiss = false; private boolean mIsAnimatingDismiss = false; private boolean mHasSeenODICaptionsTooltip; private boolean mHasSeenODICaptionsTooltip; Loading Loading @@ -343,7 +343,7 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable, mConfigurationController = configurationController; mConfigurationController = configurationController; mMediaOutputDialogManager = mediaOutputDialogManager; mMediaOutputDialogManager = mediaOutputDialogManager; mCsdWarningDialogFactory = csdWarningDialogFactory; mCsdWarningDialogFactory = csdWarningDialogFactory; mShowActiveStreamOnly = showActiveStreamOnly(); mIsTv = isTv(); mHasSeenODICaptionsTooltip = mHasSeenODICaptionsTooltip = Prefs.getBoolean(context, Prefs.Key.HAS_SEEN_ODI_CAPTIONS_TOOLTIP, false); Prefs.getBoolean(context, Prefs.Key.HAS_SEEN_ODI_CAPTIONS_TOOLTIP, false); mShowLowMediaVolumeIcon = mShowLowMediaVolumeIcon = Loading Loading @@ -1632,7 +1632,7 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable, Trace.endSection(); Trace.endSection(); } } private boolean showActiveStreamOnly() { private boolean isTv() { return mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_LEANBACK) return mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_LEANBACK) || mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_TELEVISION); || mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_TELEVISION); } } Loading @@ -1644,7 +1644,7 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable, return true; return true; } } if (!mShowActiveStreamOnly) { if (!mIsTv) { if (row.stream == AudioSystem.STREAM_ACCESSIBILITY) { if (row.stream == AudioSystem.STREAM_ACCESSIBILITY) { return mShowA11yStream; return mShowA11yStream; } } Loading Loading @@ -2089,6 +2089,11 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable, } } final int newProgress = getProgressFromVolume(row.ss, row.slider, vlevel); final int newProgress = getProgressFromVolume(row.ss, row.slider, vlevel); if (progress != newProgress) { if (progress != newProgress) { if (mIsTv) { // don't animate slider on TVs row.slider.setProgress(newProgress, false); return; } if (mShowing && rowVisible) { if (mShowing && rowVisible) { // animate! // animate! if (row.anim != null && row.anim.isRunning() if (row.anim != null && row.anim.isRunning() Loading Loading
packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java +9 −4 Original line number Original line Diff line number Diff line Loading @@ -282,7 +282,7 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable, @GuardedBy("mSafetyWarningLock") @GuardedBy("mSafetyWarningLock") private CsdWarningDialog mCsdDialog; private CsdWarningDialog mCsdDialog; private boolean mHovering = false; private boolean mHovering = false; private final boolean mShowActiveStreamOnly; private final boolean mIsTv; private boolean mConfigChanged = false; private boolean mConfigChanged = false; private boolean mIsAnimatingDismiss = false; private boolean mIsAnimatingDismiss = false; private boolean mHasSeenODICaptionsTooltip; private boolean mHasSeenODICaptionsTooltip; Loading Loading @@ -343,7 +343,7 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable, mConfigurationController = configurationController; mConfigurationController = configurationController; mMediaOutputDialogManager = mediaOutputDialogManager; mMediaOutputDialogManager = mediaOutputDialogManager; mCsdWarningDialogFactory = csdWarningDialogFactory; mCsdWarningDialogFactory = csdWarningDialogFactory; mShowActiveStreamOnly = showActiveStreamOnly(); mIsTv = isTv(); mHasSeenODICaptionsTooltip = mHasSeenODICaptionsTooltip = Prefs.getBoolean(context, Prefs.Key.HAS_SEEN_ODI_CAPTIONS_TOOLTIP, false); Prefs.getBoolean(context, Prefs.Key.HAS_SEEN_ODI_CAPTIONS_TOOLTIP, false); mShowLowMediaVolumeIcon = mShowLowMediaVolumeIcon = Loading Loading @@ -1632,7 +1632,7 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable, Trace.endSection(); Trace.endSection(); } } private boolean showActiveStreamOnly() { private boolean isTv() { return mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_LEANBACK) return mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_LEANBACK) || mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_TELEVISION); || mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_TELEVISION); } } Loading @@ -1644,7 +1644,7 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable, return true; return true; } } if (!mShowActiveStreamOnly) { if (!mIsTv) { if (row.stream == AudioSystem.STREAM_ACCESSIBILITY) { if (row.stream == AudioSystem.STREAM_ACCESSIBILITY) { return mShowA11yStream; return mShowA11yStream; } } Loading Loading @@ -2089,6 +2089,11 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable, } } final int newProgress = getProgressFromVolume(row.ss, row.slider, vlevel); final int newProgress = getProgressFromVolume(row.ss, row.slider, vlevel); if (progress != newProgress) { if (progress != newProgress) { if (mIsTv) { // don't animate slider on TVs row.slider.setProgress(newProgress, false); return; } if (mShowing && rowVisible) { if (mShowing && rowVisible) { // animate! // animate! if (row.anim != null && row.anim.isRunning() if (row.anim != null && row.anim.isRunning() Loading