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

Commit cab0f1ce 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: Ia5032256180803f7f5cec6d7575a4e004938172f
parents 355d7f33 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();