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

Commit d5478592 authored by Wei Wang's avatar Wei Wang Committed by Android (Google) Code Review
Browse files

Merge "Fix API council review comments. Also hide certain APIs(2/3)." into lmp-dev

parents 24cb4d50 db0920ed
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -304,13 +304,15 @@ class AdvertiseManager {
            int maxAdvertiseUnit = minAdvertiseUnit + ADVERTISING_INTERVAL_DELTA_UNIT;
            int advertiseEventType = getAdvertisingEventType(client);
            int txPowerLevel = getTxPowerLevel(client.settings);
            int advertiseTimeoutSeconds = (int) TimeUnit.MILLISECONDS.toSeconds(
                    client.settings.getTimeout());
            gattClientEnableAdvNative(
                    clientIf,
                    minAdvertiseUnit, maxAdvertiseUnit,
                    advertiseEventType,
                    ADVERTISING_CHANNEL_ALL,
                    txPowerLevel,
                    client.settings.getTimeout());
                    advertiseTimeoutSeconds);
        }

        private void setAdvertisingData(int clientIf, AdvertiseData data, boolean isScanResponse) {
@@ -404,7 +406,7 @@ class AdvertiseManager {
        // Convert advertising event type to stack values.
        private int getAdvertisingEventType(AdvertiseClient client) {
            AdvertiseSettings settings = client.settings;
            if (settings.getIsConnectable()) {
            if (settings.isConnectable()) {
                return ADVERTISING_EVENT_TYPE_CONNECTABLE;
            }
            return client.scanResponse == null ? ADVERTISING_EVENT_TYPE_NON_CONNECTABLE