Skip to content

Commit 6c554be

Browse files
committed
[commit] lint
1 parent 3624494 commit 6c554be

File tree

20 files changed

+24
-52
lines changed

20 files changed

+24
-52
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
/local.properties
44
/.idea/workspace.xml
55
/.idea/libraries
6-
.DS_Store
76
/build
87
/captures
98
/.idea

app/src/androidTest/java/com/code19/androidcommon/ApplicationTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2016 android@19code.com
2+
* Copyright (C) 2016 android@19code.com
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

app/src/main/java/com/code19/androidcommon/HandlerActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2016 android@19code.com
2+
* Copyright (C) 2016 android@19code.com
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

app/src/main/java/com/code19/androidcommon/MainActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2016 android@19code.com
2+
* Copyright (C) 2016 android@19code.com
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

app/src/test/java/com/code19/androidcommon/ExampleUnitTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2016 android@19code.com
2+
* Copyright (C) 2016 android@19code.com
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

build.gradle

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,3 @@
1-
/*
2-
* Copyright (C) 2016 android@19code.com
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS,
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
* See the License for the specific language governing permissions and
14-
* limitations under the License.
15-
*/
16-
171
// Top-level build file where you can add configuration options common to all sub-projects/modules.
182

193
buildscript {

gradle.properties

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,4 @@
2828
# This option should only be used with decoupled projects. More details, visit
2929
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
3030
# org.gradle.parallel=true
31-
#Sat May 07 10:35:34 CST 2016
32-
systemProp.http.proxyHost=127.0.0.1
33-
systemProp.http.proxyPort=1248
31+
#Sat May 07 10:35:34 CST 2016

library/src/main/java/com/code19/library/AppUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2016 android@19code.com
2+
* Copyright (C) 2016 android@19code.com
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

library/src/main/java/com/code19/library/CacheUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2016 android@19code.com
2+
* Copyright (C) 2016 android@19code.com
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

library/src/main/java/com/code19/library/CipherUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2016 android@19code.com
2+
* Copyright (C) 2016 android@19code.com
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

library/src/main/java/com/code19/library/DateUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2016 android@19code.com
2+
* Copyright (C) 2016 android@19code.com
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

library/src/main/java/com/code19/library/DensityUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2016 android@19code.com
2+
* Copyright (C) 2016 android@19code.com
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

library/src/main/java/com/code19/library/DeviceUtils.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2016 android@19code.com
2+
* Copyright (C) 2016 android@19code.com
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -148,7 +148,7 @@ private static String getGPRSIP() {
148148
for (Enumeration<InetAddress> enumIpAddr = en.nextElement().getInetAddresses(); enumIpAddr.hasMoreElements(); ) {
149149
InetAddress inetAddress = enumIpAddr.nextElement();
150150
if (!inetAddress.isLoopbackAddress()) {
151-
return inetAddress.getHostAddress().toString();
151+
return new String(inetAddress.getHostAddress());
152152
}
153153
}
154154
}
@@ -986,7 +986,7 @@ public String getGSFID() {
986986
if (c != null) {
987987
c.close();
988988
}
989-
c.close();
989+
//c.close();
990990
return null;
991991
}
992992
try {

library/src/main/java/com/code19/library/FileUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2016 android@19code.com
2+
* Copyright (C) 2016 android@19code.com
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

library/src/main/java/com/code19/library/GsonUtil.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2016 android@19code.com
2+
* Copyright (C) 2016 android@19code.com
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -45,10 +45,6 @@ public class GsonUtil {
4545
}
4646
}
4747

48-
private GsonUtil() {
49-
}
50-
51-
5248
public static String objectToJson(Object ts) {
5349
String jsonStr = null;
5450
if (gson != null) {

library/src/main/java/com/code19/library/JsonUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2016 android@19code.com
2+
* Copyright (C) 2016 android@19code.com
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

library/src/main/java/com/code19/library/NetUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2016 android@19code.com
2+
* Copyright (C) 2016 android@19code.com
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

library/src/main/java/com/code19/library/SPUtils.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2016 android@19code.com
2+
* Copyright (C) 2016 android@19code.com
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -27,7 +27,7 @@ public class SPUtils {
2727

2828
public static void setBoolean(Context context, String filename, String key, boolean value) {
2929
SharedPreferences sp = context.getSharedPreferences(filename, Context.MODE_PRIVATE);
30-
sp.edit().putBoolean(key, value).commit();
30+
sp.edit().putBoolean(key, value).apply();
3131
}
3232

3333

@@ -38,7 +38,7 @@ public static boolean getBoolean(Context context, String filename, String key, b
3838

3939
public static void setInt(Context context, String filename, String key, int value) {
4040
SharedPreferences sp = context.getSharedPreferences(filename, Context.MODE_PRIVATE);
41-
sp.edit().putInt(key, value).commit();
41+
sp.edit().putInt(key, value).apply();
4242
}
4343

4444
public static int getInt(Context context, String filename, String key, int defaultValue) {
@@ -48,7 +48,7 @@ public static int getInt(Context context, String filename, String key, int defau
4848

4949
public static void setString(Context context, String filename, String key, String value) {
5050
SharedPreferences sp = context.getSharedPreferences(filename, Context.MODE_PRIVATE);
51-
sp.edit().putString(key, value).commit();
51+
sp.edit().putString(key, value).apply();
5252
}
5353

5454
public static String getString(Context context, String filename, String key, String defaultValue) {

library/src/main/java/com/code19/library/SystemUtils.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2016 android@19code.com
2+
* Copyright (C) 2016 android@19code.com
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -81,11 +81,7 @@ public static boolean isBackground(Context context) {
8181
.getRunningAppProcesses();
8282
for (RunningAppProcessInfo appProcess : appProcesses) {
8383
if (appProcess.processName.equals(context.getPackageName())) {
84-
if (appProcess.importance == RunningAppProcessInfo.IMPORTANCE_BACKGROUND) {
85-
return true;
86-
} else {
87-
return false;
88-
}
84+
return appProcess.importance == RunningAppProcessInfo.IMPORTANCE_BACKGROUND;
8985
}
9086
}
9187
return false;

library/src/main/java/com/code19/library/ViewUtils.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2016 android@19code.com
2+
* Copyright (C) 2016 android@19code.com
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -38,7 +38,6 @@
3838

3939
/**
4040
* Blog : http://blog.csdn.net/u011240877
41-
*
4241
*/
4342
public class ViewUtils {
4443

0 commit comments

Comments
 (0)