本文整理汇总了Java中com.mob.tools.utils.R.parseInt方法的典型用法代码示例。如果您正苦于以下问题:Java R.parseInt方法的具体用法?Java R.parseInt怎么用?Java R.parseInt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.mob.tools.utils.R
的用法示例。
在下文中一共展示了R.parseInt方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: a
import com.mob.tools.utils.R; //导入方法依赖的package包/类
public boolean a() {
String str;
try {
str = this.a.getContext().getPackageManager().getPackageInfo("com.tencent.mobileqq", 0).versionName;
} catch (Throwable th) {
Ln.w(th);
str = "0";
}
String[] split = str.split("\\.");
int[] iArr = new int[split.length];
for (int i = 0; i < iArr.length; i++) {
try {
iArr[i] = R.parseInt(split[i]);
} catch (Throwable th2) {
Ln.e(th2);
iArr[i] = 0;
}
}
return iArr.length > 1 && iArr[1] >= 5;
}
示例2: a
import com.mob.tools.utils.R; //导入方法依赖的package包/类
public boolean a() {
String str;
try {
str = this.a.getPackageManager().getPackageInfo("com.tencent.mm", 0).versionName;
Ln.i("wechat versionName ==>> " + str, new Object[0]);
} catch (Throwable th) {
Ln.e(th);
str = "0";
}
String[] split = str.split("_")[0].split("\\.");
int[] iArr = new int[split.length];
for (int i = 0; i < iArr.length; i++) {
try {
iArr[i] = R.parseInt(split[i]);
} catch (Throwable th2) {
Ln.e(th2);
iArr[i] = 0;
}
}
return iArr.length >= 4 && iArr[0] == 6 && iArr[1] == 0 && iArr[2] == 2 && iArr[3] <= 56;
}
示例3: a
import com.mob.tools.utils.R; //导入方法依赖的package包/类
public boolean a(HashMap<String, Object> hashMap, HashMap<Integer, HashMap<String, Object>> hashMap2) {
if (hashMap == null || hashMap.size() <= 0) {
return false;
}
ArrayList arrayList = (ArrayList) hashMap.get("fakelist");
if (arrayList == null) {
return false;
}
Iterator it = arrayList.iterator();
while (it.hasNext()) {
HashMap hashMap3 = (HashMap) it.next();
if (hashMap3 != null) {
int parseInt;
try {
parseInt = R.parseInt(String.valueOf(hashMap3.get("snsplat")));
} catch (Throwable th) {
Ln.e(th);
parseInt = -1;
}
if (parseInt != -1) {
hashMap2.put(Integer.valueOf(parseInt), hashMap3);
}
}
}
return true;
}
示例4: b
import com.mob.tools.utils.R; //导入方法依赖的package包/类
public boolean b() {
if (!d()) {
return false;
}
int parseInt;
try {
parseInt = R.parseInt(a("_build_info_sdk_int_"));
} catch (Throwable th) {
Ln.e(th);
parseInt = -1;
}
return parseInt >= Build.EMOJI_SUPPORTED_SDK_INT;
}
示例5: c
import com.mob.tools.utils.R; //导入方法依赖的package包/类
public boolean c() {
int parseInt;
try {
parseInt = R.parseInt(a("_build_info_sdk_int_"));
} catch (Throwable th) {
Ln.e(th);
parseInt = -1;
}
return parseInt >= Build.TIMELINE_SUPPORTED_SDK_INT;
}
示例6: h
import com.mob.tools.utils.R; //导入方法依赖的package包/类
private String h(String str) {
Ln.i(" upload file , server url = %s, file path = %s", h, str);
try {
KVPair kVPair = new KVPair("file", str);
ArrayList arrayList = new ArrayList();
arrayList.add(new KVPair(Network.USER_AGENT, c));
String httpPost = this.k.httpPost(r1, null, kVPair, arrayList, null);
Ln.i("upload file response == %s", httpPost);
if (httpPost == null || httpPost.length() <= 0) {
return null;
}
int parseInt;
HashMap fromJson = new Hashon().fromJson(httpPost);
if (fromJson.containsKey("status")) {
try {
parseInt = R.parseInt(String.valueOf(fromJson.get("status")));
} catch (Throwable th) {
parseInt = -1;
}
} else {
parseInt = -1;
}
if (parseInt != 200) {
return null;
}
return fromJson.containsKey("url") ? fromJson.get("url").toString() : null;
} catch (Throwable th2) {
Ln.e(th2);
return null;
}
}
示例7: a
import com.mob.tools.utils.R; //导入方法依赖的package包/类
protected void a(String str) {
if (!this.d) {
this.d = true;
Bundle urlToBundle = R.urlToBundle(str);
String string = urlToBundle.getString("error");
String string2 = urlToBundle.getString("error_code");
if (this.c == null) {
return;
}
if (string == null && string2 == null) {
Object string3 = urlToBundle.getString("code");
if (TextUtils.isEmpty(string3)) {
this.c.onError(new Throwable("Authorize code is empty"));
}
a(this.a.a().getPlatform(), string3);
} else if (string.equals("access_denied")) {
this.c.onCancel();
} else {
int i = 0;
try {
i = R.parseInt(string2);
} catch (Throwable th) {
Ln.e(th);
}
this.c.onError(new Throwable(string + " (" + i + SocializeConstants.OP_CLOSE_PAREN));
}
}
}
示例8: show
import com.mob.tools.utils.R; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
public void show(Context context) {
HashMap<String, Object> shareParamsMap = new HashMap<String, Object>();
shareParamsMap.putAll(params);
ShareSDK.initSDK(context);
// 打开分享菜单的统计
ShareSDK.logDemoEvent(1, null);
int iTheme = 0;
try {
iTheme = R.parseInt(String.valueOf(shareParamsMap.remove("theme")));
} catch (Throwable t) {}
OnekeyShareTheme theme = OnekeyShareTheme.fromValue(iTheme);
OnekeyShareThemeImpl themeImpl = theme.getImpl();
themeImpl.setShareParamsMap(shareParamsMap);
themeImpl.setDialogMode(shareParamsMap.containsKey("dialogMode") ? ((Boolean) shareParamsMap.remove("dialogMode")) : false);
themeImpl.setSilent(shareParamsMap.containsKey("silent") ? ((Boolean) shareParamsMap.remove("silent")) : false);
themeImpl.setCustomerLogos((ArrayList<CustomerLogo>) shareParamsMap.remove("customers"));
themeImpl.setHiddenPlatforms((HashMap<String, String>) shareParamsMap.remove("hiddenPlatforms"));
themeImpl.setPlatformActionListener((PlatformActionListener) shareParamsMap.remove("callback"));
themeImpl.setShareContentCustomizeCallback((ShareContentCustomizeCallback) shareParamsMap.remove("customizeCallback"));
if (shareParamsMap.containsKey("disableSSO") ? ((Boolean) shareParamsMap.remove("disableSSO")) : false) {
themeImpl.disableSSO();
}
themeImpl.show(context);
}
示例9: show
import com.mob.tools.utils.R; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
public void show(Context context) {
HashMap<String, Object> shareParamsMap = new HashMap<String, Object>();
shareParamsMap.putAll(params);
ShareSDK.initSDK(context.getApplicationContext());
// 打开分享菜单的统计
ShareSDK.logDemoEvent(1, null);
int iTheme = 0;
try {
iTheme = R.parseInt(String.valueOf(shareParamsMap.remove("theme")));
} catch (Throwable t) {}
com.sharesdk.onekeyshare.OnekeyShareTheme theme = com.sharesdk.onekeyshare.OnekeyShareTheme.fromValue(iTheme);
com.sharesdk.onekeyshare.OnekeyShareThemeImpl themeImpl = theme.getImpl();
themeImpl.setShareParamsMap(shareParamsMap);
themeImpl.setDialogMode(shareParamsMap.containsKey("dialogMode") ? ((Boolean) shareParamsMap.remove("dialogMode")) : false);
themeImpl.setSilent(shareParamsMap.containsKey("silent") ? ((Boolean) shareParamsMap.remove("silent")) : false);
themeImpl.setCustomerLogos((ArrayList<CustomerLogo>) shareParamsMap.remove("customers"));
themeImpl.setHiddenPlatforms((HashMap<String, String>) shareParamsMap.remove("hiddenPlatforms"));
themeImpl.setPlatformActionListener((PlatformActionListener) shareParamsMap.remove("callback"));
themeImpl.setShareContentCustomizeCallback((com.sharesdk.onekeyshare.ShareContentCustomizeCallback) shareParamsMap.remove("customizeCallback"));
if (shareParamsMap.containsKey("disableSSO") ? ((Boolean) shareParamsMap.remove("disableSSO")) : false) {
themeImpl.disableSSO();
}
themeImpl.show(context.getApplicationContext());
}
示例10: run
import com.mob.tools.utils.R; //导入方法依赖的package包/类
public void run() {
ArrayList arrayList = new ArrayList();
arrayList.add(new KVPair("access_token", this.b.d.getDb().getToken()));
arrayList.add(new KVPair("openid", this.b.d.getDb().get("openid")));
String a = this.b.c.a("https://api.weixin.qq.com/sns/userinfo", arrayList, "/sns/userinfo", this.b.e);
if (!TextUtils.isEmpty(a)) {
Ln.d("getUserInfo ==>>" + a, new Object[0]);
HashMap fromJson = new Hashon().fromJson(a);
if (!fromJson.containsKey(Utils.RESPONSE_ERRCODE) || ((Integer) fromJson.get(Utils.RESPONSE_ERRCODE)).intValue() == 0) {
String valueOf;
String valueOf2;
int parseInt;
try {
valueOf = String.valueOf(fromJson.get("openid"));
valueOf2 = String.valueOf(fromJson.get(UserTimelineActivity.NICK_NAME));
parseInt = R.parseInt(String.valueOf(fromJson.get("sex")));
} catch (Throwable th) {
Ln.e(th);
return;
}
String valueOf3 = String.valueOf(fromJson.get("province"));
String valueOf4 = String.valueOf(fromJson.get("city"));
String valueOf5 = String.valueOf(fromJson.get("country"));
String valueOf6 = String.valueOf(fromJson.get("headimgurl"));
String valueOf7 = String.valueOf(fromJson.get("unionid"));
this.b.d.getDb().put(UserTimelineActivity.NICK_NAME, valueOf2);
if (parseInt == 1) {
this.b.d.getDb().put(SocializeProtocolConstants.PROTOCOL_KEY_GENDER, "0");
} else if (parseInt == 2) {
this.b.d.getDb().put(SocializeProtocolConstants.PROTOCOL_KEY_GENDER, "1");
} else {
this.b.d.getDb().put(SocializeProtocolConstants.PROTOCOL_KEY_GENDER, "2");
}
this.b.d.getDb().putUserId(valueOf);
this.b.d.getDb().put(SocializeProtocolConstants.PROTOCOL_KEY_USER_ICON2, valueOf6);
this.b.d.getDb().put("province", valueOf3);
this.b.d.getDb().put("city", valueOf4);
this.b.d.getDb().put("country", valueOf5);
this.b.d.getDb().put("openid", valueOf);
this.b.d.getDb().put("unionid", valueOf7);
this.a.onComplete(this.b.d, 8, fromJson);
} else if (this.a != null) {
this.a.onError(this.b.d, 8, new Throwable(new Hashon().fromHashMap(fromJson)));
}
} else if (this.a != null) {
this.a.onError(this.b.d, 8, new Throwable());
}
}