Skip to content

Commit d3f0a8d

Browse files
authored
Merge pull request #778 from Blankj/1.22.9
1.22.9
2 parents 63c4dae + 12a006f commit d3f0a8d

File tree

34 files changed

+451
-127
lines changed

34 files changed

+451
-127
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
* `18/12/29` [add] AntiShakeUtils and VibrateUtils. Publish v1.22.9.
2+
* `18/12/28` [fix] ToastUtils show behind the dialog when close notification.
3+
* `18/12/27` [fix] LogUtils print StringBuilder failed.
14
* `18/12/24` [fix] Utils$ActivityLifecycleImpl.consumeOnActivityDestroyedListener ConcurrentModificationException. Publish v1.22.7.
25
* `18/12/22` [fix] AdaptScreenUtils#pt2px don't work when start webview. Publish v1.22.6.
36
* `18/12/21` [add] LogUtils support print Map, Collection and Object to String.

README-CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141

4242
[logo]: https://raw.githubusercontent.com/Blankj/AndroidUtilCode/master/art/logo.png
4343

44-
[aucSvg]: https://img.shields.io/badge/AndroidUtilCode-v1.22.7-brightgreen.svg
44+
[aucSvg]: https://img.shields.io/badge/AndroidUtilCode-v1.22.9-brightgreen.svg
4545
[auc]: https://github.com/Blankj/AndroidUtilCode
4646

4747
[apiSvg]: https://img.shields.io/badge/API-14+-brightgreen.svg

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ If this project helps you a lot and you want to support the project's developmen
4141

4242
[logo]: https://raw.githubusercontent.com/Blankj/AndroidUtilCode/master/art/logo.png
4343

44-
[aucSvg]: https://img.shields.io/badge/AndroidUtilCode-v1.22.7-brightgreen.svg
44+
[aucSvg]: https://img.shields.io/badge/AndroidUtilCode-v1.22.9-brightgreen.svg
4545
[auc]: https://github.com/Blankj/AndroidUtilCode
4646

4747
[apiSvg]: https://img.shields.io/badge/API-14+-brightgreen.svg

bus-gradle-plugin/project.properties

Lines changed: 0 additions & 6 deletions
This file was deleted.

config.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ ext {
55
compileSdkVersion = 27
66
minSdkVersion = 14
77
targetSdkVersion = 27
8-
versionCode = 1_022_007
9-
versionName = '1.22.7'// E.g. 1.9.72 => 1,009,072
8+
versionCode = 1_022_009
9+
versionName = '1.22.9'// E.g. 1.9.72 => 1,009,072
1010

1111
bus = [
1212
isDebug: false,

lib/base/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ dependencies {
1515
api dep.free_proguard
1616
api 'com.r0adkll:slidableactivity:2.0.5'
1717
compileOnly dep.leakcanary.android_no_op
18-
// api 'com.blankj:utilcode:1.22.7'
18+
// api 'com.blankj:utilcode:1.22.9'
1919
}

lib/base/src/main/java/com/blankj/lib/base/BaseActivity.kt

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import android.os.Bundle
55
import android.support.v7.app.AppCompatActivity
66
import android.view.LayoutInflater
77
import android.view.View
8+
import com.blankj.utilcode.util.AntiShakeUtils
89

910
/**
1011
* ```
@@ -18,16 +19,6 @@ abstract class BaseActivity : AppCompatActivity(), IBaseView {
1819

1920
protected lateinit var mContentView: View
2021
protected lateinit var mActivity: Activity
21-
private var lastClick: Long = 0// the time of last click
22-
private val isFastClick: Boolean
23-
get() {
24-
val now = System.currentTimeMillis()
25-
if (now - lastClick >= 200) {
26-
lastClick = now
27-
return false
28-
}
29-
return true
30-
}
3122

3223
override fun onCreate(savedInstanceState: Bundle?) {
3324
mActivity = this
@@ -45,6 +36,8 @@ abstract class BaseActivity : AppCompatActivity(), IBaseView {
4536
}
4637

4738
override fun onClick(view: View) {
48-
if (!isFastClick) onWidgetClick(view)
39+
if (AntiShakeUtils.isValid(view, 200)) {
40+
onWidgetClick(view)
41+
}
4942
}
5043
}

subutil/lib/src/main/java/com/blankj/subutil/util/VibrationUtils.java

Lines changed: 0 additions & 49 deletions
This file was deleted.

subutil/lib/src/test/java/com/blankj/subutil/util/TestUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ public static void init() {
2424

2525
@Test
2626
public void test() throws Exception {
27-
System.out.println(-1 << 2);
27+
2828
}
2929
}

subutil/pkg/src/main/java/com/blankj/subutil/pkg/helper/DialogHelper.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public class DialogHelper {
2121

2222
public static void showRationaleDialog(final ShouldRequest shouldRequest) {
2323
Activity topActivity = ActivityUtils.getTopActivity();
24-
if (topActivity == null) return;
24+
if (topActivity == null || topActivity.isFinishing()) return;
2525
new AlertDialog.Builder(topActivity)
2626
.setTitle(android.R.string.dialog_alert_title)
2727
.setMessage(R.string.permission_rationale_message)
@@ -45,7 +45,7 @@ public void onClick(DialogInterface dialog, int which) {
4545

4646
public static void showOpenAppSettingDialog() {
4747
Activity topActivity = ActivityUtils.getTopActivity();
48-
if (topActivity == null) return;
48+
if (topActivity == null || topActivity.isFinishing()) return;
4949
new AlertDialog.Builder(topActivity)
5050
.setTitle(android.R.string.dialog_alert_title)
5151
.setMessage(R.string.permission_denied_forever_message)

0 commit comments

Comments
 (0)