本文整理汇总了Java中com.google.android.gms.common.api.Api类的典型用法代码示例。如果您正苦于以下问题:Java Api类的具体用法?Java Api怎么用?Java Api使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Api类属于com.google.android.gms.common.api包,在下文中一共展示了Api类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: zznf
import com.google.android.gms.common.api.Api; //导入依赖的package包/类
public zznf(Context paramContext, zznd paramzznd, Lock paramLock, Looper paramLooper, GoogleApiAvailability paramGoogleApiAvailability, Map<Api.zzc<?>, Api.zzb> paramMap, zzf paramzzf, Map<Api<?>, Integer> paramMap1, Api.zza<? extends zzwz, zzxa> paramzza, ArrayList<zzmw> paramArrayList, zznj.zza paramzza1)
{
this.mContext = paramContext;
this.zzXP = paramLock;
this.zzaon = paramGoogleApiAvailability;
this.zzapQ = paramMap;
this.zzapu = paramzzf;
this.zzapv = paramMap1;
this.zzaoo = paramzza;
this.zzaoR = paramzznd;
this.zzaqn = paramzza1;
Iterator localIterator = paramArrayList.iterator();
while (localIterator.hasNext()) {
((zzmw)localIterator.next()).zzaoQ = this;
}
this.zzaqi = new zzb(paramLooper);
this.zzaqh = paramLock.newCondition();
this.zzaqk = new zznc(this);
}
示例2: zzoX
import com.google.android.gms.common.api.Api; //导入依赖的package包/类
final void zzoX()
{
ArrayList localArrayList = new ArrayList();
this.zzapi = 3;
this.zzapk = this.zzape.zzapQ.size();
Iterator localIterator = this.zzape.zzapQ.keySet().iterator();
while (localIterator.hasNext())
{
Api.zzc localzzc = (Api.zzc)localIterator.next();
if (this.zzape.zzaqj.containsKey(localzzc))
{
if (zzoT()) {
zzoY();
}
}
else {
localArrayList.add(this.zzape.zzapQ.get(localzzc));
}
}
if (!localArrayList.isEmpty()) {
this.zzapw.add(zzng.zzpp().submit(new zzf(localArrayList)));
}
}
示例3: zzpb
import com.google.android.gms.common.api.Api; //导入依赖的package包/类
final Set<Scope> zzpb()
{
if (this.zzapu == null) {
return Collections.emptySet();
}
HashSet localHashSet = new HashSet(this.zzapu.zzaod);
Map localMap = this.zzapu.zzatx;
Iterator localIterator = localMap.keySet().iterator();
while (localIterator.hasNext())
{
Api localApi = (Api)localIterator.next();
if (!this.zzape.zzaqj.containsKey(localApi.zzor())) {
localHashSet.addAll(((zzf.zza)localMap.get(localApi)).zzXp);
}
}
return localHashSet;
}
示例4: onConnectionFailed
import com.google.android.gms.common.api.Api; //导入依赖的package包/类
public final void onConnectionFailed(ConnectionResult paramConnectionResult)
{
zzoJ();
zznf localzznf = this.zzaoQ;
Api localApi = this.zzaoO;
int i = this.zzaoP;
localzznf.zzXP.lock();
try
{
localzznf.zzaqk.zza(paramConnectionResult, localApi, i);
return;
}
finally
{
localzznf.zzXP.unlock();
}
}
示例5: zzb
import com.google.android.gms.common.api.Api; //导入依赖的package包/类
public final <A extends Api.zzb, T extends zzmu.zza<? extends Result, A>> T zzb(T paramT)
{
try
{
this.zzape.zzaoR.zzb(paramT);
Api.zzb localzzb = this.zzape.zzaoR.zza(paramT.zzor());
if ((!localzzb.isConnected()) && (this.zzape.zzaqj.containsKey(paramT.zzor())))
{
paramT.zzE(new Status(17));
return paramT;
}
paramT.zzb(localzzb);
return paramT;
}
catch (DeadObjectException localDeadObjectException)
{
this.zzape.zza(new zznf.zza(this)
{
public final void zzoS()
{
zzna.this.onConnectionSuspended(1);
}
});
}
return paramT;
}
示例6: if
import com.google.android.gms.common.api.Api; //导入依赖的package包/类
public static int zza$251b1977(Iterable<Api.zzb> paramIterable)
{
Iterator localIterator = paramIterable.iterator();
int i = 0;
if (localIterator.hasNext()) {
if (!((Api.zzb)localIterator.next()).zzkc()) {
break label50;
}
}
label50:
for (int j = 1;; j = i)
{
i = j;
break;
if (i != 0) {
return 1;
}
return 3;
}
}
示例7: zzf
import com.google.android.gms.common.api.Api; //导入依赖的package包/类
public zzf(Account paramAccount, Set<Scope> paramSet, Map<Api<?>, zza> paramMap, int paramInt, View paramView, String paramString1, String paramString2, zzxa paramzzxa)
{
this.zzRE = paramAccount;
if (paramSet == null) {}
HashSet localHashSet;
for (Set localSet = Collections.EMPTY_SET;; localSet = Collections.unmodifiableSet(paramSet))
{
this.zzaod = localSet;
if (paramMap == null) {
paramMap = Collections.EMPTY_MAP;
}
this.zzatx = paramMap;
this.zzaog = paramView;
this.zzaof = paramInt;
this.zzUb = paramString1;
this.zzaoh = paramString2;
this.zzaor = paramzzxa;
localHashSet = new HashSet(this.zzaod);
Iterator localIterator = this.zzatx.values().iterator();
while (localIterator.hasNext()) {
localHashSet.addAll(((zza)localIterator.next()).zzXp);
}
}
this.zzatw = Collections.unmodifiableSet(localHashSet);
}
示例8: getPlayServices
import com.google.android.gms.common.api.Api; //导入依赖的package包/类
@SafeVarargs
public static Observable<GoogleApiClient> getPlayServices(final Activity activity, final RxState state, final String[] permissions, final RxPermissionRationale rationale, final Scope[] scopes, final Api<? extends Api.ApiOptions.NotRequiredOptions>... services) {
return Observable.create(new GetPermissionStatusObservable(activity, permissions))
.flatMap(new Function<PermissionResult, Observable<Boolean>>() {
@Override
public Observable<Boolean> apply(PermissionResult permissionResult) {
return Observable.create(new GetPermissionObservable(activity, state, rationale, permissionResult));
}
})
.flatMap(new Function<Boolean, Observable<GoogleApiClient>>() {
@Override
public Observable<GoogleApiClient> apply(Boolean granted) {
if (granted) {
return Observable.create(new PlayServicesObservable(activity, state, scopes, services));
}
return Observable.error(new UserAbortedException());
}
}).compose(new BaseStateObservable.EndStateTransformer<GoogleApiClient>(state));
}
示例9: getOptionsFor
import com.google.android.gms.common.api.Api; //导入依赖的package包/类
@Override
public Api.ApiOptions.HasOptions getOptionsFor(Api<? extends Api.ApiOptions> api) {
if (Auth.GOOGLE_SIGN_IN_API.equals(api)) {
GoogleSignInOptions.Builder googleSignInOptions = new GoogleSignInOptions.Builder(
GoogleSignInOptions.DEFAULT_SIGN_IN)
.requestEmail();
// Check server client id for OAuth, so GoogleSignInAccount.getIdToken(); is non-null
String serverClientId = getFragment().getServerClientId();
if(serverClientId != null){
googleSignInOptions.requestIdToken(serverClientId);
}
return googleSignInOptions.build();
} else {
return super.getOptionsFor(api);
}
}
示例10: GoogleApiClientImpl
import com.google.android.gms.common.api.Api; //导入依赖的package包/类
public GoogleApiClientImpl(Context context, Looper looper, AccountInfo accountInfo,
Map<Api, Api.ApiOptions> apis,
Set<ConnectionCallbacks> connectionCallbacks,
Set<OnConnectionFailedListener> connectionFailedListeners, int clientId) {
this.context = context;
this.looper = looper;
this.handler = new Handler(looper);
this.accountInfo = accountInfo;
this.apis.putAll(apis);
this.connectionCallbacks.addAll(connectionCallbacks);
this.connectionFailedListeners.addAll(connectionFailedListeners);
this.clientId = clientId;
for (Api api : apis.keySet()) {
apiConnections.put(api, api.getBuilder().build(context, looper,
apis.get(api), accountInfo, baseConnectionCallbacks,
baseConnectionFailedListener));
}
}
示例11: RxLocationBaseOnSubscribe
import com.google.android.gms.common.api.Api; //导入依赖的package包/类
protected RxLocationBaseOnSubscribe(@NonNull RxLocation rxLocation, Long timeout, TimeUnit timeUnit) {
this.ctx = rxLocation.ctx;
this.services = new Api[]{LocationServices.API};
this.scopes = null;
if (timeout != null && timeUnit != null) {
this.timeoutTime = timeout;
this.timeoutUnit = timeUnit;
} else {
this.timeoutTime = rxLocation.timeoutTime;
this.timeoutUnit = rxLocation.timeoutUnit;
}
}
示例12: RxLocationBaseOnSubscribe
import com.google.android.gms.common.api.Api; //导入依赖的package包/类
protected RxLocationBaseOnSubscribe(@NonNull RxLocation rxLocation, Long timeout, TimeUnit timeUnit) {
this.ctx = rxLocation.ctx;
this.services = new Api[]{ LocationServices.API, ActivityRecognition.API };
this.scopes = null;
if (timeout != null && timeUnit != null) {
this.timeoutTime = timeout;
this.timeoutUnit = timeUnit;
} else {
this.timeoutTime = rxLocation.timeoutTime;
this.timeoutUnit = rxLocation.timeoutUnit;
}
}
示例13: GoogleApiClientManager
import com.google.android.gms.common.api.Api; //导入依赖的package包/类
public GoogleApiClientManager(Context context, Handler handler, Api<? extends Api.ApiOptions
.NotRequiredOptions>... apis){
mContext = context;
mMainHandler = handler;
final GoogleApiClient.Builder apiBuilder = new GoogleApiClient.Builder(context);
for(Api api: apis){
apiBuilder.addApi(api);
}
mGoogleApiClient = apiBuilder.build();
}
示例14: GoogleApiClientManager
import com.google.android.gms.common.api.Api; //导入依赖的package包/类
public GoogleApiClientManager(Context context, Api<? extends Api.ApiOptions.NotRequiredOptions>
... apis){
mContext = context;
mMainHandler = new Handler();
final GoogleApiClient.Builder apiBuilder = new GoogleApiClient.Builder(context);
for(Api api: apis){
apiBuilder.addApi(api);
}
mGoogleApiClient = apiBuilder.build();
}
示例15: dump
import com.google.android.gms.common.api.Api; //导入依赖的package包/类
public final void dump(String paramString, FileDescriptor paramFileDescriptor, PrintWriter paramPrintWriter, String[] paramArrayOfString)
{
String str = paramString + " ";
Iterator localIterator = this.zzapv.keySet().iterator();
while (localIterator.hasNext())
{
Api localApi = (Api)localIterator.next();
paramPrintWriter.append(paramString).append(localApi.mName).println(":");
((Api.zzb)this.zzapQ.get(localApi.zzor())).dump$ec96877(str, paramPrintWriter);
}
}