Modern-Apps.git
Publicgit clone https://git.maproj.org/Modern-Apps.gitModern-Apps.git / library / locationprovider / src / main / java / com / android / location / provider / LocationProviderBase.java
LocationProviderBase.java33 lines · 1.1 KiBRaw
| 1 | package com.android.location.provider; |
| 2 | |
| 3 | import android.content.Context; |
| 4 | import android.location.Location; |
| 5 | import android.os.IBinder; |
| 6 | import android.os.WorkSource; |
| 7 | |
| 8 | import java.util.List; |
| 9 | |
| 10 | /** |
| 11 | * Compile-only stub of the platform's unbundled network/fused location provider base. Only the |
| 12 | * members our subclass uses/overrides are declared; the real class supplies the rest. |
| 13 | * `onSetRequest` is the sole abstract method. Do not package into an APK. |
| 14 | */ |
| 15 | public abstract class LocationProviderBase { |
| 16 | public LocationProviderBase(String tag, ProviderPropertiesUnbundled properties) {} |
| 17 | |
| 18 | public LocationProviderBase(Context context, String tag, ProviderPropertiesUnbundled properties) {} |
| 19 | |
| 20 | public IBinder getBinder() { |
| 21 | throw new RuntimeException("stub"); |
| 22 | } |
| 23 | |
| 24 | public void setEnabled(boolean enabled) {} |
| 25 | |
| 26 | public void setProperties(ProviderPropertiesUnbundled properties) {} |
| 27 | |
| 28 | public void reportLocation(Location location) {} |
| 29 | |
| 30 | public void reportLocations(List<Location> locations) {} |
| 31 | |
| 32 | protected abstract void onSetRequest(ProviderRequestUnbundled request, WorkSource source); |
| 33 | } |