Add TestApi annotations to LocationManager

Expose some APIs for CTS tests.

Bug: 123766886
Test: N/A
Change-Id: I4fe7d05cf13c3cff793803297698452c1bfc247e
This commit is contained in:
Soonil Nagarkar
2019-02-01 19:06:18 -08:00
parent f0513785ed
commit ac1879ab06
3 changed files with 32 additions and 0 deletions

View File

@@ -934,6 +934,7 @@ public class LocationManager {
* @hide
*/
@SystemApi
@TestApi
@RequiresPermission(anyOf = {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION})
public void requestLocationUpdates(LocationRequest request, LocationListener listener,
Looper looper) {
@@ -963,6 +964,7 @@ public class LocationManager {
* @hide
*/
@SystemApi
@TestApi
@RequiresPermission(anyOf = {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION})
public void requestLocationUpdates(LocationRequest request, PendingIntent intent) {
checkPendingIntent(intent);
@@ -1293,6 +1295,7 @@ public class LocationManager {
* @hide
*/
@SystemApi
@TestApi
@RequiresPermission(WRITE_SECURE_SETTINGS)
public void setLocationEnabledForUser(boolean enabled, UserHandle userHandle) {
Settings.Secure.putIntForUser(