Loading packages/SystemUI/res/drawable/audio_bars_playing.xml 0 → 100644 +457 −0 File added.Preview size limit exceeded, changes collapsed. Show changes packages/SystemUI/res/layout/volume_dialog.xml +7 −7 Original line number Diff line number Diff line Loading @@ -13,9 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. --> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:sysui="http://schemas.android.com/apk/res-auto" <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:androidprv="http://schemas.android.com/apk/prv/res/android" android:id="@+id/volume_dialog_container" android:layout_width="wrap_content" Loading Loading @@ -96,16 +94,18 @@ android:paddingLeft="@dimen/volume_dialog_ringer_rows_padding" android:paddingBottom="@dimen/volume_dialog_ringer_rows_padding" android:paddingRight="@dimen/volume_dialog_ringer_rows_padding"> <com.android.keyguard.AlphaOptimizedImageButton android:id="@+id/settings" android:src="@drawable/horizontal_ellipsis" android:layout_width="@dimen/volume_dialog_tap_target_size" android:layout_height="@dimen/volume_dialog_tap_target_size" android:layout_gravity="center" android:contentDescription="@string/accessibility_volume_settings" android:background="@drawable/ripple_drawable_20dp" android:tint="?androidprv:attr/colorAccent" android:soundEffectsEnabled="false" /> android:contentDescription="@string/accessibility_volume_settings" android:scaleType="centerInside" android:soundEffectsEnabled="false" android:src="@drawable/horizontal_ellipsis" android:tint="?androidprv:attr/colorAccent" /> </FrameLayout> </LinearLayout> Loading packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java +6 −0 Original line number Diff line number Diff line Loading @@ -136,6 +136,7 @@ import com.android.systemui.util.AlphaTintDrawableWrapper; import com.android.systemui.util.RoundedCornerProgressDrawable; import com.android.systemui.util.settings.SecureSettings; import com.android.systemui.volume.domain.interactor.VolumePanelNavigationInteractor; import com.android.systemui.volume.ui.binder.VolumeDialogMenuIconBinder; import com.android.systemui.volume.ui.navigation.VolumeNavigator; import dagger.Lazy; Loading Loading @@ -311,6 +312,7 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable, private int mDialogTimeoutMillis; private final VibratorHelper mVibratorHelper; private final com.android.systemui.util.time.SystemClock mSystemClock; private final VolumeDialogMenuIconBinder mVolumeDialogMenuIconBinder; public VolumeDialogImpl( Context context, Loading @@ -329,6 +331,7 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable, DumpManager dumpManager, Lazy<SecureSettings> secureSettings, VibratorHelper vibratorHelper, VolumeDialogMenuIconBinder volumeDialogMenuIconBinder, com.android.systemui.util.time.SystemClock systemClock) { mContext = new ContextThemeWrapper(context, R.style.volume_dialog_theme); Loading Loading @@ -361,6 +364,7 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable, mVolumePanelNavigationInteractor = volumePanelNavigationInteractor; mVolumeNavigator = volumeNavigator; mSecureSettings = secureSettings; mVolumeDialogMenuIconBinder = volumeDialogMenuIconBinder; mDialogTimeoutMillis = DIALOG_TIMEOUT_MILLIS; dumpManager.registerDumpable("VolumeDialogImpl", this); Loading Loading @@ -436,6 +440,7 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable, if (mDevicePostureController != null) { mDevicePostureController.removeCallback(mDevicePostureControllerCallback); } mVolumeDialogMenuIconBinder.destroy(); } @Override Loading Loading @@ -671,6 +676,7 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable, mSettingsView = mDialog.findViewById(R.id.settings_container); mSettingsIcon = mDialog.findViewById(R.id.settings); mVolumeDialogMenuIconBinder.bind(mSettingsIcon); if (mRows.isEmpty()) { if (!AudioSystem.isSingleVolume(mContext)) { Loading packages/SystemUI/src/com/android/systemui/volume/VolumeDialogModule.kt 0 → 100644 +46 −0 Original line number Diff line number Diff line /* * Copyright (C) 2024 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.systemui.volume import com.android.systemui.volume.panel.shared.flag.VolumePanelFlag import com.android.systemui.volume.ui.viewmodel.AnimatedVolumeMenuIconViewModel import com.android.systemui.volume.ui.viewmodel.StaticVolumeMenuIconViewModel import com.android.systemui.volume.ui.viewmodel.VolumeMenuIconViewModel import dagger.Lazy import dagger.Module import dagger.Provides @Module interface VolumeDialogModule { companion object { @Provides fun provideVolumeMenuIconViewModel( volumePanelFlag: VolumePanelFlag, static: Lazy<StaticVolumeMenuIconViewModel>, animated: Lazy<AnimatedVolumeMenuIconViewModel>, ): VolumeMenuIconViewModel { return if (volumePanelFlag.canUseNewVolumePanel()) { animated } else { static } .get() } } } packages/SystemUI/src/com/android/systemui/volume/dagger/VolumeModule.java +5 −0 Original line number Diff line number Diff line Loading @@ -38,11 +38,13 @@ import com.android.systemui.volume.CsdWarningDialog; import com.android.systemui.volume.VolumeComponent; import com.android.systemui.volume.VolumeDialogComponent; import com.android.systemui.volume.VolumeDialogImpl; import com.android.systemui.volume.VolumeDialogModule; import com.android.systemui.volume.VolumePanelDialogReceiver; import com.android.systemui.volume.VolumeUI; import com.android.systemui.volume.domain.interactor.VolumePanelNavigationInteractor; import com.android.systemui.volume.panel.dagger.VolumePanelComponent; import com.android.systemui.volume.panel.dagger.factory.VolumePanelComponentFactory; import com.android.systemui.volume.ui.binder.VolumeDialogMenuIconBinder; import com.android.systemui.volume.ui.navigation.VolumeNavigator; import dagger.Binds; Loading @@ -61,6 +63,7 @@ import dagger.multibindings.IntoSet; CaptioningModule.class, MediaDevicesModule.class, SpatializerModule.class, VolumeDialogModule.class, }, subcomponents = { VolumePanelComponent.class Loading Loading @@ -112,6 +115,7 @@ public interface VolumeModule { DumpManager dumpManager, Lazy<SecureSettings> secureSettings, VibratorHelper vibratorHelper, VolumeDialogMenuIconBinder volumeDialogMenuIconBinder, SystemClock systemClock) { VolumeDialogImpl impl = new VolumeDialogImpl( context, Loading @@ -130,6 +134,7 @@ public interface VolumeModule { dumpManager, secureSettings, vibratorHelper, volumeDialogMenuIconBinder, systemClock); impl.setStreamImportant(AudioManager.STREAM_SYSTEM, false); impl.setAutomute(true); Loading Loading
packages/SystemUI/res/drawable/audio_bars_playing.xml 0 → 100644 +457 −0 File added.Preview size limit exceeded, changes collapsed. Show changes
packages/SystemUI/res/layout/volume_dialog.xml +7 −7 Original line number Diff line number Diff line Loading @@ -13,9 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. --> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:sysui="http://schemas.android.com/apk/res-auto" <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:androidprv="http://schemas.android.com/apk/prv/res/android" android:id="@+id/volume_dialog_container" android:layout_width="wrap_content" Loading Loading @@ -96,16 +94,18 @@ android:paddingLeft="@dimen/volume_dialog_ringer_rows_padding" android:paddingBottom="@dimen/volume_dialog_ringer_rows_padding" android:paddingRight="@dimen/volume_dialog_ringer_rows_padding"> <com.android.keyguard.AlphaOptimizedImageButton android:id="@+id/settings" android:src="@drawable/horizontal_ellipsis" android:layout_width="@dimen/volume_dialog_tap_target_size" android:layout_height="@dimen/volume_dialog_tap_target_size" android:layout_gravity="center" android:contentDescription="@string/accessibility_volume_settings" android:background="@drawable/ripple_drawable_20dp" android:tint="?androidprv:attr/colorAccent" android:soundEffectsEnabled="false" /> android:contentDescription="@string/accessibility_volume_settings" android:scaleType="centerInside" android:soundEffectsEnabled="false" android:src="@drawable/horizontal_ellipsis" android:tint="?androidprv:attr/colorAccent" /> </FrameLayout> </LinearLayout> Loading
packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java +6 −0 Original line number Diff line number Diff line Loading @@ -136,6 +136,7 @@ import com.android.systemui.util.AlphaTintDrawableWrapper; import com.android.systemui.util.RoundedCornerProgressDrawable; import com.android.systemui.util.settings.SecureSettings; import com.android.systemui.volume.domain.interactor.VolumePanelNavigationInteractor; import com.android.systemui.volume.ui.binder.VolumeDialogMenuIconBinder; import com.android.systemui.volume.ui.navigation.VolumeNavigator; import dagger.Lazy; Loading Loading @@ -311,6 +312,7 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable, private int mDialogTimeoutMillis; private final VibratorHelper mVibratorHelper; private final com.android.systemui.util.time.SystemClock mSystemClock; private final VolumeDialogMenuIconBinder mVolumeDialogMenuIconBinder; public VolumeDialogImpl( Context context, Loading @@ -329,6 +331,7 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable, DumpManager dumpManager, Lazy<SecureSettings> secureSettings, VibratorHelper vibratorHelper, VolumeDialogMenuIconBinder volumeDialogMenuIconBinder, com.android.systemui.util.time.SystemClock systemClock) { mContext = new ContextThemeWrapper(context, R.style.volume_dialog_theme); Loading Loading @@ -361,6 +364,7 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable, mVolumePanelNavigationInteractor = volumePanelNavigationInteractor; mVolumeNavigator = volumeNavigator; mSecureSettings = secureSettings; mVolumeDialogMenuIconBinder = volumeDialogMenuIconBinder; mDialogTimeoutMillis = DIALOG_TIMEOUT_MILLIS; dumpManager.registerDumpable("VolumeDialogImpl", this); Loading Loading @@ -436,6 +440,7 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable, if (mDevicePostureController != null) { mDevicePostureController.removeCallback(mDevicePostureControllerCallback); } mVolumeDialogMenuIconBinder.destroy(); } @Override Loading Loading @@ -671,6 +676,7 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable, mSettingsView = mDialog.findViewById(R.id.settings_container); mSettingsIcon = mDialog.findViewById(R.id.settings); mVolumeDialogMenuIconBinder.bind(mSettingsIcon); if (mRows.isEmpty()) { if (!AudioSystem.isSingleVolume(mContext)) { Loading
packages/SystemUI/src/com/android/systemui/volume/VolumeDialogModule.kt 0 → 100644 +46 −0 Original line number Diff line number Diff line /* * Copyright (C) 2024 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.systemui.volume import com.android.systemui.volume.panel.shared.flag.VolumePanelFlag import com.android.systemui.volume.ui.viewmodel.AnimatedVolumeMenuIconViewModel import com.android.systemui.volume.ui.viewmodel.StaticVolumeMenuIconViewModel import com.android.systemui.volume.ui.viewmodel.VolumeMenuIconViewModel import dagger.Lazy import dagger.Module import dagger.Provides @Module interface VolumeDialogModule { companion object { @Provides fun provideVolumeMenuIconViewModel( volumePanelFlag: VolumePanelFlag, static: Lazy<StaticVolumeMenuIconViewModel>, animated: Lazy<AnimatedVolumeMenuIconViewModel>, ): VolumeMenuIconViewModel { return if (volumePanelFlag.canUseNewVolumePanel()) { animated } else { static } .get() } } }
packages/SystemUI/src/com/android/systemui/volume/dagger/VolumeModule.java +5 −0 Original line number Diff line number Diff line Loading @@ -38,11 +38,13 @@ import com.android.systemui.volume.CsdWarningDialog; import com.android.systemui.volume.VolumeComponent; import com.android.systemui.volume.VolumeDialogComponent; import com.android.systemui.volume.VolumeDialogImpl; import com.android.systemui.volume.VolumeDialogModule; import com.android.systemui.volume.VolumePanelDialogReceiver; import com.android.systemui.volume.VolumeUI; import com.android.systemui.volume.domain.interactor.VolumePanelNavigationInteractor; import com.android.systemui.volume.panel.dagger.VolumePanelComponent; import com.android.systemui.volume.panel.dagger.factory.VolumePanelComponentFactory; import com.android.systemui.volume.ui.binder.VolumeDialogMenuIconBinder; import com.android.systemui.volume.ui.navigation.VolumeNavigator; import dagger.Binds; Loading @@ -61,6 +63,7 @@ import dagger.multibindings.IntoSet; CaptioningModule.class, MediaDevicesModule.class, SpatializerModule.class, VolumeDialogModule.class, }, subcomponents = { VolumePanelComponent.class Loading Loading @@ -112,6 +115,7 @@ public interface VolumeModule { DumpManager dumpManager, Lazy<SecureSettings> secureSettings, VibratorHelper vibratorHelper, VolumeDialogMenuIconBinder volumeDialogMenuIconBinder, SystemClock systemClock) { VolumeDialogImpl impl = new VolumeDialogImpl( context, Loading @@ -130,6 +134,7 @@ public interface VolumeModule { dumpManager, secureSettings, vibratorHelper, volumeDialogMenuIconBinder, systemClock); impl.setStreamImportant(AudioManager.STREAM_SYSTEM, false); impl.setAutomute(true); Loading