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
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user