Merge "Moved VibrateHelper as a dependency" into pi-dev
am: f32d531a5c
Change-Id: Ia4e3433c4a6a4294ab19410b46cf1e2727caf7a5
This commit is contained in:
@@ -45,6 +45,7 @@ import com.android.systemui.power.EnhancedEstimatesImpl;
|
||||
import com.android.systemui.power.PowerNotificationWarnings;
|
||||
import com.android.systemui.power.PowerUI;
|
||||
import com.android.systemui.statusbar.AppOpsListener;
|
||||
import com.android.systemui.statusbar.VibratorHelper;
|
||||
import com.android.systemui.statusbar.phone.ConfigurationControllerImpl;
|
||||
import com.android.systemui.statusbar.phone.DarkIconDispatcherImpl;
|
||||
import com.android.systemui.statusbar.phone.LightBarController;
|
||||
@@ -317,6 +318,8 @@ public class Dependency extends SystemUI {
|
||||
|
||||
mProviders.put(AppOpsListener.class, () -> new AppOpsListener(mContext));
|
||||
|
||||
mProviders.put(VibratorHelper.class, () -> new VibratorHelper(mContext));
|
||||
|
||||
// Put all dependencies above here so the factory can override them if it wants.
|
||||
SystemUIFactory.getInstance().injectDependencies(mProviders, mContext);
|
||||
}
|
||||
|
||||
@@ -247,7 +247,7 @@ public class NavigationBarView extends FrameLayout implements PluginListener<Nav
|
||||
|
||||
mOverviewProxyService = Dependency.get(OverviewProxyService.class);
|
||||
mRecentsOnboarding = new RecentsOnboarding(context, mOverviewProxyService);
|
||||
mVibratorHelper = new VibratorHelper(context);
|
||||
mVibratorHelper = Dependency.get(VibratorHelper.class);
|
||||
|
||||
mConfiguration = new Configuration();
|
||||
mConfiguration.updateFrom(context.getResources().getConfiguration());
|
||||
|
||||
@@ -38,6 +38,7 @@ import android.widget.FrameLayout;
|
||||
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
|
||||
import com.android.internal.util.LatencyTracker;
|
||||
import com.android.systemui.DejankUtils;
|
||||
import com.android.systemui.Dependency;
|
||||
import com.android.systemui.Interpolators;
|
||||
import com.android.systemui.R;
|
||||
import com.android.systemui.classifier.FalsingManager;
|
||||
@@ -207,7 +208,7 @@ public abstract class PanelView extends FrameLayout {
|
||||
mFalsingManager = FalsingManager.getInstance(context);
|
||||
mNotificationsDragEnabled =
|
||||
getResources().getBoolean(R.bool.config_enableNotificationShadeDrag);
|
||||
mVibratorHelper = new VibratorHelper(context);
|
||||
mVibratorHelper = Dependency.get(VibratorHelper.class);
|
||||
mVibrateOnOpening = mContext.getResources().getBoolean(
|
||||
R.bool.config_vibrateOnIconAnimation);
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ public class KeyButtonView extends ImageView implements ButtonInterface {
|
||||
mAudioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
|
||||
|
||||
mRipple = new KeyButtonRipple(context, this);
|
||||
mVibratorHelper = new VibratorHelper(context);
|
||||
mVibratorHelper = Dependency.get(VibratorHelper.class);
|
||||
mOverviewProxyService = Dependency.get(OverviewProxyService.class);
|
||||
setBackground(mRipple);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user