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

Commit 7a95a527 authored by William Escande's avatar William Escande
Browse files

SystemServer: Force ContentResolver to not be null

Bug: 311772251
Test: m service-bluetooth | cannot be null except with mocked context
Change-Id: I1b234f019abfc8fafb4d3933c246699b627a366f
parent 59a5f5c2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -699,6 +699,7 @@ class BluetoothManagerService {
    BluetoothManagerService(
            @NonNull Context context, @NonNull Looper looper, @NonNull FeatureFlags featureFlags) {
        mContext = requireNonNull(context, "Context cannot be null");
        mContentResolver = requireNonNull(mContext.getContentResolver(), "Resolver cannot be null");
        mLooper = requireNonNull(looper, "Looper cannot be null");
        mFeatureFlags = requireNonNull(featureFlags, "Feature Flags cannot be null");

@@ -710,7 +711,6 @@ class BluetoothManagerService {
        mBinder = new BluetoothServiceBinder(this, mContext, mUserManager);
        mHandler = new BluetoothHandler(mLooper);

        mContentResolver = mContext.getContentResolver();

        // Observe BLE scan only mode settings change.
        registerForBleScanModeChange();