本文整理汇总了Java中com.google.android.gms.common.GooglePlayServicesUtil.isSidewinderDevice方法的典型用法代码示例。如果您正苦于以下问题:Java GooglePlayServicesUtil.isSidewinderDevice方法的具体用法?Java GooglePlayServicesUtil.isSidewinderDevice怎么用?Java GooglePlayServicesUtil.isSidewinderDevice使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.android.gms.common.GooglePlayServicesUtil
的用法示例。
在下文中一共展示了GooglePlayServicesUtil.isSidewinderDevice方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onErrorResponse
import com.google.android.gms.common.GooglePlayServicesUtil; //导入方法依赖的package包/类
public final void onErrorResponse(VolleyError paramVolleyError)
{
super.onErrorResponse(paramVolleyError);
if ((!(paramVolleyError instanceof DfeServerError)) || (!GooglePlayServicesUtil.isSidewinderDevice(this.mContext))) {}
String str1;
String str2;
do
{
return;
str1 = Utils.getSysProperty("finsky.sw_home_url");
str2 = Uri.parse(Uri.decode(this.mArguments.getString("finsky.DetailsShimFragment.originalUrl"))).getAuthority();
} while ((TextUtils.isEmpty(str1)) || (!TextUtils.equals(str2, "play.google.com")));
SimpleAlertDialog.Builder localBuilder = new SimpleAlertDialog.Builder();
localBuilder.setMessageId(2131361851).setPositiveId(2131362937).setNegativeId(2131362370).setCanceledOnTouchOutside(true).setCallback(this, 1, null);
localBuilder.build().show(this.mFragmentManager, "DetailsShimFragment.errorDialog");
}
示例2: shouldUseReauthApi
import com.google.android.gms.common.GooglePlayServicesUtil; //导入方法依赖的package包/类
public static boolean shouldUseReauthApi(boolean paramBoolean, String paramString)
{
if (Build.VERSION.SDK_INT < 14) {}
FinskyExperiments localFinskyExperiments;
do
{
return false;
FinskyApp localFinskyApp = FinskyApp.get();
if (GooglePlayServicesUtil.isSidewinderDevice(localFinskyApp)) {
return true;
}
localFinskyExperiments = localFinskyApp.getExperiments(paramString);
if (!paramBoolean) {
break;
}
} while (localFinskyExperiments.isEnabled(12604372L));
return true;
return localFinskyExperiments.isEnabled(12602373L);
}
示例3: getDisplayAccountName
import com.google.android.gms.common.GooglePlayServicesUtil; //导入方法依赖的package包/类
public static String getDisplayAccountName(String paramString, Context paramContext)
{
if ((paramString == null) || (!GooglePlayServicesUtil.isSidewinderDevice(paramContext))) {
return paramString;
}
return getDisplayAccountName$17065f8(AccountHandler.findAccount(paramString, paramContext));
}
示例4: onCreate
import com.google.android.gms.common.GooglePlayServicesUtil; //导入方法依赖的package包/类
protected void onCreate(Bundle paramBundle)
{
super.onCreate(paramBundle);
this.mAccountName = FinskyApp.get().getCurrentAccountName();
if (this.mAccountName == null)
{
FinskyLog.d("Exit SettingsActivity - no current account.", new Object[0]);
finish();
return;
}
addPreferencesFromResource(2131165188);
if (!GooglePlayServicesUtil.isSidewinderDevice(this)) {
hideSettings("category-general", "receive-emails");
}
if (!PreAppDownloadWarnings.isPostponeDownloadUntilWifiEnabled(this)) {
hideSettings("category-general", "download-mode");
}
if (!AuthApi.isFingerprintAvailable(this.mAccountName)) {
hideSettings("category-user-controls", "fingerprint-auth");
}
this.mEventLog = FinskyApp.get().getEventLogger();
this.mPageNode = new GenericUiElementNode(12, null, null, null);
if (paramBundle == null) {
this.mEventLog.logPathImpression(0L, this.mPageNode);
}
getListView().setCacheColorHint(getResources().getColor(2131689637));
this.mAuthApi = new AuthApi(AccountHandler.findAccount(this.mAccountName, FinskyApp.get()));
}
示例5: onCreate
import com.google.android.gms.common.GooglePlayServicesUtil; //导入方法依赖的package包/类
public final void onCreate(Bundle paramBundle)
{
Bundle localBundle = this.mArguments;
ClientEnvironmentConfig.AndroidEnvironmentConfig localAndroidEnvironmentConfig = (ClientEnvironmentConfig.AndroidEnvironmentConfig)ParcelableProto.getProtoFromBundle(localBundle, "androidConfig");
Account localAccount = (Account)localBundle.getParcelable("account");
FragmentActivity localFragmentActivity = getActivity();
Context localContext = localFragmentActivity.getApplicationContext();
String str1 = localAccount.name;
String str2 = localAndroidEnvironmentConfig.accountName;
if (GooglePlayServicesUtil.isSidewinderDevice(localFragmentActivity))
{
boolean bool1 = str1.contains("@");
boolean bool2 = str2.contains("@");
if (bool1 != bool2)
{
if (bool1) {
str1 = str1.substring(0, str1.indexOf('@'));
}
if (bool2) {
str2 = str2.substring(0, str2.indexOf('@'));
}
}
}
if ((!localAccount.name.equalsIgnoreCase(localAndroidEnvironmentConfig.accountName)) && (!str1.equalsIgnoreCase(str2)))
{
Locale localLocale = Locale.US;
Object[] arrayOfObject = new Object[2];
arrayOfObject[0] = localAccount.name;
arrayOfObject[1] = localAndroidEnvironmentConfig.accountName;
throw new IllegalArgumentException(String.format(localLocale, "Account specified by integrator=%s must match AndroidEnvironmentConfig=%s", arrayOfObject));
}
this.mApiContext = new ApiContext(localContext, localAndroidEnvironmentConfig, new AndroidAuthenticator(localContext, localAccount, localAndroidEnvironmentConfig.authTokenType));
this.mRequestQueue = WalletRequestQueue.getApiRequestQueue(getActivity().getApplicationContext());
super.onCreate(paramBundle);
}
示例6: createNetwork
import com.google.android.gms.common.GooglePlayServicesUtil; //导入方法依赖的package包/类
private Network createNetwork()
{
if (Utils.isBackgroundDataEnabled(this))
{
FinskyExperiments localFinskyExperiments = getExperiments();
boolean bool = localFinskyExperiments.isEnabled(12603642L);
int i;
if ((localFinskyExperiments.isEnabled(12602748L)) || (localFinskyExperiments.isEnabled(12604235L)) || (localFinskyExperiments.isEnabled(12604236L))) {
i = 1;
}
OkHttpClient localOkHttpClient;
while ((GooglePlayServicesUtil.isSidewinderDevice(this)) || (((bool) || (i != 0)) && (((Boolean)G.enableOkHttp.get()).booleanValue())))
{
Protocol[] arrayOfProtocol = new Protocol[1];
arrayOfProtocol[0] = Protocol.HTTP_1_1;
ArrayList localArrayList = Lists.newArrayList(arrayOfProtocol);
if (!bool) {
localArrayList.add(Protocol.SPDY_3);
}
localOkHttpClient = new OkHttpClient();
List localList = Util.immutableList(localArrayList);
if (!localList.contains(Protocol.HTTP_1_1))
{
throw new IllegalArgumentException("protocols doesn't contain http/1.1: " + localList);
i = 0;
}
else
{
if (localList.contains(Protocol.HTTP_1_0)) {
throw new IllegalArgumentException("protocols must not contain http/1.0: " + localList);
}
if (localList.contains(null)) {
throw new IllegalArgumentException("protocols must not contain null");
}
localOkHttpClient.protocols = Util.immutableList(localList);
localOkHttpClient.followRedirects = false;
}
}
for (Object localObject = new GoogleOkHttpStack(this, localOkHttpClient, new GoogleUrlRewriter(this), null, ((Boolean)G.enableSensitiveLogging.get()).booleanValue());; localObject = new GoogleHttpClientStack(this, ((Boolean)G.enableSensitiveLogging.get()).booleanValue())) {
return new BasicNetwork((HttpStack)localObject, new ByteArrayPool(1024 * ((Integer)G.volleyBufferPoolSizeKb.get()).intValue()));
}
}
return new DenyAllNetwork();
}
示例7: isPostponeDownloadUntilWifiEnabled
import com.google.android.gms.common.GooglePlayServicesUtil; //导入方法依赖的package包/类
public static boolean isPostponeDownloadUntilWifiEnabled(Context paramContext)
{
FinskyApp localFinskyApp = FinskyApp.get();
return (localFinskyApp.mInstallPolicies.hasMobileNetwork()) && ((GooglePlayServicesUtil.isSidewinderDevice(paramContext)) || (localFinskyApp.getExperiments().isEnabled(12604154L)));
}