am 36b0eac4: Merge "Add @SystemApi annotations to methods used by GmsCore. -Currently these methods are called using reflection for location. Bug: 17371392 Change-Id: I6546f5b485415beff69164ba0d526757ee831f69" into lmp-dev
* commit '36b0eac472fdbc45db378646170b891581b53b36': Add @SystemApi annotations to methods used by GmsCore. -Currently these methods are called using reflection for location. Bug: 17371392 Change-Id: I6546f5b485415beff69164ba0d526757ee831f69
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
package android.app;
|
||||
|
||||
import android.annotation.SdkConstant;
|
||||
import android.annotation.SystemApi;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Build;
|
||||
@@ -385,6 +386,7 @@ public class AlarmManager
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
@SystemApi
|
||||
public void set(int type, long triggerAtMillis, long windowMillis, long intervalMillis,
|
||||
PendingIntent operation, WorkSource workSource) {
|
||||
setImpl(type, triggerAtMillis, windowMillis, intervalMillis, operation, workSource, null);
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
package android.location;
|
||||
|
||||
import android.annotation.SystemApi;
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
@@ -771,6 +772,7 @@ public class Location implements Parcelable {
|
||||
* @see #makeComplete
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
public boolean isComplete() {
|
||||
if (mProvider == null) return false;
|
||||
if (!mHasAccuracy) return false;
|
||||
@@ -788,6 +790,7 @@ public class Location implements Parcelable {
|
||||
* @see #isComplete
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
public void makeComplete() {
|
||||
if (mProvider == null) mProvider = "?";
|
||||
if (!mHasAccuracy) {
|
||||
@@ -957,6 +960,7 @@ public class Location implements Parcelable {
|
||||
* @param isFromMockProvider true if this Location came from a mock provider, false otherwise
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
public void setIsFromMockProvider(boolean isFromMockProvider) {
|
||||
mIsFromMockProvider = isFromMockProvider;
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
package android.location;
|
||||
|
||||
import android.annotation.SystemApi;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.os.SystemClock;
|
||||
@@ -84,6 +85,7 @@ import android.util.TimeUtils;
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
public final class LocationRequest implements Parcelable {
|
||||
/**
|
||||
* Used with {@link #setQuality} to request the most accurate locations available.
|
||||
@@ -166,6 +168,7 @@ public final class LocationRequest implements Parcelable {
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
@SystemApi
|
||||
public static LocationRequest createFromDeprecatedProvider(String provider, long minTime,
|
||||
float minDistance, boolean singleShot) {
|
||||
if (minTime < 0) minTime = 0;
|
||||
@@ -191,6 +194,7 @@ public final class LocationRequest implements Parcelable {
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
@SystemApi
|
||||
public static LocationRequest createFromDeprecatedCriteria(Criteria criteria, long minTime,
|
||||
float minDistance, boolean singleShot) {
|
||||
if (minTime < 0) minTime = 0;
|
||||
@@ -475,6 +479,7 @@ public final class LocationRequest implements Parcelable {
|
||||
|
||||
|
||||
/** @hide */
|
||||
@SystemApi
|
||||
public LocationRequest setProvider(String provider) {
|
||||
checkProvider(provider);
|
||||
mProvider = provider;
|
||||
@@ -482,11 +487,13 @@ public final class LocationRequest implements Parcelable {
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
@SystemApi
|
||||
public String getProvider() {
|
||||
return mProvider;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
@SystemApi
|
||||
public LocationRequest setSmallestDisplacement(float meters) {
|
||||
checkDisplacement(meters);
|
||||
mSmallestDisplacement = meters;
|
||||
@@ -494,6 +501,7 @@ public final class LocationRequest implements Parcelable {
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
@SystemApi
|
||||
public float getSmallestDisplacement() {
|
||||
return mSmallestDisplacement;
|
||||
}
|
||||
@@ -508,11 +516,13 @@ public final class LocationRequest implements Parcelable {
|
||||
* @param workSource WorkSource defining power blame for this location request.
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
public void setWorkSource(WorkSource workSource) {
|
||||
mWorkSource = workSource;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
@SystemApi
|
||||
public WorkSource getWorkSource() {
|
||||
return mWorkSource;
|
||||
}
|
||||
@@ -531,11 +541,13 @@ public final class LocationRequest implements Parcelable {
|
||||
* @see android.app.AppOpsManager
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
public void setHideFromAppOps(boolean hideFromAppOps) {
|
||||
mHideFromAppOps = hideFromAppOps;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
@SystemApi
|
||||
public boolean getHideFromAppOps() {
|
||||
return mHideFromAppOps;
|
||||
}
|
||||
|
||||
@@ -1000,6 +1000,7 @@ public class WifiManager {
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
@SystemApi
|
||||
public boolean startScan(WorkSource workSource) {
|
||||
try {
|
||||
mService.startScan(null, workSource);
|
||||
@@ -1073,6 +1074,7 @@ public class WifiManager {
|
||||
* @return false if not supported.
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
public boolean isBatchedScanSupported() {
|
||||
try {
|
||||
return mService.isBatchedScanSupported();
|
||||
@@ -1099,6 +1101,7 @@ public class WifiManager {
|
||||
* {@link BATCHED_SCAN_RESULTS_AVAILABLE_ACTION} is received.
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
public List<BatchedScanResult> getBatchedScanResults() {
|
||||
try {
|
||||
return mService.getBatchedScanResults(mContext.getOpPackageName());
|
||||
|
||||
Reference in New Issue
Block a user