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

Commit c9113cdb authored by Sal Savage's avatar Sal Savage Committed by Automerger Merge Worker
Browse files

Merge "Don't use PhonePolicy on automotive builds" into tm-dev am: b9ec0b20

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/17046763

Change-Id: I215f686a9c5776b076f99107613ff4f21200f8fa
parents 27acf32d b9ec0b20
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -515,9 +515,16 @@ public class AdapterService extends Service {
        mDatabaseManager = new DatabaseManager(this);
        mDatabaseManager.start(MetadataDatabase.createDatabase(this));

        // 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(R.bool.enable_phone_policy)) {
        boolean isAutomotiveDevice = getApplicationContext().getPackageManager().hasSystemFeature(
                PackageManager.FEATURE_AUTOMOTIVE);

        /*
         * 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. Phone policy is never used on
         * Android Automotive OS builds, in favor of a policy currently located in
         * CarBluetoothService.
         */
        if (!isAutomotiveDevice && getResources().getBoolean(R.bool.enable_phone_policy)) {
            Log.i(TAG, "Phone policy enabled");
            mPhonePolicy = new PhonePolicy(this, new ServiceFactory());
            mPhonePolicy.start();