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

Commit 4aa2dbe8 authored by Ömer Faruk Yılmaz's avatar Ömer Faruk Yılmaz
Browse files

Move ScanFilterQueue from package `gatt` to `le_scan`

See go/scan-manager-refactor for more details.

Test: m com.android.btservices
Bug: 313335632
Bug: 267361243
Change-Id: I42d6f462c7f01662f2252e4d4fe3e2254b6f0042
parent 7302c97d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2589,7 +2589,7 @@ static int register_com_android_bluetooth_gatt_scan(JNIEnv* env) {
      {"gattClientScanFilterParamClearAllNative", "(I)V",
       (void*)gattClientScanFilterParamClearAllNative},
      {"gattClientScanFilterAddNative",
       "(I[Lcom/android/bluetooth/gatt/ScanFilterQueue$Entry;I)V",
       "(I[Lcom/android/bluetooth/le_scan/ScanFilterQueue$Entry;I)V",
       (void*)gattClientScanFilterAddNative},
      {"gattClientScanFilterClearNative", "(II)V",
       (void*)gattClientScanFilterClearNative},
+2 −2
Original line number Diff line number Diff line
@@ -381,7 +381,7 @@
        id="SimpleDateFormat"
        message="To get local formatting use `getDateInstance()`, `getDateTimeInstance()`, or `getTimeInstance()`, or use `new SimpleDateFormat(String template, Locale locale)` with for example `Locale.US` for ASCII dates.">
        <location
            file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/gatt/AppScanStats.java"
            file="packages/modules/Bluetooth/android/app/src/com/android/bluetooth/le_scan/AppScanStats.java"
            line="51"/>
    </issue>

+6 −6
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@
 * limitations under the License.
 */

package com.android.bluetooth.gatt;
package com.android.bluetooth.le_scan;

import android.bluetooth.BluetoothAssignedNumbers.OrganizationId;
import android.bluetooth.BluetoothUuid;
@@ -33,7 +33,7 @@ import java.util.UUID;
 *
 * @hide
 */
public class ScanFilterQueue {
/* package */ class ScanFilterQueue {
    public static final int TYPE_DEVICE_ADDRESS = 0;
    public static final int TYPE_SERVICE_DATA_CHANGED = 1;
    public static final int TYPE_SERVICE_UUID = 2;
@@ -54,7 +54,7 @@ public class ScanFilterQueue {
    public static final int TYPE_INVALID = 0x00;
    public static final int TYPE_WIFI_NAN_HASH = 0x01; // WIFI NAN HASH type

    public static class Entry {
    static class Entry {
        public byte type;
        public String address;
        public byte addr_type;
@@ -195,7 +195,7 @@ public class ScanFilterQueue {
    /**
     * Compute feature selection based on the filters presented.
     */
    public int getFeatureSelection() {
    int getFeatureSelection() {
        int selc = 0;
        for (Entry entry : mEntries) {
            selc |= (1 << entry.type);
@@ -203,14 +203,14 @@ public class ScanFilterQueue {
        return selc;
    }

    public ScanFilterQueue.Entry[] toArray() {
    ScanFilterQueue.Entry[] toArray() {
        return mEntries.toArray(new ScanFilterQueue.Entry[mEntries.size()]);
    }

    /**
     * Add ScanFilter to scan filter queue.
     */
    public void addScanFilter(ScanFilter filter) {
    void addScanFilter(ScanFilter filter) {
        if (filter == null) {
            return;
        }
+0 −1
Original line number Diff line number Diff line
@@ -52,7 +52,6 @@ import com.android.bluetooth.gatt.GattObjectsFactory;
import com.android.bluetooth.gatt.GattService;
import com.android.bluetooth.gatt.GattServiceConfig;
import com.android.bluetooth.gatt.ScanClient;
import com.android.bluetooth.gatt.ScanFilterQueue;
import com.android.internal.annotations.GuardedBy;
import com.android.internal.annotations.VisibleForTesting;

+0 −1
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@
package com.android.bluetooth.le_scan;

import com.android.bluetooth.gatt.FilterParams;
import com.android.bluetooth.gatt.ScanFilterQueue;

import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
Loading