1 /*
2  * Copyright (C) 2020 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 com.android.location.provider;
18 
19 import android.annotation.SystemApi;
20 
21 /**
22  * Class that exposes FusedBatchOptions to the GmsCore.
23  *
24  * @deprecated This class may no longer be used from Android P and onwards.
25  * @hide
26  */
27 @Deprecated
28 @SystemApi
29 public class GmsFusedBatchOptions {
30 
setMaxPowerAllocationInMW(double value)31     public void setMaxPowerAllocationInMW(double value) {}
32 
getMaxPowerAllocationInMW()33     public double getMaxPowerAllocationInMW() {
34         return 0;
35     }
36 
setPeriodInNS(long value)37     public void setPeriodInNS(long value) {}
38 
getPeriodInNS()39     public long getPeriodInNS() {
40         return 0;
41     }
42 
setSmallestDisplacementMeters(float value)43     public void setSmallestDisplacementMeters(float value) {}
44 
getSmallestDisplacementMeters()45     public float getSmallestDisplacementMeters() {
46         return 0;
47     }
48 
setSourceToUse(int source)49     public void setSourceToUse(int source) {}
50 
resetSourceToUse(int source)51     public void resetSourceToUse(int source) {}
52 
isSourceToUseSet(int source)53     public boolean isSourceToUseSet(int source) {
54         return false;
55     }
56 
getSourcesToUse()57     public int getSourcesToUse() {
58         return 0;
59     }
60 
setFlag(int flag)61     public void setFlag(int flag) {}
62 
resetFlag(int flag)63     public void resetFlag(int flag) {}
64 
isFlagSet(int flag)65     public boolean isFlagSet(int flag) {
66         return false;
67     }
68 
getFlags()69     public int getFlags() {
70         return 0;
71     }
72 
73     /**
74      * Definition of enum flag sets needed by this class.
75      * Such values need to be kept in sync with the ones in fused_location.h
76      */
77     public static final class SourceTechnologies {
78         public static int GNSS = 1 << 0;
79         public static int WIFI = 1 << 1;
80         public static int SENSORS = 1 << 2;
81         public static int CELL = 1 << 3;
82         public static int BLUETOOTH = 1 << 4;
83     }
84 
85     public static final class BatchFlags {
86         public static int WAKEUP_ON_FIFO_FULL = 1 << 0;
87         public static int CALLBACK_ON_LOCATION_FIX = 1 << 1;
88     }
89 }
90