VancedMicroG/play-services-basement/src/main/java/com/google/android/gms/common/internal/GetServiceRequest.java

88 lines
2.6 KiB
Java
Raw Normal View History

2015-04-06 21:54:07 +00:00
/*
2017-06-12 22:11:15 +00:00
* Copyright (C) 2013-2017 microG Project Team
2015-04-06 21:54:07 +00:00
*
* 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.common.internal;
import android.accounts.Account;
import android.os.Bundle;
import android.os.IBinder;
2022-01-26 05:26:56 +00:00
import com.google.android.gms.common.Feature;
2015-04-06 21:54:07 +00:00
import com.google.android.gms.common.api.Scope;
import org.microg.gms.common.Constants;
2016-04-14 19:33:21 +00:00
import org.microg.gms.common.GmsService;
2015-04-06 21:54:07 +00:00
import org.microg.safeparcel.AutoSafeParcelable;
import java.util.Arrays;
2015-04-06 21:54:07 +00:00
public class GetServiceRequest extends AutoSafeParcelable {
2022-01-26 05:26:56 +00:00
@Field(1)
private int versionCode = 4;
@Field(2)
2015-04-06 21:54:07 +00:00
public final int serviceId;
2022-01-26 05:26:56 +00:00
@Field(3)
public int gmsVersion;
2022-01-26 05:26:56 +00:00
@Field(4)
2015-04-06 21:54:07 +00:00
public String packageName;
2022-01-26 05:26:56 +00:00
@Field(5)
2015-04-06 21:54:07 +00:00
public IBinder accountAccessor;
2022-01-26 05:26:56 +00:00
@Field(6)
2015-04-06 21:54:07 +00:00
public Scope[] scopes;
2022-01-26 05:26:56 +00:00
@Field(7)
2015-04-06 21:54:07 +00:00
public Bundle extras;
2022-01-26 05:26:56 +00:00
@Field(8)
2015-04-06 21:54:07 +00:00
public Account account;
2022-01-26 05:26:56 +00:00
@Field(9)
private long field9;
@Field(10)
public Feature[] defaultFeatures;
@Field(11)
public Feature[] apiFeatures;
@Field(12)
private boolean field12;
@Field(13)
private int field13;
@Field(14)
private boolean field14;
@Field(15)
private String field15;
2018-05-19 19:19:25 +00:00
2015-04-06 21:54:07 +00:00
private GetServiceRequest() {
serviceId = -1;
gmsVersion = Constants.GMS_VERSION_CODE;
2015-04-06 21:54:07 +00:00
}
public GetServiceRequest(int serviceId) {
this.serviceId = serviceId;
this.gmsVersion = Constants.GMS_VERSION_CODE;
2022-01-26 05:26:56 +00:00
this.field12 = true;
}
@Override
public String toString() {
return "GetServiceRequest{" +
2016-04-14 19:33:21 +00:00
"serviceId=" + GmsService.nameFromServiceId(serviceId) +
", gmsVersion=" + gmsVersion +
", packageName='" + packageName + '\'' +
(scopes == null || scopes.length == 0 ? "" : (", scopes=" + Arrays.toString(scopes))) +
(extras == null ? "" : (", extras=" + extras)) +
(account == null ? "" : (", account=" + account)) +
'}';
2015-04-06 21:54:07 +00:00
}
2022-01-26 05:26:56 +00:00
public static Creator<GetServiceRequest> CREATOR = new AutoCreator<GetServiceRequest>(GetServiceRequest.class);
}