Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ce441748 authored by Jason Monk's avatar Jason Monk Committed by Android (Google) Code Review
Browse files

Merge changes Ie7f66818,I7e91d12b,I0f44b3dd,I8625f3d3,I115c55af, ...

* changes:
  Remove Dependency.get usages from LightBarController
  Remove Dependency.get usages from NotificationLogger
  Remove Dependency.get usages from OverviewProxyService
  Remove Dependency.get usages from BubbleController
  Remove Dependency.get usages from BatteryControllerImpl
  Remove Dependency.get usages from BluetoothControllerImpl
  Remove Dependency.get usages from DeviceProvisionedController
  Remove Dependency.get usages from HotspotControllerImpl
  Remove Dependency.get usages from RemoteInputQuickSettingsDisabler
  Remove Dependency.get usages from SecurityControllerImpl
  Remove Dependency.get usages from UserSwitcherController
  Remove Dependency.get usages from SmartReplyController
  Reduce usages of Dependency.get in TunablePadding
  Remove Dependency.get usages from TunerServiceImpl
  Remove Dependency.get usages from GarbageMonitor
parents bb9b1957 e8e471db
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -56,6 +56,7 @@ import com.android.systemui.statusbar.phone.StatusBarIconController;
import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
import com.android.systemui.statusbar.policy.DeviceProvisionedController;
import com.android.systemui.util.InjectionInflationController;
import com.android.systemui.util.leak.GarbageMonitor;
import com.android.systemui.volume.VolumeDialogComponent;

import java.util.function.Consumer;
@@ -237,5 +238,8 @@ public class SystemUIFactory {
         * ViewCreator generates all Views that need injection.
         */
        InjectionInflationController.ViewCreator createViewCreator();

        @Singleton
        GarbageMonitor createGarbageMonitor();
    }
}
+2 −3
Original line number Diff line number Diff line
@@ -33,7 +33,6 @@ import android.view.WindowManager;
import android.widget.FrameLayout;

import com.android.internal.annotations.VisibleForTesting;
import com.android.systemui.Dependency;
import com.android.systemui.R;
import com.android.systemui.statusbar.notification.NotificationData;
import com.android.systemui.statusbar.phone.StatusBarWindowController;
@@ -122,12 +121,12 @@ public class BubbleController {
    }

    @Inject
    public BubbleController(Context context) {
    public BubbleController(Context context, StatusBarWindowController statusBarWindowController) {
        mContext = context;
        WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
        mDisplaySize = new Point();
        wm.getDefaultDisplay().getSize(mDisplaySize);
        mStatusBarWindowController = Dependency.get(StatusBarWindowController.class);
        mStatusBarWindowController = statusBarWindowController;
    }

    /**
+3 −4
Original line number Diff line number Diff line
@@ -44,7 +44,6 @@ import android.util.Log;
import android.view.MotionEvent;

import com.android.internal.policy.ScreenDecorationsUtils;
import com.android.systemui.Dependency;
import com.android.systemui.Dumpable;
import com.android.systemui.Prefs;
import com.android.systemui.SysUiServiceProvider;
@@ -90,8 +89,7 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis
    private final Handler mHandler;
    private final Runnable mConnectionRunnable = this::internalConnectToCurrentUser;
    private final ComponentName mRecentsComponentName;
    private final DeviceProvisionedController mDeviceProvisionedController
            = Dependency.get(DeviceProvisionedController.class);
    private final DeviceProvisionedController mDeviceProvisionedController;
    private final List<OverviewProxyListener> mConnectionCallbacks = new ArrayList<>();
    private final Intent mQuickStepIntent;

@@ -343,9 +341,10 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis
            = this::cleanupAfterDeath;

    @Inject
    public OverviewProxyService(Context context) {
    public OverviewProxyService(Context context, DeviceProvisionedController provisionController) {
        mContext = context;
        mHandler = new Handler();
        mDeviceProvisionedController = provisionController;
        mConnectionBackoffAttempts = 0;
        mRecentsComponentName = ComponentName.unflattenFromString(context.getString(
                com.android.internal.R.string.config_recentsComponentName));
+6 −6
Original line number Diff line number Diff line
@@ -21,7 +21,6 @@ import android.util.ArraySet;

import com.android.internal.statusbar.IStatusBarService;
import com.android.internal.statusbar.NotificationVisibility;
import com.android.systemui.Dependency;
import com.android.systemui.statusbar.notification.NotificationData;
import com.android.systemui.statusbar.notification.NotificationEntryManager;

@@ -36,15 +35,16 @@ import javax.inject.Singleton;
 */
@Singleton
public class SmartReplyController {
    private IStatusBarService mBarService;
    private final IStatusBarService mBarService;
    private final NotificationEntryManager mEntryManager;
    private Set<String> mSendingKeys = new ArraySet<>();
    private Callback mCallback;
    private final NotificationEntryManager mEntryManager =
            Dependency.get(NotificationEntryManager.class);

    @Inject
    public SmartReplyController() {
        mBarService = Dependency.get(IStatusBarService.class);
    public SmartReplyController(NotificationEntryManager entryManager,
            IStatusBarService statusBarService) {
        mBarService = statusBarService;
        mEntryManager = entryManager;
    }

    public void setCallback(Callback callback) {
+11 −8
Original line number Diff line number Diff line
@@ -27,7 +27,6 @@ import android.util.Log;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.statusbar.IStatusBarService;
import com.android.internal.statusbar.NotificationVisibility;
import com.android.systemui.Dependency;
import com.android.systemui.UiOffloadThread;
import com.android.systemui.statusbar.NotificationListener;
import com.android.systemui.statusbar.StatusBarStateController;
@@ -59,11 +58,9 @@ public class NotificationLogger implements StateListener {
            new ArraySet<>();

    // Dependencies:
    private final NotificationListenerService mNotificationListener =
            Dependency.get(NotificationListener.class);
    private final UiOffloadThread mUiOffloadThread = Dependency.get(UiOffloadThread.class);
    protected NotificationEntryManager mEntryManager
            = Dependency.get(NotificationEntryManager.class);
    private final NotificationListenerService mNotificationListener;
    private final UiOffloadThread mUiOffloadThread;
    protected NotificationEntryManager mEntryManager;

    protected Handler mHandler = new Handler();
    protected IStatusBarService mBarService;
@@ -150,11 +147,17 @@ public class NotificationLogger implements StateListener {
    };

    @Inject
    public NotificationLogger() {
    public NotificationLogger(NotificationListener notificationListener,
            UiOffloadThread uiOffloadThread,
            NotificationEntryManager entryManager,
            StatusBarStateController statusBarStateController) {
        mNotificationListener = notificationListener;
        mUiOffloadThread = uiOffloadThread;
        mEntryManager = entryManager;
        mBarService = IStatusBarService.Stub.asInterface(
                ServiceManager.getService(Context.STATUS_BAR_SERVICE));
        // Not expected to be destroyed, don't need to unsubscribe
        Dependency.get(StatusBarStateController.class).addCallback(this);
        statusBarStateController.addCallback(this);
    }

    public void setUpWithContainer(NotificationListContainer listContainer) {
Loading