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

Commit 97684222 authored by Sanket Agarwal's avatar Sanket Agarwal Committed by android-build-merger
Browse files

Merge "Add flag to disable phone policy" am: 1188453c am: e69c3ee9

am: cdbb18cb

Change-Id: Ic85724e0f1c70983355c4ab2d438c0e69d75157b
parents 87c07688 cdbb18cb
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -71,4 +71,7 @@


    <!-- Enabling autoconnect over pan -->
    <!-- Enabling autoconnect over pan -->
    <bool name="config_bluetooth_pan_enable_autoconnect">true</bool>
    <bool name="config_bluetooth_pan_enable_autoconnect">true</bool>

    <!-- Enabling the phone policy -->
    <bool name="enable_phone_policy">true</bool>
</resources>
</resources>
+9 −2
Original line number Original line Diff line number Diff line
@@ -422,8 +422,15 @@ public class AdapterService extends Service {
        mProfileObserver = new ProfileObserver(getApplicationContext(), this, new Handler());
        mProfileObserver = new ProfileObserver(getApplicationContext(), this, new Handler());
        mProfileObserver.start();
        mProfileObserver.start();


        // Phone policy is specific to phone implementations and hence if a device wants to exclude
        // it out then it can be disabled by using the flag below.
        if (getResources().getBoolean(com.android.bluetooth.R.bool.enable_phone_policy)) {
            Log.i(TAG, "Phone policy enabled");
            mPhonePolicy = new PhonePolicy(this, new ServiceFactory());
            mPhonePolicy = new PhonePolicy(this, new ServiceFactory());
            mPhonePolicy.start();
            mPhonePolicy.start();
        } else {
            Log.i(TAG, "Phone policy disabled");
        }


        setAdapterService(this);
        setAdapterService(this);