From 08cb5412af388d0bbe57df3f07f05faeff8816ca Mon Sep 17 00:00:00 2001 From: Soonil Nagarkar Date: Wed, 9 Jun 2021 17:29:11 -0700 Subject: Minor eventlog and LocationProviderBase cleanups Change eventlog behavior solely based on logging properties, not the debug build. This allows for reduced logging even on debug builds. Minor updates to LocationProviderBase. Bug: 190609486 Test: manual Change-Id: I1efb28663de7ddd4224b01afe195baf3ff78ddb0 --- .../android/location/provider/LocationProviderBase.java | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'location/java') diff --git a/location/java/android/location/provider/LocationProviderBase.java b/location/java/android/location/provider/LocationProviderBase.java index eada22cd94dc..88a24794411c 100644 --- a/location/java/android/location/provider/LocationProviderBase.java +++ b/location/java/android/location/provider/LocationProviderBase.java @@ -62,6 +62,10 @@ import java.util.Objects; *

The service should have an intent filter in place for the location provider it wishes to * implements. Defaults for some providers are specified as constants in this class. * + *

Location providers are identified by their UID / package name / attribution tag. Based on this + * identity, location providers may be given some special privileges (such as making special + * requests to other location providers). + * * @hide */ @SystemApi @@ -95,14 +99,14 @@ public abstract class LocationProviderBase { public static final String ACTION_FUSED_PROVIDER = "com.android.location.service.FusedLocationProvider"; - private final String mTag; - private final @Nullable String mAttributionTag; - private final IBinder mBinder; + final String mTag; + final @Nullable String mAttributionTag; + final IBinder mBinder; // write locked on mBinder, read lock is optional depending on atomicity requirements - private @Nullable volatile ILocationProviderManager mManager; - private volatile ProviderProperties mProperties; - private volatile boolean mAllowed; + volatile @Nullable ILocationProviderManager mManager; + volatile ProviderProperties mProperties; + volatile boolean mAllowed; public LocationProviderBase(@NonNull Context context, @NonNull String tag, @NonNull ProviderProperties properties) { -- cgit v1.2.3-59-g8ed1b