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

Commit 86956c2f authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Check for null pointer before use."

parents 568204e3 b3e7386b
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -78,6 +78,10 @@ public class CarBatteryController extends BroadcastReceiver implements BatteryCo
    public CarBatteryController(Context context) {
        mContext = context;

        if (mAdapter == null) {
           return;
        }

        mAdapter.getProfileProxy(context.getApplicationContext(), mHfpServiceListener,
                BluetoothProfile.HEADSET_CLIENT);
    }
+7 −3
Original line number Diff line number Diff line
@@ -69,12 +69,16 @@ public class ConnectedDeviceSignalController extends BroadcastReceiver {
        mNetworkSignalView = (ImageView)
                mSignalsView.findViewById(R.id.connected_device_network_signal);

        mAdapter.getProfileProxy(context.getApplicationContext(), mHfpServiceListener,
                BluetoothProfile.HEADSET_CLIENT);

        TypedValue typedValue = new TypedValue();
        context.getResources().getValue(R.dimen.status_bar_icon_scale_factor, typedValue, true);
        mIconScaleFactor = typedValue.getFloat();

        if (mAdapter == null) {
          return;
        }

        mAdapter.getProfileProxy(context.getApplicationContext(), mHfpServiceListener,
                BluetoothProfile.HEADSET_CLIENT);
    }

    public void startListening() {