You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by so...@apache.org on 2017/06/15 07:17:40 UTC

[6/8] incubator-weex git commit: add variable name prefix ‘m’

add  variable name prefix ‘m’


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/7ffe22c5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/7ffe22c5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/7ffe22c5

Branch: refs/heads/0.14-dev
Commit: 7ffe22c5696be8a24347c339d5a2af11efc4c613
Parents: 37f05fe
Author: hao.haoh <ha...@taobao.com>
Authored: Thu Jun 15 14:50:06 2017 +0800
Committer: hao.haoh <ha...@taobao.com>
Committed: Thu Jun 15 14:50:06 2017 +0800

----------------------------------------------------------------------
 .../sdk/src/main/java/com/taobao/weex/WXSDKInstance.java | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/7ffe22c5/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
index d849c31..b101b30 100644
--- a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
+++ b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
@@ -142,6 +142,7 @@ public class WXSDKInstance implements IWXActivityStateListener,DomContext, View.
 
   private LayoutFinishListener mLayoutFinishListener;
 
+  private AtomicBoolean mCurrentGround = new AtomicBoolean(false);
 
   /**
    * If anchor is created manually(etc. define a layout xml resource ),
@@ -738,7 +739,7 @@ public class WXSDKInstance implements IWXActivityStateListener,DomContext, View.
     }
     return true;
   }
-  private AtomicBoolean currentGround = new AtomicBoolean(false);
+
 
   @Override
   public void onActivityPause() {
@@ -763,13 +764,13 @@ public class WXSDKInstance implements IWXActivityStateListener,DomContext, View.
     }
 
     WXLogUtils.i("Application onActivityPause()");
-    if (!currentGround.get()) {
+    if (!mCurrentGround.get()) {
       WXLogUtils.i("Application to be in the backround");
       Intent intent = new Intent(WXGlobalEventReceiver.EVENT_ACTION);
       intent.putExtra(WXGlobalEventReceiver.EVENT_NAME, Constants.Event.PAUSE_EVENT);
       intent.putExtra(WXGlobalEventReceiver.EVENT_WX_INSTANCEID, getInstanceId());
       mContext.sendBroadcast(intent);
-      this.currentGround.set(true);
+      this.mCurrentGround.set(true);
     }
   }
 
@@ -786,13 +787,13 @@ public class WXSDKInstance implements IWXActivityStateListener,DomContext, View.
       WXLogUtils.w("Warning :Component tree has not build completely, onActivityResume can not be call!");
     }
 
-    if (currentGround.get()) {
+    if (mCurrentGround.get()) {
       WXLogUtils.i("Application  to be in the foreground");
       Intent intent = new Intent(WXGlobalEventReceiver.EVENT_ACTION);
       intent.putExtra(WXGlobalEventReceiver.EVENT_NAME, Constants.Event.RESUME_EVENT);
       intent.putExtra(WXGlobalEventReceiver.EVENT_WX_INSTANCEID, getInstanceId());
-      currentGround.set(false);
       mContext.sendBroadcast(intent);
+      mCurrentGround.set(false);
     }
 
     onViewAppear();