Create plugin interface for volume dialog
Very few logic changes, mostly just breaking out certain interfaces
and classes to the plugin lib.
Test: make + volume keys
Change-Id: Ieabc6d35f6ef980842849236a0b8ffd5543b3a2c
diff --git a/packages/SystemUI/src/com/android/systemui/Dependency.java b/packages/SystemUI/src/com/android/systemui/Dependency.java
index 374086d..d058e78 100644
--- a/packages/SystemUI/src/com/android/systemui/Dependency.java
+++ b/packages/SystemUI/src/com/android/systemui/Dependency.java
@@ -32,6 +32,7 @@
import com.android.systemui.plugins.PluginDependencyProvider;
import com.android.systemui.plugins.PluginManager;
import com.android.systemui.plugins.PluginManagerImpl;
+import com.android.systemui.plugins.VolumeDialogController;
import com.android.systemui.statusbar.phone.ConfigurationControllerImpl;
import com.android.systemui.statusbar.phone.DarkIconDispatcherImpl;
import com.android.systemui.statusbar.phone.ManagedProfileController;
@@ -79,6 +80,7 @@
import com.android.systemui.util.leak.GarbageMonitor;
import com.android.systemui.util.leak.LeakDetector;
import com.android.systemui.util.leak.LeakReporter;
+import com.android.systemui.volume.VolumeDialogControllerImpl;
import java.io.FileDescriptor;
import java.io.PrintWriter;
@@ -252,6 +254,9 @@
mProviders.put(LocalBluetoothManager.class, () ->
LocalBluetoothManager.getInstance(mContext, null));
+ mProviders.put(VolumeDialogController.class, () ->
+ new VolumeDialogControllerImpl(mContext));
+
// Put all dependencies above here so the factory can override them if it wants.
SystemUIFactory.getInstance().injectDependencies(mProviders, mContext);
}
diff --git a/packages/SystemUI/src/com/android/systemui/SystemUIFactory.java b/packages/SystemUI/src/com/android/systemui/SystemUIFactory.java
index af7e9b4..5237244 100644
--- a/packages/SystemUI/src/com/android/systemui/SystemUIFactory.java
+++ b/packages/SystemUI/src/com/android/systemui/SystemUIFactory.java
@@ -16,7 +16,6 @@
package com.android.systemui;
-import android.content.ComponentName;
import android.content.Context;
import android.util.ArrayMap;
import android.util.Log;
@@ -39,7 +38,7 @@
import com.android.systemui.statusbar.phone.ScrimController;
import com.android.systemui.statusbar.phone.StatusBarIconController;
import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
-import com.android.systemui.volume.VolumeDialogController;
+import com.android.systemui.volume.VolumeDialogControllerImpl;
/**
* Class factory to provide customizable SystemUI components.
@@ -89,11 +88,6 @@
return new ScrimController(lightBarController, scrimBehind, scrimInFront, headsUpScrim);
}
- public VolumeDialogController createVolumeDialogController(Context context,
- ComponentName name) {
- return new VolumeDialogController(context, name);
- }
-
public NotificationIconAreaController createNotificationIconAreaController(Context context,
StatusBar statusBar) {
return new NotificationIconAreaController(context, statusBar);
diff --git a/packages/SystemUI/src/com/android/systemui/car/CarSystemUIFactory.java b/packages/SystemUI/src/com/android/systemui/car/CarSystemUIFactory.java
index 67aa4dc..5a19e7d 100644
--- a/packages/SystemUI/src/com/android/systemui/car/CarSystemUIFactory.java
+++ b/packages/SystemUI/src/com/android/systemui/car/CarSystemUIFactory.java
@@ -15,11 +15,12 @@
*/
package com.android.systemui.car;
-import android.content.ComponentName;
import android.content.Context;
+import android.util.ArrayMap;
+import com.android.systemui.Dependency.DependencyProvider;
import com.android.systemui.SystemUIFactory;
-import com.android.systemui.volume.VolumeDialogController;
+import com.android.systemui.plugins.VolumeDialogController;
import com.android.systemui.volume.car.CarVolumeDialogController;
/**
@@ -27,8 +28,9 @@
*/
public class CarSystemUIFactory extends SystemUIFactory {
@Override
- public VolumeDialogController createVolumeDialogController(Context context,
- ComponentName name) {
- return new CarVolumeDialogController(context, name);
+ public void injectDependencies(ArrayMap<Object, DependencyProvider> providers,
+ Context context) {
+ super.injectDependencies(providers, context);
+ providers.put(VolumeDialogController.class, () -> new CarVolumeDialogController(context));
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/volume/Events.java b/packages/SystemUI/src/com/android/systemui/volume/Events.java
index ca53bc4..8ed4fca 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/Events.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/Events.java
@@ -24,7 +24,7 @@
import com.android.internal.logging.MetricsLogger;
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
-import com.android.systemui.volume.VolumeDialogController.State;
+import com.android.systemui.plugins.VolumeDialogController.State;
import java.util.Arrays;
diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogComponent.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogComponent.java
index 9d0ecec..2f9bcff 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogComponent.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogComponent.java
@@ -24,13 +24,19 @@
import android.os.Bundle;
import android.os.Handler;
import android.view.WindowManager;
+import android.view.WindowManager.LayoutParams;
import com.android.systemui.plugins.ActivityStarter;
import com.android.systemui.Dependency;
import com.android.systemui.SystemUI;
-import com.android.systemui.SystemUIFactory;
import com.android.systemui.keyguard.KeyguardViewMediator;
+import com.android.systemui.plugins.PluginDependency;
+import com.android.systemui.plugins.PluginDependencyProvider;
+import com.android.systemui.plugins.PluginManager;
+import com.android.systemui.plugins.VolumeDialog;
+import com.android.systemui.plugins.VolumeDialogController;
import com.android.systemui.qs.tiles.DndTile;
+import com.android.systemui.statusbar.policy.ExtensionController;
import com.android.systemui.statusbar.policy.ZenModeController;
import com.android.systemui.tuner.TunerService;
@@ -41,7 +47,7 @@
* Implementation of VolumeComponent backed by the new volume dialog.
*/
public class VolumeDialogComponent implements VolumeComponent, TunerService.Tunable,
- VolumeDialogController.UserActivityListener{
+ VolumeDialogControllerImpl.UserActivityListener{
public static final String VOLUME_DOWN_SILENT = "sysui_volume_down_silent";
public static final String VOLUME_UP_SILENT = "sysui_volume_up_silent";
@@ -53,9 +59,8 @@
private final SystemUI mSysui;
private final Context mContext;
- private final VolumeDialogController mController;
- private final ZenModeController mZenModeController;
- private final VolumeDialog mDialog;
+ private final VolumeDialogControllerImpl mController;
+ private VolumeDialog mDialog;
private VolumePolicy mVolumePolicy = new VolumePolicy(
DEFAULT_VOLUME_DOWN_TO_ENTER_SILENT, // volumeDownToEnterSilent
DEFAULT_VOLUME_UP_TO_EXIT_SILENT, // volumeUpToExitSilent
@@ -66,16 +71,35 @@
public VolumeDialogComponent(SystemUI sysui, Context context, Handler handler) {
mSysui = sysui;
mContext = context;
- mController = SystemUIFactory.getInstance().createVolumeDialogController(context, null);
+ mController = (VolumeDialogControllerImpl) Dependency.get(VolumeDialogController.class);
mController.setUserActivityListener(this);
- mZenModeController = Dependency.get(ZenModeController.class);
- mDialog = new VolumeDialog(context, WindowManager.LayoutParams.TYPE_VOLUME_OVERLAY,
- mController, mZenModeController, mVolumeDialogCallback);
+ // Allow plugins to reference the VolumeDialogController.
+ Dependency.get(PluginDependencyProvider.class)
+ .allowPluginDependency(VolumeDialogController.class);
+ Dependency.get(ExtensionController.class).newExtension(VolumeDialog.class)
+ .withPlugin(VolumeDialog.class)
+ .withDefault(this::createDefault)
+ .withCallback(dialog -> {
+ if (mDialog != null) {
+ mDialog.destroy();
+ }
+ mDialog = dialog;
+ mDialog.init(LayoutParams.TYPE_VOLUME_OVERLAY, mVolumeDialogCallback);
+ }).build();
applyConfiguration();
Dependency.get(TunerService.class).addTunable(this, VOLUME_DOWN_SILENT, VOLUME_UP_SILENT,
VOLUME_SILENT_DO_NOT_DISTURB);
}
+ private VolumeDialog createDefault() {
+ VolumeDialogImpl impl = new VolumeDialogImpl(mContext);
+ impl.setStreamImportant(AudioManager.STREAM_ALARM, true);
+ impl.setStreamImportant(AudioManager.STREAM_SYSTEM, false);
+ impl.setAutomute(true);
+ impl.setSilentMode(false);
+ return impl;
+ }
+
@Override
public void onTuningChanged(String key, String newValue) {
if (VOLUME_DOWN_SILENT.equals(key)) {
@@ -118,10 +142,6 @@
}
private void applyConfiguration() {
- mDialog.setStreamImportant(AudioManager.STREAM_ALARM, true);
- mDialog.setStreamImportant(AudioManager.STREAM_SYSTEM, false);
- mDialog.setAutomute(true);
- mDialog.setSilentMode(false);
mController.setVolumePolicy(mVolumePolicy);
mController.showDndTile(true);
}
@@ -149,8 +169,6 @@
@Override
public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
- mController.dump(fd, pw, args);
- mDialog.dump(pw);
}
private void startSettings(Intent intent) {
@@ -158,7 +176,7 @@
true /* onlyProvisioned */, true /* dismissShade */);
}
- private final VolumeDialog.Callback mVolumeDialogCallback = new VolumeDialog.Callback() {
+ private final VolumeDialogImpl.Callback mVolumeDialogCallback = new VolumeDialogImpl.Callback() {
@Override
public void onZenSettingsClicked() {
startSettings(ZenModePanel.ZEN_SETTINGS);
diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogController.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogControllerImpl.java
similarity index 88%
rename from packages/SystemUI/src/com/android/systemui/volume/VolumeDialogController.java
rename to packages/SystemUI/src/com/android/systemui/volume/VolumeDialogControllerImpl.java
index 276b7c3..5d51a33 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogController.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogControllerImpl.java
@@ -16,7 +16,6 @@
package com.android.systemui.volume;
-import android.annotation.IntegerRes;
import android.app.NotificationManager;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
@@ -44,10 +43,11 @@
import android.service.notification.Condition;
import android.util.ArrayMap;
import android.util.Log;
-import android.util.SparseArray;
import com.android.internal.annotations.GuardedBy;
+import com.android.systemui.Dumpable;
import com.android.systemui.R;
+import com.android.systemui.plugins.VolumeDialogController;
import com.android.systemui.qs.tiles.DndTile;
import java.io.FileDescriptor;
@@ -63,8 +63,8 @@
*
* Methods ending in "W" must be called on the worker thread.
*/
-public class VolumeDialogController {
- private static final String TAG = Util.logTag(VolumeDialogController.class);
+public class VolumeDialogControllerImpl implements VolumeDialogController, Dumpable {
+ private static final String TAG = Util.logTag(VolumeDialogControllerImpl.class);
private static final int DYNAMIC_STREAM_START_INDEX = 100;
private static final int VIBRATE_HINT_DURATION = 50;
@@ -89,7 +89,6 @@
private final Context mContext;
private AudioManager mAudio;
private final NotificationManager mNoMan;
- private final ComponentName mComponent;
private final SettingObserver mObserver;
private final Receiver mReceiver = new Receiver();
private final MediaSessions mMediaSessions;
@@ -108,11 +107,10 @@
protected final VC mVolumeController = new VC();
- public VolumeDialogController(Context context, ComponentName component) {
+ public VolumeDialogControllerImpl(Context context) {
mContext = context.getApplicationContext();
Events.writeEvent(mContext, Events.EVENT_COLLECTION_STARTED);
- mComponent = component;
- mWorkerThread = new HandlerThread(VolumeDialogController.class.getSimpleName());
+ mWorkerThread = new HandlerThread(VolumeDialogControllerImpl.class.getSimpleName());
mWorkerThread.start();
mWorker = new W(mWorkerThread.getLooper());
mMediaSessions = createMediaSessions(mContext, mWorkerThread.getLooper(),
@@ -197,7 +195,7 @@
}
public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
- pw.println(VolumeDialogController.class.getSimpleName() + " state:");
+ pw.println(VolumeDialogControllerImpl.class.getSimpleName() + " state:");
pw.print(" mDestroyed: "); pw.println(mDestroyed);
pw.print(" mVolumePolicy: "); pw.println(mVolumePolicy);
pw.print(" mState: "); pw.println(mState.toString(4));
@@ -530,7 +528,7 @@
}
private final class VC extends IVolumeController.Stub {
- private final String TAG = VolumeDialogController.TAG + ".VC";
+ private final String TAG = VolumeDialogControllerImpl.TAG + ".VC";
@Override
public void displaySafeVolumeWarning(int flags) throws RemoteException {
@@ -958,113 +956,6 @@
}
}
- public static final class StreamState {
- public boolean dynamic;
- public int level;
- public int levelMin;
- public int levelMax;
- public boolean muted;
- public boolean muteSupported;
- public @IntegerRes int name;
- public String remoteLabel;
- public boolean routedToBluetooth;
-
- public StreamState copy() {
- final StreamState rt = new StreamState();
- rt.dynamic = dynamic;
- rt.level = level;
- rt.levelMin = levelMin;
- rt.levelMax = levelMax;
- rt.muted = muted;
- rt.muteSupported = muteSupported;
- rt.name = name;
- rt.remoteLabel = remoteLabel;
- rt.routedToBluetooth = routedToBluetooth;
- return rt;
- }
- }
-
- public static final class State {
- public static int NO_ACTIVE_STREAM = -1;
-
- public final SparseArray<StreamState> states = new SparseArray<StreamState>();
-
- public int ringerModeInternal;
- public int ringerModeExternal;
- public int zenMode;
- public ComponentName effectsSuppressor;
- public String effectsSuppressorName;
- public int activeStream = NO_ACTIVE_STREAM;
-
- public State copy() {
- final State rt = new State();
- for (int i = 0; i < states.size(); i++) {
- rt.states.put(states.keyAt(i), states.valueAt(i).copy());
- }
- rt.ringerModeExternal = ringerModeExternal;
- rt.ringerModeInternal = ringerModeInternal;
- rt.zenMode = zenMode;
- if (effectsSuppressor != null) rt.effectsSuppressor = effectsSuppressor.clone();
- rt.effectsSuppressorName = effectsSuppressorName;
- rt.activeStream = activeStream;
- return rt;
- }
-
- @Override
- public String toString() {
- return toString(0);
- }
-
- public String toString(int indent) {
- final StringBuilder sb = new StringBuilder("{");
- if (indent > 0) sep(sb, indent);
- for (int i = 0; i < states.size(); i++) {
- if (i > 0) {
- sep(sb, indent);
- }
- final int stream = states.keyAt(i);
- final StreamState ss = states.valueAt(i);
- sb.append(AudioSystem.streamToString(stream)).append(":").append(ss.level)
- .append('[').append(ss.levelMin).append("..").append(ss.levelMax)
- .append(']');
- if (ss.muted) sb.append(" [MUTED]");
- if (ss.dynamic) sb.append(" [DYNAMIC]");
- }
- sep(sb, indent); sb.append("ringerModeExternal:").append(ringerModeExternal);
- sep(sb, indent); sb.append("ringerModeInternal:").append(ringerModeInternal);
- sep(sb, indent); sb.append("zenMode:").append(zenMode);
- sep(sb, indent); sb.append("effectsSuppressor:").append(effectsSuppressor);
- sep(sb, indent); sb.append("effectsSuppressorName:").append(effectsSuppressorName);
- sep(sb, indent); sb.append("activeStream:").append(activeStream);
- if (indent > 0) sep(sb, indent);
- return sb.append('}').toString();
- }
-
- private static void sep(StringBuilder sb, int indent) {
- if (indent > 0) {
- sb.append('\n');
- for (int i = 0; i < indent; i++) {
- sb.append(' ');
- }
- } else {
- sb.append(',');
- }
- }
- }
-
- public interface Callbacks {
- void onShowRequested(int reason);
- void onDismissRequested(int reason);
- void onStateChanged(State state);
- void onLayoutDirectionChanged(int layoutDirection);
- void onConfigurationChanged();
- void onShowVibrateHint();
- void onShowSilentHint();
- void onScreenOff();
- void onShowSafetyWarning(int flags);
- void onAccessibilityModeChanged(Boolean showA11yStream);
- }
-
public interface UserActivityListener {
void onUserActivity();
}
diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialog.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java
similarity index 97%
rename from packages/SystemUI/src/com/android/systemui/volume/VolumeDialog.java
rename to packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java
index 1933349a..697cac9 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialog.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java
@@ -16,6 +16,9 @@
package com.android.systemui.volume;
+import static android.accessibilityservice.AccessibilityServiceInfo.FEEDBACK_ALL_MASK;
+import static android.accessibilityservice.AccessibilityServiceInfo.FEEDBACK_GENERIC;
+
import android.accessibilityservice.AccessibilityServiceInfo;
import android.animation.ObjectAnimator;
import android.annotation.NonNull;
@@ -72,28 +75,27 @@
import com.android.systemui.Dependency;
import com.android.systemui.Interpolators;
import com.android.systemui.R;
+import com.android.systemui.plugins.VolumeDialogController;
+import com.android.systemui.plugins.VolumeDialogController.State;
+import com.android.systemui.plugins.VolumeDialogController.StreamState;
+import com.android.systemui.plugins.VolumeDialog;
import com.android.systemui.statusbar.policy.ZenModeController;
import com.android.systemui.tuner.TunerService;
import com.android.systemui.tuner.TunerZenModePanel;
-import com.android.systemui.volume.VolumeDialogController.State;
-import com.android.systemui.volume.VolumeDialogController.StreamState;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
-import static android.accessibilityservice.AccessibilityServiceInfo.FEEDBACK_ALL_MASK;
-import static android.accessibilityservice.AccessibilityServiceInfo.FEEDBACK_GENERIC;
-
/**
* Visual presentation of the volume dialog.
*
- * A client of VolumeDialogController and its state model.
+ * A client of VolumeDialogControllerImpl and its state model.
*
* Methods ending in "H" must be called on the (ui) handler.
*/
-public class VolumeDialog implements TunerService.Tunable {
- private static final String TAG = Util.logTag(VolumeDialog.class);
+public class VolumeDialogImpl implements VolumeDialog, TunerService.Tunable {
+ private static final String TAG = Util.logTag(VolumeDialogImpl.class);
public static final String SHOW_FULL_ZEN = "sysui_show_full_zen";
@@ -102,7 +104,7 @@
private final Context mContext;
private final H mHandler = new H();
- private final VolumeDialogController mController;
+ private VolumeDialogController mController;
private Window mWindow;
private CustomDialog mDialog;
@@ -123,7 +125,7 @@
private final ColorStateList mActiveSliderTint;
private final ColorStateList mInactiveSliderTint;
private VolumeDialogMotion mMotion;
- private final int mWindowType;
+ private int mWindowType;
private final ZenModeController mZenModeController;
private boolean mShowing;
@@ -146,32 +148,39 @@
private boolean mShowFullZen;
private TunerZenModePanel mZenPanel;
- public VolumeDialog(Context context, int windowType, VolumeDialogController controller,
- ZenModeController zenModeController, Callback callback) {
+ public VolumeDialogImpl(Context context) {
mContext = context;
- mController = controller;
- mCallback = callback;
- mWindowType = windowType;
- mZenModeController = zenModeController;
- mKeyguard = (KeyguardManager) context.getSystemService(Context.KEYGUARD_SERVICE);
- mAudioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
+ mZenModeController = Dependency.get(ZenModeController.class);
+ mController = Dependency.get(VolumeDialogController.class);
+ mKeyguard = (KeyguardManager) mContext.getSystemService(Context.KEYGUARD_SERVICE);
+ mAudioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE);
mAccessibilityMgr =
(AccessibilityManager) mContext.getSystemService(Context.ACCESSIBILITY_SERVICE);
mActiveSliderTint = ColorStateList.valueOf(Utils.getColorAccent(mContext));
mInactiveSliderTint = loadColorStateList(R.color.volume_slider_inactive);
+ }
+
+ public void init(int windowType, Callback callback) {
+ mCallback = callback;
+ mWindowType = windowType;
initDialog();
mAccessibility.init();
- controller.addCallback(mControllerCallbackH, mHandler);
- controller.getState();
+ mController.addCallback(mControllerCallbackH, mHandler);
+ mController.getState();
Dependency.get(TunerService.class).addTunable(this, SHOW_FULL_ZEN);
final Configuration currentConfig = mContext.getResources().getConfiguration();
mDensity = currentConfig.densityDpi;
}
+ @Override
+ public void destroy() {
+ mController.removeCallback(mControllerCallbackH);
+ }
+
private void initDialog() {
mDialog = new CustomDialog(mContext);
@@ -193,7 +202,7 @@
final WindowManager.LayoutParams lp = mWindow.getAttributes();
lp.type = mWindowType;
lp.format = PixelFormat.TRANSLUCENT;
- lp.setTitle(VolumeDialog.class.getSimpleName());
+ lp.setTitle(VolumeDialogImpl.class.getSimpleName());
lp.gravity = Gravity.TOP | Gravity.CENTER_HORIZONTAL;
lp.y = res.getDimensionPixelSize(R.dimen.volume_offset_top);
lp.gravity = Gravity.TOP;
@@ -361,7 +370,7 @@
}
public void dump(PrintWriter writer) {
- writer.println(VolumeDialog.class.getSimpleName() + " state:");
+ writer.println(VolumeDialogImpl.class.getSimpleName() + " state:");
writer.print(" mShowing: "); writer.println(mShowing);
writer.print(" mExpanded: "); writer.println(mExpanded);
writer.print(" mExpandButtonAnimationRunning: ");
@@ -459,10 +468,6 @@
}
}
- public void destroy() {
- mController.removeCallback(mControllerCallbackH);
- }
-
public void show(int reason) {
mHandler.obtainMessage(H.SHOW, reason, 0).sendToTarget();
}
@@ -1289,9 +1294,4 @@
private int animTargetProgress;
private int lastAudibleLevel = 1;
}
-
- public interface Callback {
- void onZenSettingsClicked();
- void onZenPrioritySettingsClicked();
- }
}
diff --git a/packages/SystemUI/src/com/android/systemui/volume/car/CarVolumeDialogController.java b/packages/SystemUI/src/com/android/systemui/volume/car/CarVolumeDialogController.java
index a2c32b7..d28e42e 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/car/CarVolumeDialogController.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/car/CarVolumeDialogController.java
@@ -25,7 +25,7 @@
import android.os.IBinder;
import android.util.Log;
-import com.android.systemui.volume.VolumeDialogController;
+import com.android.systemui.volume.VolumeDialogControllerImpl;
/**
* A volume dialog controller for the automotive use case.
@@ -33,7 +33,7 @@
* {@link android.car.media.CarAudioManager} is the source of truth to get the stream volumes.
* And volume changes should be sent to the car's audio module instead of the android's audio mixer.
*/
-public class CarVolumeDialogController extends VolumeDialogController {
+public class CarVolumeDialogController extends VolumeDialogControllerImpl {
private static final String TAG = "CarVolumeDialogController";
private final Car mCar;
@@ -57,8 +57,8 @@
}
};
- public CarVolumeDialogController(Context context, ComponentName component) {
- super(context, component);
+ public CarVolumeDialogController(Context context) {
+ super(context);
mCar = Car.createCar(context, mConnection);
mCar.connect();
}