Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
门心叼龙
MVPArms
提交
2288e907
M
MVPArms
项目概览
门心叼龙
/
MVPArms
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
MVPArms
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
2288e907
编写于
4月 07, 2017
作者:
J
jessyan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
improve DataHelper
上级
c0c823f4
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
8 addition
and
8 deletion
+8
-8
arms/bintray.gradle
arms/bintray.gradle
+2
-2
arms/src/main/java/com/jess/arms/utils/DataHelper.java
arms/src/main/java/com/jess/arms/utils/DataHelper.java
+5
-5
build.gradle
build.gradle
+1
-1
未找到文件。
arms/bintray.gradle
浏览文件 @
2288e907
...
...
@@ -16,8 +16,8 @@ group = "me.jessyan"
bintray
{
user
=
isHasFile
?
properties
.
getProperty
(
"bintray.user"
)
:
System
.
getenv
(
"bintray
.
user"
)
key
=
isHasFile
?
properties
.
getProperty
(
"bintray.apikey"
)
:
System
.
getenv
(
"bintray
.
apikey"
)
user
=
isHasFile
?
properties
.
getProperty
(
"bintray.user"
)
:
System
.
getenv
(
"bintray
_
user"
)
key
=
isHasFile
?
properties
.
getProperty
(
"bintray.apikey"
)
:
System
.
getenv
(
"bintray
_
apikey"
)
pkg
{
repo
=
'maven'
...
...
arms/src/main/java/com/jess/arms/utils/DataHelper.java
浏览文件 @
2288e907
...
...
@@ -30,7 +30,7 @@ public class DataHelper {
if
(
mSharedPreferences
==
null
)
{
mSharedPreferences
=
context
.
getSharedPreferences
(
SP_NAME
,
Context
.
MODE_PRIVATE
);
}
mSharedPreferences
.
edit
().
putString
(
key
,
value
).
commit
();
mSharedPreferences
.
edit
().
putString
(
key
,
value
).
apply
();
}
/**
...
...
@@ -56,7 +56,7 @@ public class DataHelper {
if
(
mSharedPreferences
==
null
)
{
mSharedPreferences
=
context
.
getSharedPreferences
(
SP_NAME
,
Context
.
MODE_PRIVATE
);
}
mSharedPreferences
.
edit
().
putInt
(
key
,
value
).
commit
();
mSharedPreferences
.
edit
().
putInt
(
key
,
value
).
apply
();
}
/**
...
...
@@ -79,7 +79,7 @@ public class DataHelper {
if
(
mSharedPreferences
==
null
)
{
mSharedPreferences
=
context
.
getSharedPreferences
(
SP_NAME
,
Context
.
MODE_PRIVATE
);
}
mSharedPreferences
.
edit
().
remove
(
key
).
commit
();
mSharedPreferences
.
edit
().
remove
(
key
).
apply
();
}
/**
...
...
@@ -89,7 +89,7 @@ public class DataHelper {
if
(
mSharedPreferences
==
null
)
{
mSharedPreferences
=
context
.
getSharedPreferences
(
SP_NAME
,
Context
.
MODE_PRIVATE
);
}
mSharedPreferences
.
edit
().
clear
().
commit
();
mSharedPreferences
.
edit
().
clear
().
apply
();
}
/**
...
...
@@ -112,7 +112,7 @@ public class DataHelper {
// 将字节流编码成base64的字符串
String
oAuth_Base64
=
new
String
(
Base64
.
encode
(
baos
.
toByteArray
(),
Base64
.
DEFAULT
));
mSharedPreferences
.
edit
().
putString
(
key
,
oAuth_Base64
).
commit
();
mSharedPreferences
.
edit
().
putString
(
key
,
oAuth_Base64
).
apply
();
return
true
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
...
...
build.gradle
浏览文件 @
2288e907
...
...
@@ -5,7 +5,7 @@ buildscript {
jcenter
()
}
dependencies
{
classpath
'com.android.tools.build:gradle:2.3.
0
'
classpath
'com.android.tools.build:gradle:2.3.
1
'
//Gradle Android Maven plugin
classpath
'com.github.dcendents:android-maven-gradle-plugin:1.5'
//Gradle Bintray Plugin
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录