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;
|
|
|
|
|
|
|
|
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 org.microg.safeparcel.SafeParceled;
|
|
|
|
|
2015-04-08 00:48:25 +00:00
|
|
|
import java.util.Arrays;
|
|
|
|
|
2020-11-19 14:56:44 +00:00
|
|
|
import kotlin.Suppress;
|
|
|
|
|
2015-04-06 21:54:07 +00:00
|
|
|
public class GetServiceRequest extends AutoSafeParcelable {
|
|
|
|
@SafeParceled(1)
|
2018-05-19 19:19:25 +00:00
|
|
|
private int versionCode = 3;
|
2015-04-06 21:54:07 +00:00
|
|
|
|
|
|
|
@SafeParceled(2)
|
|
|
|
public final int serviceId;
|
|
|
|
|
|
|
|
@SafeParceled(3)
|
2015-04-08 00:48:25 +00:00
|
|
|
public int gmsVersion;
|
2015-04-06 21:54:07 +00:00
|
|
|
|
|
|
|
@SafeParceled(4)
|
|
|
|
public String packageName;
|
|
|
|
|
|
|
|
@SafeParceled(5)
|
|
|
|
public IBinder accountAccessor;
|
|
|
|
|
|
|
|
@SafeParceled(6)
|
|
|
|
public Scope[] scopes;
|
|
|
|
|
|
|
|
@SafeParceled(7)
|
|
|
|
public Bundle extras;
|
|
|
|
|
|
|
|
@SafeParceled(8)
|
|
|
|
public Account account;
|
|
|
|
|
2018-05-19 19:19:25 +00:00
|
|
|
@SafeParceled(9)
|
|
|
|
public long long1;
|
|
|
|
|
2015-04-06 21:54:07 +00:00
|
|
|
private GetServiceRequest() {
|
|
|
|
serviceId = -1;
|
2015-04-08 00:48:25 +00:00
|
|
|
gmsVersion = Constants.MAX_REFERENCE_VERSION;
|
2015-04-06 21:54:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public GetServiceRequest(int serviceId) {
|
|
|
|
this.serviceId = serviceId;
|
2015-04-08 00:48:25 +00:00
|
|
|
this.gmsVersion = Constants.MAX_REFERENCE_VERSION;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public String toString() {
|
|
|
|
return "GetServiceRequest{" +
|
2016-04-14 19:33:21 +00:00
|
|
|
"serviceId=" + GmsService.nameFromServiceId(serviceId) +
|
2015-04-08 00:48:25 +00:00
|
|
|
", 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
|
|
|
}
|
|
|
|
|
2020-08-31 23:27:05 +00:00
|
|
|
public static Creator<GetServiceRequest> CREATOR = new AutoCreator<>(GetServiceRequest.class);
|
2015-04-06 21:54:07 +00:00
|
|
|
}
|