1 /* 2 * Copyright (C) 2014 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package android.bluetooth.le; 18 19 import android.annotation.SuppressLint; 20 import android.annotation.SystemApi; 21 22 import java.util.List; 23 24 /** 25 * A special scan filter that lets the client decide how the scan record should be stored. 26 * 27 * @deprecated this is not used anywhere 28 * @hide 29 */ 30 @Deprecated 31 @SystemApi 32 @SuppressLint("AndroidFrameworkBluetoothPermission") 33 public final class TruncatedFilter { 34 private final ScanFilter mFilter; 35 private final List<ResultStorageDescriptor> mStorageDescriptors; 36 37 /** 38 * Constructor for {@link TruncatedFilter}. 39 * 40 * @param filter Scan filter of the truncated filter. 41 * @param storageDescriptors Describes how the scan should be stored. 42 */ TruncatedFilter(ScanFilter filter, List<ResultStorageDescriptor> storageDescriptors)43 public TruncatedFilter(ScanFilter filter, List<ResultStorageDescriptor> storageDescriptors) { 44 mFilter = filter; 45 mStorageDescriptors = storageDescriptors; 46 } 47 48 /** Returns the scan filter. */ getFilter()49 public ScanFilter getFilter() { 50 return mFilter; 51 } 52 53 /** Returns a list of descriptor for scan result storage. */ getStorageDescriptors()54 public List<ResultStorageDescriptor> getStorageDescriptors() { 55 return mStorageDescriptors; 56 } 57 } 58