Skip to content
This repository was archived by the owner on Jul 14, 2021. It is now read-only.

Commit 4555062

Browse files
committed
Fix get touchSlop from ViewConfiguration may cause exception.
1 parent 22b5bdc commit 4555062

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ org.gradle.jvmargs=-Xmx2048m
4545
GROUP=com.alibaba.android
4646
ARTIFACT=virtualview
4747
VERSION=1
48-
VERSION_NAME=1.3.7
48+
VERSION_NAME=1.3.8
4949
PACKAGING_TYPE=aar
5050
systemProp.compileSdkVersion=26
5151
systemProp.targetSdkVersion=26

virtualview/src/main/java/com/tmall/wireless/vaf/framework/VafContext.java

+6-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,12 @@ public VafContext(Context context, boolean coreOnly) {
105105
mContainerService.setPageContext(this);
106106
}
107107
mImageLoader = ImageLoader.build(context);
108-
SLOP = ViewConfiguration.get(context).getScaledTouchSlop();
108+
try {
109+
SLOP = ViewConfiguration.get(context).getScaledTouchSlop();
110+
} catch (Exception e) {
111+
e.printStackTrace();
112+
SLOP = 8;
113+
}
109114
}
110115

111116
public void init(Context context) {

0 commit comments

Comments
 (0)