1/* 2 * Copyright (C) 2009 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 17package android.location; 18 19import android.location.Criteria; 20import android.location.Location; 21import android.net.NetworkInfo; 22import android.os.Bundle; 23import android.os.WorkSource; 24 25/** 26 * Binder interface for services that implement location providers. 27 * 28 * {@hide} 29 */ 30interface ILocationProvider { 31 boolean requiresNetwork(); 32 boolean requiresSatellite(); 33 boolean requiresCell(); 34 boolean hasMonetaryCost(); 35 boolean supportsAltitude(); 36 boolean supportsSpeed(); 37 boolean supportsBearing(); 38 int getPowerRequirement(); 39 boolean meetsCriteria(in Criteria criteria); 40 int getAccuracy(); 41 void enable(); 42 void disable(); 43 int getStatus(out Bundle extras); 44 long getStatusUpdateTime(); 45 String getInternalState(); 46 void enableLocationTracking(boolean enable); 47 void setMinTime(long minTime, in WorkSource ws); 48 void updateNetworkState(int state, in NetworkInfo info); 49 void updateLocation(in Location location); 50 boolean sendExtraCommand(String command, inout Bundle extras); 51 void addListener(int uid); 52 void removeListener(int uid); 53} 54