Modern Apps git
git clone https://git.maproj.org/Modern-Apps.git
translate ▾

Modern-Apps.git / library / locationprovider / src / main / java / com / android / location / provider / LocationProviderBase.java

LocationProviderBase.java33 lines · 1.1 KiBRaw
1package com.android.location.provider;
2
3import android.content.Context;
4import android.location.Location;
5import android.os.IBinder;
6import android.os.WorkSource;
7
8import 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 */
15public 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}