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

Commit b1ccbf98 authored by Matthew Xie's avatar Matthew Xie Committed by Android (Google) Code Review
Browse files

Merge "Nullpointer check on mAdapterService in ProfileService#onCreate" into lmp-mr1-dev

parents 3b256a3b bff8dd90
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -32,6 +32,8 @@ import android.util.Log;

public abstract class ProfileService extends Service {
    private static final boolean DBG = false;
    private static final String TAG = "BluetoothProfileService";

    //For Debugging only
    private static HashMap<String, Integer> sReferenceCount = new HashMap<String,Integer>();

@@ -108,7 +110,11 @@ public abstract class ProfileService extends Service {
        mAdapter = BluetoothAdapter.getDefaultAdapter();
        mBinder = initBinder();
        mAdapterService = AdapterService.getAdapterService();
        if (mAdapterService != null) {
            mAdapterService.addProfile(this);
        } else {
            Log.w(TAG, "onCreate, null mAdapterService");
        }
    }

    public int onStartCommand(Intent intent, int flags, int startId) {