mirror of
https://github.com/TeamVanced/VancedMicroG
synced 2025-02-23 16:01:09 +01:00
Update location reporting API
This commit is contained in:
parent
500032ab2a
commit
ba032d7482
@ -0,0 +1,3 @@
|
|||||||
|
package com.google.android.gms.location.reporting;
|
||||||
|
|
||||||
|
parcelable UploadRequest;
|
@ -0,0 +1,3 @@
|
|||||||
|
package com.google.android.gms.location.reporting;
|
||||||
|
|
||||||
|
parcelable UploadRequestResult;
|
@ -1,8 +1,15 @@
|
|||||||
package com.google.android.gms.location.reporting.internal;
|
package com.google.android.gms.location.reporting.internal;
|
||||||
|
|
||||||
import android.accounts.Account;
|
import android.accounts.Account;
|
||||||
|
import com.google.android.gms.location.places.PlaceReport;
|
||||||
import com.google.android.gms.location.reporting.ReportingState;
|
import com.google.android.gms.location.reporting.ReportingState;
|
||||||
|
import com.google.android.gms.location.reporting.UploadRequest;
|
||||||
|
import com.google.android.gms.location.reporting.UploadRequestResult;
|
||||||
|
|
||||||
interface IReportingService {
|
interface IReportingService {
|
||||||
ReportingState unknown3(in Account account);
|
ReportingState getReportingState(in Account account) = 0;
|
||||||
|
int tryOptIn(in Account account) = 1;
|
||||||
|
UploadRequestResult requestUpload(in UploadRequest request) = 2;
|
||||||
|
int cancelUploadRequest(long l) = 3;
|
||||||
|
int reportDeviceAtPlace(in Account account, in PlaceReport report) = 4;
|
||||||
}
|
}
|
||||||
|
@ -16,11 +16,28 @@
|
|||||||
|
|
||||||
package com.google.android.gms.location.places;
|
package com.google.android.gms.location.places;
|
||||||
|
|
||||||
|
import org.microg.gms.common.PublicApi;
|
||||||
import org.microg.safeparcel.AutoSafeParcelable;
|
import org.microg.safeparcel.AutoSafeParcelable;
|
||||||
|
import org.microg.safeparcel.SafeParceled;
|
||||||
|
|
||||||
/**
|
@PublicApi
|
||||||
* TODO: usage
|
|
||||||
*/
|
|
||||||
public class PlaceReport extends AutoSafeParcelable {
|
public class PlaceReport extends AutoSafeParcelable {
|
||||||
|
@SafeParceled(1)
|
||||||
|
private int versionCode;
|
||||||
|
@SafeParceled(2)
|
||||||
|
private String placeId;
|
||||||
|
@SafeParceled(3)
|
||||||
|
private String tag;
|
||||||
|
@SafeParceled(4)
|
||||||
|
private String source;
|
||||||
|
|
||||||
|
public String getPlaceId() {
|
||||||
|
return placeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTag() {
|
||||||
|
return tag;
|
||||||
|
}
|
||||||
|
|
||||||
public static final Creator<PlaceReport> CREATOR = new AutoCreator<PlaceReport>(PlaceReport.class);
|
public static final Creator<PlaceReport> CREATOR = new AutoCreator<PlaceReport>(PlaceReport.class);
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ import org.microg.safeparcel.SafeParceled;
|
|||||||
|
|
||||||
public class ReportingState extends AutoSafeParcelable {
|
public class ReportingState extends AutoSafeParcelable {
|
||||||
@SafeParceled(1)
|
@SafeParceled(1)
|
||||||
public int versionCode;
|
public int versionCode = 2;
|
||||||
@SafeParceled(2)
|
@SafeParceled(2)
|
||||||
public int reportingEnabled;
|
public int reportingEnabled;
|
||||||
@SafeParceled(3)
|
@SafeParceled(3)
|
||||||
@ -36,6 +36,8 @@ public class ReportingState extends AutoSafeParcelable {
|
|||||||
public int expectedOptInResult;
|
public int expectedOptInResult;
|
||||||
@SafeParceled(8)
|
@SafeParceled(8)
|
||||||
public Integer deviceTag;
|
public Integer deviceTag;
|
||||||
|
@SafeParceled(9)
|
||||||
|
public int expectedOptInResultAssumingLocationEnabled;
|
||||||
|
|
||||||
public static final Creator<ReportingState> CREATOR = new AutoCreator<ReportingState>(ReportingState.class);
|
public static final Creator<ReportingState> CREATOR = new AutoCreator<ReportingState>(ReportingState.class);
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,41 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2013-2015 microG Project Team
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.google.android.gms.location.reporting;
|
||||||
|
|
||||||
|
import android.accounts.Account;
|
||||||
|
|
||||||
|
import org.microg.safeparcel.AutoSafeParcelable;
|
||||||
|
import org.microg.safeparcel.SafeParceled;
|
||||||
|
|
||||||
|
public class UploadRequest extends AutoSafeParcelable {
|
||||||
|
@SafeParceled(1)
|
||||||
|
public int versionCode = 1;
|
||||||
|
@SafeParceled(2)
|
||||||
|
public Account account;
|
||||||
|
@SafeParceled(3)
|
||||||
|
public String reason;
|
||||||
|
@SafeParceled(4)
|
||||||
|
public long durationMillis;
|
||||||
|
@SafeParceled(5)
|
||||||
|
public long movingLatencyMillis;
|
||||||
|
@SafeParceled(6)
|
||||||
|
public long stationaryLatencyMillis;
|
||||||
|
@SafeParceled(7)
|
||||||
|
public String appSpecificKey;
|
||||||
|
|
||||||
|
public static final Creator<UploadRequest> CREATOR = new AutoCreator<UploadRequest>(UploadRequest.class);
|
||||||
|
}
|
@ -0,0 +1,34 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2013-2015 microG Project Team
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.google.android.gms.location.reporting;
|
||||||
|
|
||||||
|
import org.microg.safeparcel.AutoSafeParcelable;
|
||||||
|
import org.microg.safeparcel.SafeParceled;
|
||||||
|
|
||||||
|
public class UploadRequestResult extends AutoSafeParcelable {
|
||||||
|
@SafeParceled(1)
|
||||||
|
public int versionCode = 1;
|
||||||
|
@SafeParceled(2)
|
||||||
|
public int resultCode;
|
||||||
|
@SafeParceled(3)
|
||||||
|
public long requestId;
|
||||||
|
|
||||||
|
public UploadRequestResult() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final Creator<UploadRequestResult> CREATOR = new AutoCreator<UploadRequestResult>(UploadRequestResult.class);
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user