Add initial support for LocationAvailability

This commit is contained in:
Thibaut Girka 2016-07-31 08:51:05 +02:00 committed by Marvin W
parent d3efde305b
commit 707b9de6cd
No known key found for this signature in database
GPG Key ID: 072E9235DB996F2A
2 changed files with 28 additions and 1 deletions

View File

@ -61,7 +61,7 @@ interface IGoogleLocationManagerService {
Location getLastLocationWithPackage(String packageName) = 20;
void iglms26(in Location var1, int var2) = 25;
LocationAvailability iglms34(String var1) = 33;
LocationAvailability getLocationAvailabilityWithPackage(String packageName) = 33;
IBinder iglms51() = 50;
void requestLocationSettingsDialog(in LocationSettingsRequest settingsRequest, ISettingsCallbacks callback, String packageName) = 62;

View File

@ -17,8 +17,35 @@
package com.google.android.gms.location;
import org.microg.safeparcel.AutoSafeParcelable;
import org.microg.safeparcel.SafeParceled;
public class LocationAvailability extends AutoSafeParcelable {
@SafeParceled(1000)
private int versionCode = 1;
@SafeParceled(1)
private int cellStatus;
@SafeParceled(2)
private int wifiStatus;
@SafeParceled(3)
private long elapsedRealtimeNs;
@SafeParceled(4)
private int locationStatus;
private LocationAvailability(int cellStatus, int wifiStatus, int elapsedRealtimeNs, int locationStatus) {
this.cellStatus = cellStatus;
this.wifiStatus = wifiStatus;
this.elapsedRealtimeNs = elapsedRealtimeNs;
this.locationStatus = this.locationStatus;
}
public static LocationAvailability create() { // TODO
return new LocationAvailability(0, 0, 0, 0);
}
public static final Creator<LocationAvailability> CREATOR = new AutoCreator<LocationAvailability>(LocationAvailability.class);
}