weex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From luckyc...@apache.org
Subject [incubator-weex] branch master updated: [Android] Fix problems in Android Lint (#2777)
Date Thu, 01 Aug 2019 12:27:17 GMT
This is an automated email from the ASF dual-hosted git repository.

luckychen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-weex.git


The following commit(s) were added to refs/heads/master by this push:
     new 756eb78  [Android] Fix problems in Android Lint (#2777)
756eb78 is described below

commit 756eb787424f7e92a855c60a7ed975804148bcdf
Author: YorkShen <shenyuancs@gmail.com>
AuthorDate: Thu Aug 1 20:27:11 2019 +0800

    [Android] Fix problems in Android Lint (#2777)
---
 android/sdk/build.gradle                           |  1 +
 .../main/java/com/taobao/weex/WXEnvironment.java   |  9 ++++----
 .../com/taobao/weex/bridge/WXBridgeManager.java    |  2 +-
 .../java/com/taobao/weex/bridge/WXJSObject.java    |  4 ++--
 .../java/com/taobao/weex/http/WXStreamModule.java  |  9 ++++----
 .../com/taobao/weex/ui/component/WXComponent.java  |  3 ++-
 .../java/com/taobao/weex/ui/component/WXImage.java |  3 ++-
 .../com/taobao/weex/ui/component/WXScroller.java   | 21 +++++++++----------
 .../weex/ui/component/list/BasicListComponent.java |  2 +-
 .../java/com/taobao/weex/ui/view/WXEditText.java   |  2 ++
 .../java/com/taobao/weex/ui/view/WXImageView.java  |  2 ++
 .../view/refresh/circlebar/CircleProgressBar.java  |  2 ++
 .../weex/ui/view/refresh/core/WXSwipeLayout.java   |  7 +++++++
 .../com/taobao/weex/utils/WXResourceUtils.java     |  7 +++----
 .../com/taobao/weex/utils/WXSoInstallMgrSdk.java   | 20 +++++++-----------
 .../com/taobao/weex/utils/tools/LogDetail.java     |  3 ++-
 android/sdk/src/main/res/values/isrtl.xml          | 24 ++++++++++++++++++++++
 17 files changed, 78 insertions(+), 43 deletions(-)

diff --git a/android/sdk/build.gradle b/android/sdk/build.gradle
index b6dd8fa..e183968 100755
--- a/android/sdk/build.gradle
+++ b/android/sdk/build.gradle
@@ -220,6 +220,7 @@ dependencies {
     testImplementation 'org.hamcrest:hamcrest-core:1.3'
     testImplementation 'org.javassist:javassist:3.20.0-GA'
     testImplementation 'org.mockito:mockito-core:1.10.19'
+    //noinspection GradleDependency
     testImplementation 'org.objenesis:objenesis:2.1'
     testImplementation 'org.powermock:powermock-core:1.6.4'
     testImplementation 'org.powermock:powermock-api-mockito:1.6.4'
diff --git a/android/sdk/src/main/java/com/taobao/weex/WXEnvironment.java b/android/sdk/src/main/java/com/taobao/weex/WXEnvironment.java
index 519861d..fc51378 100644
--- a/android/sdk/src/main/java/com/taobao/weex/WXEnvironment.java
+++ b/android/sdk/src/main/java/com/taobao/weex/WXEnvironment.java
@@ -6,9 +6,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -48,6 +48,7 @@ import java.io.IOException;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.util.HashMap;
+import java.util.Locale;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
@@ -58,10 +59,10 @@ public class WXEnvironment {
   public static final String OS = "android";
   public static String SYS_VERSION = android.os.Build.VERSION.RELEASE;
   static{
-    if(SYS_VERSION != null && SYS_VERSION.toUpperCase().equals("P")){
+    if(SYS_VERSION != null && SYS_VERSION.toUpperCase(Locale.ROOT).equals("P")){
         SYS_VERSION = "9.0.0";
     }
-    if(SYS_VERSION != null && SYS_VERSION.toUpperCase().equals("Q")){
+    if(SYS_VERSION != null && SYS_VERSION.toUpperCase(Locale.ROOT).equals("Q")){
        SYS_VERSION = "10.0.0";
     }
   }
diff --git a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java
index d9d09cc..781a2b0 100755
--- a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java
+++ b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java
@@ -957,7 +957,7 @@ public class WXBridgeManager implements Callback, BactchExecutor {
   public void callReportCrash(String crashFile, final String instanceId, final String url)
{
     // statistic weex core process crash
     Date date = new Date();
-    DateFormat format = new SimpleDateFormat("yyyyMMddHHmmss");
+    DateFormat format = new SimpleDateFormat("yyyyMMddHHmmss", Locale.US);
     String time = format.format(date);
     final String origin_filename = crashFile + "." + time;
     File oldfile = new File(crashFile);
diff --git a/android/sdk/src/main/java/com/taobao/weex/bridge/WXJSObject.java b/android/sdk/src/main/java/com/taobao/weex/bridge/WXJSObject.java
index e505119..56ce501 100644
--- a/android/sdk/src/main/java/com/taobao/weex/bridge/WXJSObject.java
+++ b/android/sdk/src/main/java/com/taobao/weex/bridge/WXJSObject.java
@@ -54,12 +54,12 @@ public class WXJSObject {
         data = object;
         if (object instanceof Integer) {
             type = NUMBER;
-            data = new Double(((Integer) object).intValue());
+            data = (double) (Integer) object;
         } else if (object instanceof Double) {
             type = NUMBER;
         } else if (object instanceof Float) {
             type = NUMBER;
-            data = new Double(((Float) object).intValue());
+            data = (double) ((Float) object).intValue();
         } else if (object instanceof String) {
             type = String;
         } else if (object instanceof Object) {
diff --git a/android/sdk/src/main/java/com/taobao/weex/http/WXStreamModule.java b/android/sdk/src/main/java/com/taobao/weex/http/WXStreamModule.java
index 12a145b..db47501 100644
--- a/android/sdk/src/main/java/com/taobao/weex/http/WXStreamModule.java
+++ b/android/sdk/src/main/java/com/taobao/weex/http/WXStreamModule.java
@@ -41,6 +41,7 @@ import java.io.UnsupportedEncodingException;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
@@ -76,7 +77,7 @@ public class WXStreamModule extends WXModule {
     String body = paramsObj.getString("body");
     int timeout = paramsObj.getIntValue("timeout");
 
-    if (method != null) method = method.toUpperCase();
+    if (method != null) method = method.toUpperCase(Locale.ROOT);
     Options.Builder builder = new Options.Builder()
             .setMethod(!"GET".equals(method)
                     &&!"POST".equals(method)
@@ -157,7 +158,7 @@ public class WXStreamModule extends WXModule {
       }
     }
 
-    if (method != null) method = method.toUpperCase();
+    if (method != null) method = method.toUpperCase(Locale.ROOT);
     Options.Builder builder = new Options.Builder()
         .setMethod(!"GET".equals(method)
             &&!"POST".equals(method)
@@ -234,7 +235,7 @@ public class WXStreamModule extends WXModule {
     if(headers.containsKey(key)){
       return headers.get(key);
     }else{
-      return headers.get(key.toLowerCase());
+      return headers.get(key.toLowerCase(Locale.ROOT));
     }
   }
 
@@ -243,7 +244,7 @@ public class WXStreamModule extends WXModule {
   static String readAsString(byte[] data,String cType){
     String charset = "utf-8";
     if(cType != null){
-      Matcher matcher = CHARSET_PATTERN.matcher(cType.toLowerCase());
+      Matcher matcher = CHARSET_PATTERN.matcher(cType.toLowerCase(Locale.ROOT));
       if(matcher.find()){
         charset = matcher.group(1);
       }
diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
index 4394c4b..7d4fdcb 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
@@ -122,6 +122,7 @@ import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.ConcurrentLinkedQueue;
@@ -979,7 +980,7 @@ public abstract class WXComponent<T extends View> extends WXBasicComponent
imple
       mInstance.getWXPerformance().cellExceedNum++;
       if (WXAnalyzerDataTransfer.isOpenPerformance){
         WXAnalyzerDataTransfer.transferPerformance(getInstanceId(),"details",WXInstanceApm.KEY_PAGE_STATS_CELL_EXCEED_NUM,
-            String.format("cell:[w:%d,h:%d],attrs:%s,styles:%s",realWidth,realHeight,getAttrs(),getStyles())
+            String.format(Locale.ROOT, "cell:[w:%d,h:%d],attrs:%s,styles:%s",realWidth,realHeight,getAttrs(),getStyles())
         );
       }
 
diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXImage.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXImage.java
index 020a81d..f165e1c 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXImage.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXImage.java
@@ -27,6 +27,7 @@ import java.lang.reflect.InvocationTargetException;
 import java.util.Arrays;
 import java.util.HashMap;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 
 import android.Manifest;
@@ -484,7 +485,7 @@ public class WXImage extends WXComponent<ImageView> {
 
         if (WXAnalyzerDataTransfer.isOpenPerformance){
           WXAnalyzerDataTransfer.transferPerformance(getInstanceId(),"details",WXInstanceApm.KEY_PAGE_STATS_WRONG_IMG_SIZE_COUNT,
-              String.format("imgSize:[%d,%d],viewSize:[%d,%d],urL:%s",imgWidth,imgHeight,imageView.getMeasuredWidth(),imageView.getMeasuredHeight()
+              String.format(Locale.ROOT, "imgSize:[%d,%d],viewSize:[%d,%d],urL:%s",imgWidth,imgHeight,imageView.getMeasuredWidth(),imageView.getMeasuredHeight()
               ,currentImgUrlStr)
           );
         }
diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXScroller.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXScroller.java
index c7f1679..34ca774 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXScroller.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXScroller.java
@@ -18,13 +18,7 @@
  */
 package com.taobao.weex.ui.component;
 
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-
+import android.annotation.SuppressLint;
 import android.annotation.TargetApi;
 import android.content.Context;
 import android.graphics.Point;
@@ -33,12 +27,10 @@ import android.os.Build;
 import android.os.Handler;
 import android.os.Looper;
 import android.support.annotation.NonNull;
-import android.support.annotation.RequiresApi;
 import android.support.v4.view.ViewCompat;
 import android.text.TextUtils;
-import android.view.Gravity;
-import android.util.Log;
 import android.view.GestureDetector;
+import android.view.Gravity;
 import android.view.MotionEvent;
 import android.view.View;
 import android.view.ViewGroup;
@@ -68,6 +60,12 @@ import com.taobao.weex.ui.view.refresh.wrapper.BounceScrollerView;
 import com.taobao.weex.utils.WXLogUtils;
 import com.taobao.weex.utils.WXUtils;
 import com.taobao.weex.utils.WXViewUtils;
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
 
 /**
  * Component for scroller. It also support features like
@@ -389,6 +387,7 @@ public class WXScroller extends WXVContainer<ViewGroup> implements
WXScrollViewL
     }
   }
 
+  @SuppressLint("RtlHardcoded")
   @Override
   public void setMarginsSupportRTL(ViewGroup.MarginLayoutParams lp, int left, int top, int
right, int bottom) {
     if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.JELLY_BEAN_MR1)
{
@@ -419,7 +418,7 @@ public class WXScroller extends WXVContainer<ViewGroup> implements
WXScrollViewL
       return;
     }
     if (component.getHostView() != null) {
-      int layoutDirection = component.isLayoutRTL() ? View.LAYOUT_DIRECTION_RTL : View.LAYOUT_DIRECTION_LTR;
+      int layoutDirection = component.isLayoutRTL() ? ViewCompat.LAYOUT_DIRECTION_RTL : ViewCompat.LAYOUT_DIRECTION_LTR;
       ViewCompat.setLayoutDirection(component.getHostView(), layoutDirection);
     }
     super.setLayout(component);
diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/list/BasicListComponent.java
b/android/sdk/src/main/java/com/taobao/weex/ui/component/list/BasicListComponent.java
index 721ea7f..3eeeb57 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/list/BasicListComponent.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/list/BasicListComponent.java
@@ -201,7 +201,7 @@ public abstract class BasicListComponent<T extends ViewGroup &
ListComponentView
   @Override
   public void setLayout(WXComponent component) {
     if (component.getHostView() != null) {
-      int layoutDirection = component.isLayoutRTL() ? View.LAYOUT_DIRECTION_RTL : View.LAYOUT_DIRECTION_LTR;
+      int layoutDirection = component.isLayoutRTL() ? ViewCompat.LAYOUT_DIRECTION_RTL : ViewCompat.LAYOUT_DIRECTION_LTR;
       ViewCompat.setLayoutDirection(component.getHostView(), layoutDirection);
     }
     super.setLayout(component);
diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/view/WXEditText.java b/android/sdk/src/main/java/com/taobao/weex/ui/view/WXEditText.java
index d8d67c1..5fa5dde 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/view/WXEditText.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/view/WXEditText.java
@@ -18,6 +18,7 @@
  */
 package com.taobao.weex.ui.view;
 
+import android.annotation.SuppressLint;
 import android.content.Context;
 import android.os.Build;
 import android.view.ActionMode;
@@ -33,6 +34,7 @@ import com.taobao.weex.ui.view.gesture.WXGestureObservable;
 /**
  * Wrapper class for editText
  */
+@SuppressLint("AppCompatCustomView")
 public class WXEditText extends EditText implements WXGestureObservable {
 
   private WXGesture wxGesture;
diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/view/WXImageView.java b/android/sdk/src/main/java/com/taobao/weex/ui/view/WXImageView.java
index 1de30d9..efe9468 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/view/WXImageView.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/view/WXImageView.java
@@ -18,6 +18,7 @@
  */
 package com.taobao.weex.ui.view;
 
+import android.annotation.SuppressLint;
 import android.content.Context;
 import android.graphics.Bitmap;
 import android.graphics.drawable.BitmapDrawable;
@@ -39,6 +40,7 @@ import com.taobao.weex.utils.WXLogUtils;
 import java.lang.ref.WeakReference;
 import java.util.Arrays;
 
+@SuppressLint("AppCompatCustomView")
 public class WXImageView extends ImageView implements WXGestureObservable,
         IRenderStatus<WXImage>,
         IRenderResult<WXImage>, WXImage.Measurable {
diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/view/refresh/circlebar/CircleProgressBar.java
b/android/sdk/src/main/java/com/taobao/weex/ui/view/refresh/circlebar/CircleProgressBar.java
index 5bd0146..8d81d5e 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/view/refresh/circlebar/CircleProgressBar.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/view/refresh/circlebar/CircleProgressBar.java
@@ -18,6 +18,7 @@
  */
 package com.taobao.weex.ui.view.refresh.circlebar;
 
+import android.annotation.SuppressLint;
 import android.content.Context;
 import android.content.res.Resources;
 import android.graphics.Canvas;
@@ -35,6 +36,7 @@ import android.widget.ImageView;
 /**
  * Modify of android.support.v4
  */
+@SuppressLint("AppCompatCustomView")
 public class CircleProgressBar extends ImageView {
 
   private static final int KEY_SHADOW_COLOR = 0x1E000000;
diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/view/refresh/core/WXSwipeLayout.java
b/android/sdk/src/main/java/com/taobao/weex/ui/view/refresh/core/WXSwipeLayout.java
index 9f66c03..91f2711 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/view/refresh/core/WXSwipeLayout.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/view/refresh/core/WXSwipeLayout.java
@@ -20,6 +20,7 @@ package com.taobao.weex.ui.view.refresh.core;
 
 import android.animation.Animator;
 import android.animation.ValueAnimator;
+import android.annotation.SuppressLint;
 import android.annotation.TargetApi;
 import android.content.Context;
 import android.graphics.Color;
@@ -692,11 +693,14 @@ public class WXSwipeLayout extends FrameLayout implements NestedScrollingParent,
    * Whether child view can scroll up
    * @return
    */
+  @SuppressLint("ObsoleteSdkInt")
   public boolean canChildScrollUp() {
     if (mTargetView == null) {
       return false;
     }
     if (Build.VERSION.SDK_INT < 14) {
+      //The minimum version of Android platform that Weex supports is API 14,
+      //so this block should never enter.
       if (mTargetView instanceof AbsListView) {
         final AbsListView absListView = (AbsListView) mTargetView;
         return absListView.getChildCount() > 0
@@ -714,11 +718,14 @@ public class WXSwipeLayout extends FrameLayout implements NestedScrollingParent,
    * Whether child view can scroll down
    * @return
    */
+  @SuppressLint("ObsoleteSdkInt")
   public boolean canChildScrollDown() {
     if (mTargetView == null) {
       return false;
     }
     if (Build.VERSION.SDK_INT < 14) {
+      //The minimum version of Android platform that Weex supports is API 14,
+      //so this block should never enter.
       if (mTargetView instanceof AbsListView) {
         final AbsListView absListView = (AbsListView) mTargetView;
         if (absListView.getChildCount() > 0) {
diff --git a/android/sdk/src/main/java/com/taobao/weex/utils/WXResourceUtils.java b/android/sdk/src/main/java/com/taobao/weex/utils/WXResourceUtils.java
index b0246fa..c368689 100644
--- a/android/sdk/src/main/java/com/taobao/weex/utils/WXResourceUtils.java
+++ b/android/sdk/src/main/java/com/taobao/weex/utils/WXResourceUtils.java
@@ -22,13 +22,12 @@ import android.graphics.Color;
 import android.graphics.LinearGradient;
 import android.graphics.Shader;
 import android.support.annotation.NonNull;
-import android.support.v4.util.LruCache;
-import android.util.Pair;
 import android.text.TextUtils;
-
+import android.util.Pair;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 import java.util.StringTokenizer;
 
@@ -334,7 +333,7 @@ public class WXResourceUtils {
     float[] points = {0, 0, 0, 0};
 
     if (!TextUtils.isEmpty(direction)) {
-      direction = direction.replaceAll("\\s*", "").toLowerCase();
+      direction = direction.replaceAll("\\s*", "").toLowerCase(Locale.ROOT);
     }
 
     switch (direction) {
diff --git a/android/sdk/src/main/java/com/taobao/weex/utils/WXSoInstallMgrSdk.java b/android/sdk/src/main/java/com/taobao/weex/utils/WXSoInstallMgrSdk.java
index 9205b8d..463d1a6 100644
--- a/android/sdk/src/main/java/com/taobao/weex/utils/WXSoInstallMgrSdk.java
+++ b/android/sdk/src/main/java/com/taobao/weex/utils/WXSoInstallMgrSdk.java
@@ -18,34 +18,27 @@
  */
 package com.taobao.weex.utils;
 
+import android.annotation.SuppressLint;
+import android.app.Application;
 import android.content.Context;
-import android.content.SharedPreferences;
 import android.content.pm.ApplicationInfo;
-import android.content.pm.PackageInfo;
 import android.os.Build;
-import android.preference.PreferenceManager;
 import android.text.TextUtils;
-import android.util.Log;
-
 import com.taobao.weex.IWXStatisticsListener;
 import com.taobao.weex.WXEnvironment;
 import com.taobao.weex.adapter.IWXSoLoaderAdapter;
 import com.taobao.weex.adapter.IWXUserTrackAdapter;
 import com.taobao.weex.common.WXErrorCode;
 import dalvik.system.PathClassLoader;
-import java.io.BufferedReader;
-import java.io.Closeable;
 import java.io.File;
-import java.io.FileNotFoundException;
 import java.io.FileOutputStream;
-import java.io.FileReader;
-import java.io.FileWriter;
 import java.io.IOException;
 import java.io.InputStream;
 import java.lang.reflect.Field;
 import java.nio.ByteBuffer;
 import java.nio.channels.FileChannel;
 import java.util.Enumeration;
+import java.util.Locale;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipException;
 import java.util.zip.ZipFile;
@@ -76,13 +69,13 @@ public class WXSoInstallMgrSdk {
   private final static String STARTUPSO = "/libweexjsb.so";
   private final static String STARTUPSOANDROID15 = "/libweexjst.so";
 
-  static Context mContext = null;
+  static Application mContext = null;
   private static IWXSoLoaderAdapter mSoLoader = null;
   private static IWXStatisticsListener mStatisticsListener = null;
 
   private static String mAbi = null;
 
-  public static void init(Context c,
+  public static void init(Application c,
                           IWXSoLoaderAdapter loader,
                           IWXStatisticsListener listener) {
     mContext = c;
@@ -358,7 +351,7 @@ public class WXSoInstallMgrSdk {
       if (TextUtils.isEmpty(mAbi)){
         mAbi = ARMEABI;
       }
-      mAbi = mAbi.toLowerCase();
+      mAbi = mAbi.toLowerCase(Locale.ROOT);
     }
     return mAbi;
   }
@@ -455,6 +448,7 @@ public class WXSoInstallMgrSdk {
   /**
    * Load .so library
    */
+  @SuppressLint("UnsafeDynamicallyLoadedCode")
   static boolean _loadUnzipSo(String libName,
                               int version,
                               IWXUserTrackAdapter utAdapter) {
diff --git a/android/sdk/src/main/java/com/taobao/weex/utils/tools/LogDetail.java b/android/sdk/src/main/java/com/taobao/weex/utils/tools/LogDetail.java
index d7b3211..c257296 100644
--- a/android/sdk/src/main/java/com/taobao/weex/utils/tools/LogDetail.java
+++ b/android/sdk/src/main/java/com/taobao/weex/utils/tools/LogDetail.java
@@ -23,6 +23,7 @@ import android.util.Log;
 
 import com.alibaba.fastjson.annotation.JSONField;
 import com.taobao.weex.WXEnvironment;
+import java.util.Locale;
 
 public class LogDetail {
     public static final String KeyWrod_Init = "Weex_Init";
@@ -60,7 +61,7 @@ public class LogDetail {
         time.constructor();
         info.taskName = name;
         if(!TextUtils.isEmpty(name)) {
-            String s = name.toLowerCase();
+            String s = name.toLowerCase(Locale.ROOT);
             if(s.contains("module")
             || s.contains("component")
                     || s.contains("framework")) {
diff --git a/android/sdk/src/main/res/values/isrtl.xml b/android/sdk/src/main/res/values/isrtl.xml
new file mode 100644
index 0000000..5008fea
--- /dev/null
+++ b/android/sdk/src/main/res/values/isrtl.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+<resources>
+    <bool name="weex_is_right_to_left">false</bool>
+</resources>
\ No newline at end of file


Mime
View raw message