Loading data/etc/privapp-permissions-platform.xml +1 −0 Original line number Diff line number Diff line Loading @@ -63,6 +63,7 @@ applications that come with the platform <privapp-permissions package="com.android.location.fused"> <permission name="android.permission.INSTALL_LOCATION_PROVIDER"/> <permission name="android.permission.UPDATE_DEVICE_STATS"/> </privapp-permissions> <privapp-permissions package="com.android.managedprovisioning"> Loading location/java/com/android/internal/location/ProviderRequest.java +20 −11 Original line number Diff line number Diff line Loading @@ -23,11 +23,10 @@ import android.os.Parcelable; import android.os.WorkSource; import android.util.TimeUtils; import com.android.internal.util.Preconditions; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Objects; /** @hide */ public final class ProviderRequest implements Parcelable { Loading Loading @@ -76,8 +75,8 @@ public final class ProviderRequest implements Parcelable { this.interval = interval; this.lowPowerMode = lowPowerMode; this.locationSettingsIgnored = locationSettingsIgnored; this.locationRequests = Preconditions.checkNotNull(locationRequests); this.workSource = Preconditions.checkNotNull(workSource); this.locationRequests = Objects.requireNonNull(locationRequests); this.workSource = Objects.requireNonNull(workSource); } public static final Parcelable.Creator<ProviderRequest> CREATOR = Loading Loading @@ -155,40 +154,50 @@ public final class ProviderRequest implements Parcelable { return mInterval; } public void setInterval(long interval) { /** Sets the request interval. */ public Builder setInterval(long interval) { this.mInterval = interval; return this; } public boolean isLowPowerMode() { return mLowPowerMode; } public void setLowPowerMode(boolean lowPowerMode) { /** Sets whether low power mode is enabled. */ public Builder setLowPowerMode(boolean lowPowerMode) { this.mLowPowerMode = lowPowerMode; return this; } public boolean isLocationSettingsIgnored() { return mLocationSettingsIgnored; } public void setLocationSettingsIgnored(boolean locationSettingsIgnored) { /** Sets whether location settings should be ignored. */ public Builder setLocationSettingsIgnored(boolean locationSettingsIgnored) { this.mLocationSettingsIgnored = locationSettingsIgnored; return this; } public List<LocationRequest> getLocationRequests() { return mLocationRequests; } public void setLocationRequests(List<LocationRequest> locationRequests) { this.mLocationRequests = Preconditions.checkNotNull(locationRequests); /** Sets the {@link LocationRequest}s associated with this request. */ public Builder setLocationRequests(List<LocationRequest> locationRequests) { this.mLocationRequests = Objects.requireNonNull(locationRequests); return this; } public WorkSource getWorkSource() { return mWorkSource; } public void setWorkSource(WorkSource workSource) { mWorkSource = Preconditions.checkNotNull(workSource); /** Sets the work source. */ public Builder setWorkSource(WorkSource workSource) { mWorkSource = Objects.requireNonNull(workSource); return this; } /** Loading location/lib/java/com/android/location/provider/ProviderRequestUnbundled.java +1 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ import java.util.List; * of this package for more information. */ public final class ProviderRequestUnbundled { private final ProviderRequest mRequest; /** @hide */ Loading packages/FusedLocation/Android.bp +25 −1 Original line number Diff line number Diff line Loading @@ -14,9 +14,33 @@ android_app { name: "FusedLocation", srcs: ["**/*.java"], srcs: ["src/**/*.java"], libs: ["com.android.location.provider"], platform_apis: true, certificate: "platform", privileged: true, } android_test { name: "FusedLocationTests", manifest: "test/AndroidManifest.xml", test_config: "test/AndroidTest.xml", srcs: [ "test/src/**/*.java", "src/**/*.java", // include real sources because we're forced to test this directly ], libs: [ "android.test.base", "android.test.runner", "com.android.location.provider", ], static_libs: [ "androidx.test.core", "androidx.test.rules", "androidx.test.ext.junit", "androidx.test.ext.truth", "mockito-target-minus-junit4", "truth-prebuilt", ], test_suites: ["device-tests"] } No newline at end of file packages/FusedLocation/AndroidManifest.xml +2 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,8 @@ <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" /> <uses-permission android:name="android.permission.UPDATE_DEVICE_STATS" /> <uses-permission android:name="android.permission.INSTALL_LOCATION_PROVIDER" /> <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL" /> Loading Loading
data/etc/privapp-permissions-platform.xml +1 −0 Original line number Diff line number Diff line Loading @@ -63,6 +63,7 @@ applications that come with the platform <privapp-permissions package="com.android.location.fused"> <permission name="android.permission.INSTALL_LOCATION_PROVIDER"/> <permission name="android.permission.UPDATE_DEVICE_STATS"/> </privapp-permissions> <privapp-permissions package="com.android.managedprovisioning"> Loading
location/java/com/android/internal/location/ProviderRequest.java +20 −11 Original line number Diff line number Diff line Loading @@ -23,11 +23,10 @@ import android.os.Parcelable; import android.os.WorkSource; import android.util.TimeUtils; import com.android.internal.util.Preconditions; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Objects; /** @hide */ public final class ProviderRequest implements Parcelable { Loading Loading @@ -76,8 +75,8 @@ public final class ProviderRequest implements Parcelable { this.interval = interval; this.lowPowerMode = lowPowerMode; this.locationSettingsIgnored = locationSettingsIgnored; this.locationRequests = Preconditions.checkNotNull(locationRequests); this.workSource = Preconditions.checkNotNull(workSource); this.locationRequests = Objects.requireNonNull(locationRequests); this.workSource = Objects.requireNonNull(workSource); } public static final Parcelable.Creator<ProviderRequest> CREATOR = Loading Loading @@ -155,40 +154,50 @@ public final class ProviderRequest implements Parcelable { return mInterval; } public void setInterval(long interval) { /** Sets the request interval. */ public Builder setInterval(long interval) { this.mInterval = interval; return this; } public boolean isLowPowerMode() { return mLowPowerMode; } public void setLowPowerMode(boolean lowPowerMode) { /** Sets whether low power mode is enabled. */ public Builder setLowPowerMode(boolean lowPowerMode) { this.mLowPowerMode = lowPowerMode; return this; } public boolean isLocationSettingsIgnored() { return mLocationSettingsIgnored; } public void setLocationSettingsIgnored(boolean locationSettingsIgnored) { /** Sets whether location settings should be ignored. */ public Builder setLocationSettingsIgnored(boolean locationSettingsIgnored) { this.mLocationSettingsIgnored = locationSettingsIgnored; return this; } public List<LocationRequest> getLocationRequests() { return mLocationRequests; } public void setLocationRequests(List<LocationRequest> locationRequests) { this.mLocationRequests = Preconditions.checkNotNull(locationRequests); /** Sets the {@link LocationRequest}s associated with this request. */ public Builder setLocationRequests(List<LocationRequest> locationRequests) { this.mLocationRequests = Objects.requireNonNull(locationRequests); return this; } public WorkSource getWorkSource() { return mWorkSource; } public void setWorkSource(WorkSource workSource) { mWorkSource = Preconditions.checkNotNull(workSource); /** Sets the work source. */ public Builder setWorkSource(WorkSource workSource) { mWorkSource = Objects.requireNonNull(workSource); return this; } /** Loading
location/lib/java/com/android/location/provider/ProviderRequestUnbundled.java +1 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ import java.util.List; * of this package for more information. */ public final class ProviderRequestUnbundled { private final ProviderRequest mRequest; /** @hide */ Loading
packages/FusedLocation/Android.bp +25 −1 Original line number Diff line number Diff line Loading @@ -14,9 +14,33 @@ android_app { name: "FusedLocation", srcs: ["**/*.java"], srcs: ["src/**/*.java"], libs: ["com.android.location.provider"], platform_apis: true, certificate: "platform", privileged: true, } android_test { name: "FusedLocationTests", manifest: "test/AndroidManifest.xml", test_config: "test/AndroidTest.xml", srcs: [ "test/src/**/*.java", "src/**/*.java", // include real sources because we're forced to test this directly ], libs: [ "android.test.base", "android.test.runner", "com.android.location.provider", ], static_libs: [ "androidx.test.core", "androidx.test.rules", "androidx.test.ext.junit", "androidx.test.ext.truth", "mockito-target-minus-junit4", "truth-prebuilt", ], test_suites: ["device-tests"] } No newline at end of file
packages/FusedLocation/AndroidManifest.xml +2 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,8 @@ <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" /> <uses-permission android:name="android.permission.UPDATE_DEVICE_STATS" /> <uses-permission android:name="android.permission.INSTALL_LOCATION_PROVIDER" /> <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL" /> Loading