Mike Lockwood | d03ff94 | 2010-02-09 08:46:14 -0500 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2010 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 | |
Mike Lockwood | 00b7427 | 2010-03-26 10:41:48 -0400 | [diff] [blame] | 17 | package com.android.server.location; |
Mike Lockwood | d03ff94 | 2010-02-09 08:46:14 -0500 | [diff] [blame] | 18 | |
Soonil Nagarkar | 94749f7 | 2018-11-08 11:46:43 -0800 | [diff] [blame] | 19 | import android.location.LocationProvider; |
| 20 | import android.os.Bundle; |
| 21 | import android.os.WorkSource; |
Nick Pelly | 6fa9ad4 | 2012-07-16 12:18:23 -0700 | [diff] [blame] | 22 | |
| 23 | import com.android.internal.location.ProviderProperties; |
| 24 | import com.android.internal.location.ProviderRequest; |
| 25 | |
Soonil Nagarkar | 94749f7 | 2018-11-08 11:46:43 -0800 | [diff] [blame] | 26 | import java.io.FileDescriptor; |
| 27 | import java.io.PrintWriter; |
Mike Lockwood | d03ff94 | 2010-02-09 08:46:14 -0500 | [diff] [blame] | 28 | |
| 29 | /** |
| 30 | * Location Manager's interface for location providers. |
Nick Pelly | 6fa9ad4 | 2012-07-16 12:18:23 -0700 | [diff] [blame] | 31 | * @hide |
Mike Lockwood | d03ff94 | 2010-02-09 08:46:14 -0500 | [diff] [blame] | 32 | */ |
Soonil Nagarkar | 94749f7 | 2018-11-08 11:46:43 -0800 | [diff] [blame] | 33 | public abstract class LocationProviderInterface { |
Nick Pelly | 6fa9ad4 | 2012-07-16 12:18:23 -0700 | [diff] [blame] | 34 | |
Soonil Nagarkar | 94749f7 | 2018-11-08 11:46:43 -0800 | [diff] [blame] | 35 | /** Get name. */ |
| 36 | public abstract String getName(); |
Nick Pelly | 6fa9ad4 | 2012-07-16 12:18:23 -0700 | [diff] [blame] | 37 | |
Soonil Nagarkar | 94749f7 | 2018-11-08 11:46:43 -0800 | [diff] [blame] | 38 | /** Enable. */ |
| 39 | public abstract void enable(); |
Nick Pelly | 6fa9ad4 | 2012-07-16 12:18:23 -0700 | [diff] [blame] | 40 | |
Soonil Nagarkar | 94749f7 | 2018-11-08 11:46:43 -0800 | [diff] [blame] | 41 | /** Disable. */ |
| 42 | public abstract void disable(); |
| 43 | |
| 44 | /** Is enabled. */ |
| 45 | public abstract boolean isEnabled(); |
| 46 | |
| 47 | /** Set request. */ |
| 48 | public abstract void setRequest(ProviderRequest request, WorkSource source); |
| 49 | |
| 50 | /** dump. */ |
| 51 | public abstract void dump(FileDescriptor fd, PrintWriter pw, String[] args); |
| 52 | |
| 53 | /** Get properties. */ |
| 54 | public abstract ProviderProperties getProperties(); |
| 55 | |
| 56 | /** |
| 57 | * Get status. |
| 58 | * |
| 59 | * @deprecated Will be removed in a future release. |
| 60 | */ |
| 61 | @Deprecated |
| 62 | public int getStatus(Bundle extras) { |
| 63 | return LocationProvider.AVAILABLE; |
| 64 | } |
| 65 | |
| 66 | /** |
| 67 | * Get status update time. |
| 68 | * |
| 69 | * @deprecated Will be removed in a future release. |
| 70 | */ |
| 71 | @Deprecated |
| 72 | public long getStatusUpdateTime() { |
| 73 | return 0; |
| 74 | } |
| 75 | |
| 76 | /** Send extra command. */ |
| 77 | public abstract boolean sendExtraCommand(String command, Bundle extras); |
Mike Lockwood | d03ff94 | 2010-02-09 08:46:14 -0500 | [diff] [blame] | 78 | } |