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

Commit db961695 authored by Guojing Yuan's avatar Guojing Yuan
Browse files

Update the CDM device presence javadoc and overall logs

Fix: 245749527

Test: build
Change-Id: If20e50a95763aa2f318f0f5f5dee8cc0ae446259
parent 144337d9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@ public class BluetoothDeviceFilterUtils {
    private BluetoothDeviceFilterUtils() {}

    private static final boolean DEBUG = false;
    private static final String LOG_TAG = "BluetoothDeviceFilterUtils";
    private static final String LOG_TAG = "CDM_BluetoothDeviceFilterUtils";

    @Nullable
    static String patternToString(@Nullable Pattern p) {
+1 −1
Original line number Diff line number Diff line
@@ -54,7 +54,7 @@ import java.util.regex.Pattern;
public final class BluetoothLeDeviceFilter implements DeviceFilter<ScanResult> {

    private static final boolean DEBUG = false;
    private static final String LOG_TAG = "BluetoothLeDeviceFilter";
    private static final String LOG_TAG = "CDM_BluetoothLeDeviceFilter";

    private static final int RENAME_PREFIX_LENGTH_LIMIT = 10;

+16 −14
Original line number Diff line number Diff line
@@ -81,7 +81,7 @@ import java.util.function.Consumer;
public final class CompanionDeviceManager {

    private static final boolean DEBUG = false;
    private static final String LOG_TAG = "CompanionDeviceManager";
    private static final String LOG_TAG = "CDM_CompanionDeviceManager";

    /**
     * The result code to propagate back to the originating activity, indicates the association
@@ -709,27 +709,29 @@ public final class CompanionDeviceManager {
    /**
     * Register to receive callbacks whenever the associated device comes in and out of range.
     *
     * The provided device must be {@link #associate associated} with the calling app before
     * calling this method.
     * <p>The provided device must be {@link #associate associated} with the calling app before
     * calling this method.</p>
     *
     * Caller must implement a single {@link CompanionDeviceService} which will be bound to and
     * <p>Caller must implement a single {@link CompanionDeviceService} which will be bound to and
     * receive callbacks to {@link CompanionDeviceService#onDeviceAppeared} and
     * {@link CompanionDeviceService#onDeviceDisappeared}.
     * The app doesn't need to remain running in order to receive its callbacks.
     * The app doesn't need to remain running in order to receive its callbacks.</p>
     *
     * Calling app must declare uses-permission
     * {@link android.Manifest.permission#REQUEST_OBSERVE_COMPANION_DEVICE_PRESENCE}.
     * <p>Calling app must declare uses-permission
     * {@link android.Manifest.permission#REQUEST_OBSERVE_COMPANION_DEVICE_PRESENCE}.</p>
     *
     * Calling app must check for feature presence of
     * {@link PackageManager#FEATURE_COMPANION_DEVICE_SETUP} before calling this API.
     * <p>Calling app must check for feature presence of
     * {@link PackageManager#FEATURE_COMPANION_DEVICE_SETUP} before calling this API.</p>
     *
     * <p>For Bluetooth LE devices, this is based on scanning for device with the given address.
     * The system will scan for the device when Bluetooth is ON or Bluetooth scanning is ON.</p>
     *
     * For Bluetooth LE devices this is based on scanning for device with the given address.
     * For Bluetooth classic devices this is triggered when the device connects/disconnects.
     * WiFi devices are not supported.
     * <p>For Bluetooth classic devices this is triggered when the device connects/disconnects.
     * WiFi devices are not supported.</p>
     *
     * If a Bluetooth LE device wants to use a rotating mac address, it is recommended to use
     * <p>If a Bluetooth LE device wants to use a rotating mac address, it is recommended to use
     * Resolvable Private Address, and ensure the device is bonded to the phone so that android OS
     * is able to resolve the address.
     * is able to resolve the address.</p>
     *
     * @param deviceAddress a previously-associated companion device's address
     *
+1 −1
Original line number Diff line number Diff line
@@ -99,7 +99,7 @@ import java.util.concurrent.Executor;
 */
public abstract class CompanionDeviceService extends Service {

    private static final String LOG_TAG = "CompanionDeviceService";
    private static final String LOG_TAG = "CDM_CompanionDeviceService";

    /**
     * An intent action for a service to be bound whenever this app's companion device(s)
+1 −1
Original line number Diff line number Diff line
@@ -84,7 +84,7 @@ import java.util.List;
public class CompanionDeviceActivity extends FragmentActivity implements
        CompanionVendorHelperDialogFragment.CompanionVendorHelperDialogListener {
    private static final boolean DEBUG = false;
    private static final String TAG = CompanionDeviceActivity.class.getSimpleName();
    private static final String TAG = "CDM_CompanionDeviceActivity";

    // Keep the following constants in sync with
    // frameworks/base/services/companion/java/
Loading