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

Commit 032225a0 authored by Guojing Yuan's avatar Guojing Yuan
Browse files

Change CDM device presence scan mode

Change from BALANCED to LOW_POWER to save 2.5 times less power.

Bug: 206059698
Test: N/A
Change-Id: I1d901ba8ac6fe21eafbed3af028a0d3c6b5a2d1a
parent 1d35d293
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@ package com.android.server.companion;

import static android.Manifest.permission.MANAGE_COMPANION_DEVICES;
import static android.bluetooth.le.ScanSettings.CALLBACK_TYPE_ALL_MATCHES;
import static android.bluetooth.le.ScanSettings.SCAN_MODE_BALANCED;
import static android.bluetooth.le.ScanSettings.SCAN_MODE_LOW_POWER;
import static android.content.pm.PackageManager.CERT_INPUT_SHA256;
import static android.content.pm.PackageManager.FEATURE_COMPANION_DEVICE_SETUP;
import static android.content.pm.PackageManager.PERMISSION_GRANTED;
@@ -1169,7 +1169,7 @@ public class CompanionDeviceManagerService extends SystemService
        } else {
            scanner.startScan(
                    filters,
                    new ScanSettings.Builder().setScanMode(SCAN_MODE_BALANCED).build(),
                    new ScanSettings.Builder().setScanMode(SCAN_MODE_LOW_POWER).build(),
                    mBleScanCallback);
        }
    }