소스 검색

Merge branch 'draft' of https://gitlab.com/Arisono/SkWeiChat-Baidu into draft

FANGLH 8 년 전
부모
커밋
f937497640

+ 1 - 1
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/oa/SelectCollisionActivity.java

@@ -14,7 +14,7 @@ import com.common.LogUtil;
 import com.common.data.ListUtils;
 import com.common.data.StringUtil;
 import com.core.base.OABaseActivity;
-import com.core.constant.OAConfig;
+import com.core.model.OAConfig;
 import com.core.utils.sortlist.BaseSortModel;
 import com.core.utils.sortlist.SideBar;
 import com.core.widget.EmptyLayout;

+ 27 - 14
app_core/common/src/main/java/com/core/app/MyApplication.java

@@ -15,7 +15,6 @@ import android.util.Log;
 import com.android.volley.RequestQueue;
 import com.android.volley.toolbox.Volley;
 import com.baidu.mapapi.SDKInitializer;
-import com.core.app.R;
 import com.common.config.BaseApplication;
 import com.common.preferences.PreferenceUtils;
 import com.common.preferences.SharedUtil;
@@ -28,6 +27,7 @@ import com.core.net.NetWorkObservable;
 import com.core.net.location.BdLocationHelper;
 import com.core.net.ssl.AuthImageDownloader;
 import com.core.net.volley.FastVolley;
+import com.core.utils.CommonUtil;
 import com.facebook.stetho.Stetho;
 import com.iflytek.cloud.SpeechConstant;
 import com.iflytek.cloud.SpeechUtility;
@@ -112,8 +112,6 @@ public class MyApplication extends BaseApplication {
     }
 
 
-
-
     @Override
     public void initConfig() throws Exception {
         Stetho.initializeWithDefaults(this);
@@ -127,7 +125,7 @@ public class MyApplication extends BaseApplication {
         //启用APP Restart,默认为true
         CustomActivityOnCrash.setEnableAppRestart(true);
         //设置重新启动的activity
-      //  CustomActivityOnCrash.setRestartActivityClass(SplashActivity.class);
+        //  CustomActivityOnCrash.setRestartActivityClass(SplashActivity.class);
 
         INSTANCE = this;
         ZXingLibrary.initDisplayOpinion(this);
@@ -176,21 +174,33 @@ public class MyApplication extends BaseApplication {
         }*/
         registerActivityLifecycleCallbacks(new ActivityLifecycleCallbacks() {
             @Override
-            public void onActivityCreated(Activity activity, Bundle savedInstanceState) {}
+            public void onActivityCreated(Activity activity, Bundle savedInstanceState) {
+            }
+
             @Override
-            public void onActivityStarted(Activity activity) {}
+            public void onActivityStarted(Activity activity) {
+            }
+
             @Override
             public void onActivityResumed(Activity activity) {
                 MyActivityManager.getInstance().setCurrentActivity(activity);
             }
+
             @Override
-            public void onActivityPaused(Activity activity) {}
+            public void onActivityPaused(Activity activity) {
+            }
+
             @Override
-            public void onActivityStopped(Activity activity) {}
+            public void onActivityStopped(Activity activity) {
+            }
+
             @Override
-            public void onActivitySaveInstanceState(Activity activity, Bundle outState) {}
+            public void onActivitySaveInstanceState(Activity activity, Bundle outState) {
+            }
+
             @Override
-            public void onActivityDestroyed(Activity activity) {}
+            public void onActivityDestroyed(Activity activity) {
+            }
         });
     }
 
@@ -243,8 +253,11 @@ public class MyApplication extends BaseApplication {
         MobclickAgent.UMAnalyticsConfig config = new MobclickAgent.UMAnalyticsConfig(this, "57ea27bb67e58e088c003bbf",
                 "baidu", MobclickAgent.EScenarioType.E_UM_NORMAL);
         MobclickAgent.startWithConfigure(config);
+        if (!CommonUtil.isReleaseVersion()) {//当前为开发版本时候不需要上传友盟
+            MobclickAgent.setCatchUncaughtExceptions(false);
+        }
     }
-    
+
     /**
      * 为HttpUtils配置参数
      */
@@ -384,7 +397,7 @@ public class MyApplication extends BaseApplication {
         }
     }
 
-    
+
     @Override
     protected void attachBaseContext(Context base) {
         super.attachBaseContext(base);
@@ -393,9 +406,9 @@ public class MyApplication extends BaseApplication {
 
 
     public String getLoginUserId() {
-        return (mLoginUser!=null&&!TextUtils.isEmpty(mLoginUser.getUserId()))?mLoginUser.getUserId():"";
+        return (mLoginUser != null && !TextUtils.isEmpty(mLoginUser.getUserId())) ? mLoginUser.getUserId() : "";
     }
-    
+
     public static MyApplication getInstance() {
         return INSTANCE;
     }

+ 0 - 45
app_core/common/src/main/java/com/core/constant/OAConfig.java

@@ -1,45 +0,0 @@
-package com.core.constant;
-
-import com.core.api.wxapi.ApiPlatform;
-import com.core.api.wxapi.ApiUtils;
-import com.core.utils.CommonUtil;
-
-/**
- * 自动打卡变量集合
- * 1.上班地址(数组)
- * 2.迟到早退时间。。。最早打卡时间
- * 3.是否自动打卡自动外勤
- * 4.打卡范围 办公范围
- * 5.
- * Created by Bitliker on 2017/2/9.
- */
-
-public class OAConfig {
-    public static final String ARRAY_DATA = "ARRAY_DATA";//oa模块中通用调转页面专递的ParcelableArrayListExtra
-    public static final String MODEL_DATA = "MODEL_DATA";//oa模块中通用调转页面专递的ParcelableExtra
-    public static final String STRING_DATA = "STRING_DATA";//oa模块中通用调转页面专递的String
-
-
-    //关于自动内勤的相关变量
-    public static boolean loadWorkSeted = false;//是否下拉过高级考勤数据
-    public static boolean autosign = true;       //是否自动考勤
-    public static int earlyoff = 0;     //早退时间
-    public static int overlatetime = 0; //严重迟到时间
-    public static int latetime = 0;    //迟到时间(在该时间内不算迟到)
-    public static int nonclass = 90;   //矿工时间
-
-    /*是否显示Crm2.0功能*/
-    public static boolean canShowCrm2_0 = true;
-
-    public static boolean canShowCrm2_0() {
-        if (ApiUtils.getApiModel() instanceof ApiPlatform)
-            return false;
-        if (CommonUtil.isReleaseVersion()) return false;
-        return canShowCrm2_0;
-    }
-
-    /*调转到拜访报告界面*/
-//    public static Intent getVisitClass(Context ct) {
-//        return new Intent(ct, canShowCrm2_0() ? AddVisitReportActivity.class : VisitReportAddActivity.class);
-//    }
-}

+ 1 - 0
app_modular/appmessages/.gitignore

@@ -0,0 +1 @@
+/build

+ 27 - 0
app_modular/appmessages/build.gradle

@@ -0,0 +1,27 @@
+apply plugin: 'com.android.library'
+
+
+android {
+    compileSdkVersion rootProject.ext.android.compileSdkVersion
+    buildToolsVersion rootProject.ext.android.buildToolsVersion
+    defaultConfig {
+        minSdkVersion rootProject.ext.android.minSdkVersion
+        targetSdkVersion rootProject.ext.android.targetSdkVersion
+        versionCode rootProject.ext.android.versionCode
+        versionName rootProject.ext.android.versionName
+    }
+    buildTypes {
+        release {
+            minifyEnabled false
+            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+        }
+    }
+}
+
+dependencies {
+    compile fileTree(include: ['*.jar'], dir: 'libs')
+    testCompile deps.junit
+    compile deps.appcompatV7
+    compile project(':common')
+    compile project(':network')
+}

+ 25 - 0
app_modular/appmessages/proguard-rules.pro

@@ -0,0 +1,25 @@
+# Add project specific ProGuard rules here.
+# By default, the flags in this file are appended to flags specified
+# in C:\Users\Bitliker\AppData\Local\Android\Sdk/tools/proguard/proguard-android.txt
+# You can edit the include path and order by changing the proguardFiles
+# directive in build.gradle.
+#
+# For more details, see
+#   http://developer.android.com/guide/developing/tools/proguard.html
+
+# Add any project specific keep options here:
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+#   public *;
+#}
+
+# Uncomment this to preserve the line number information for
+# debugging stack traces.
+#-keepattributes SourceFile,LineNumberTable
+
+# If you keep the line number information, uncomment this to
+# hide the original source file name.
+#-renamesourcefileattribute SourceFile

+ 9 - 0
app_modular/appmessages/src/main/AndroidManifest.xml

@@ -0,0 +1,9 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+
+          package="com.modular.appmessages">
+
+    <application android:allowBackup="true" android:label="@string/app_name" android:supportsRtl="true">
+
+    </application>
+
+</manifest>

+ 1 - 0
app_modular/appmessages/src/main/java/com/modular/appmessages/REMAIN.md

@@ -0,0 +1 @@
+

+ 3 - 0
app_modular/appmessages/src/main/res/values/strings.xml

@@ -0,0 +1,3 @@
+<resources>
+    <string name="app_name">AppMessages</string>
+</resources>

+ 1 - 1
app_modular/appworks/src/main/java/com/uas/appworks/OA/erp/activity/SignSeniorSettingActivity.java

@@ -22,7 +22,7 @@ import com.core.api.wxapi.ApiPlatform;
 import com.core.api.wxapi.ApiUtils;
 import com.core.app.MyApplication;
 import com.core.base.BaseActivity;
-import com.core.constant.OAConfig;
+import com.core.model.OAConfig;
 import com.core.model.SelectBean;
 import com.core.net.http.ViewUtil;
 import com.core.utils.CommonUtil;

+ 1 - 1
app_modular/appworks/src/main/java/com/uas/appworks/OA/erp/presenter/AddFlihtsPresenter.java

@@ -14,7 +14,7 @@ import com.core.api.wxapi.ApiConfig;
 import com.core.api.wxapi.ApiPlatform;
 import com.core.api.wxapi.ApiUtils;
 import com.core.app.MyApplication;
-import com.core.constant.OAConfig;
+import com.core.model.OAConfig;
 import com.core.net.http.http.OAHttpHelper;
 import com.core.net.http.http.OnHttpResultListener;
 import com.core.net.http.http.Request;

+ 32 - 32
app_third/pullToRefershLibraryMy/src/main/java/com/handmark/pulltorefresh/library/PullToRefreshBase.java

@@ -106,7 +106,7 @@ public abstract class PullToRefreshBase<T extends View> extends LinearLayout imp
 	// ===========================================================
 
 	private Handler mHandler=new Handler();
-	
+
 	public PullToRefreshBase(Context context) {
 		super(context);
 		init(context, null);
@@ -309,7 +309,7 @@ public abstract class PullToRefreshBase<T extends View> extends LinearLayout imp
 			setState(State.RESET);
 		}
 	}
-	
+
 	public final void onRefreshComplete(int delay) {
 		mHandler.postDelayed(new Runnable() {
 			@Override
@@ -320,14 +320,14 @@ public abstract class PullToRefreshBase<T extends View> extends LinearLayout imp
 			}
 		}, delay);
 	}
-	
+
 	public final void onPullUpRefreshComplete() {
 		if (isRefreshing()) {
 			mCurrentMode=Mode.PULL_FROM_END;
 			setState(State.RESET);
 		}
 	}
-	
+
 	public final void onPullDownRefreshComplete() {
 		if (isRefreshing()) {
 			mCurrentMode=Mode.PULL_FROM_START;
@@ -504,7 +504,7 @@ public abstract class PullToRefreshBase<T extends View> extends LinearLayout imp
 		mOverScrollEnabled = enabled;
 	}
 
-	
+
 	@Override
 	public final void setPullDownRefreshing() {
 		if(isRefreshing()){
@@ -513,7 +513,7 @@ public abstract class PullToRefreshBase<T extends View> extends LinearLayout imp
 		mCurrentMode=Mode.PULL_FROM_START;
 		setRefreshing(true);
 	}
-	
+
 	public final void setPullDownRefreshing(int delay) {
 		mHandler.postDelayed(new Runnable() {
 			@Override
@@ -522,8 +522,8 @@ public abstract class PullToRefreshBase<T extends View> extends LinearLayout imp
 			}
 		}, delay);
 	}
-	
-	
+
+
 	@Override
 	public final void setPullUpRefreshing() {
 		if(isRefreshing()){
@@ -532,7 +532,7 @@ public abstract class PullToRefreshBase<T extends View> extends LinearLayout imp
 		mCurrentMode=Mode.PULL_FROM_END;
 		setRefreshing(true);
 	}
-	
+
 	public final void setPullUpRefreshing(int delay) {
 		mHandler.postDelayed(new Runnable() {
 			@Override
@@ -541,8 +541,8 @@ public abstract class PullToRefreshBase<T extends View> extends LinearLayout imp
 			}
 		}, delay);
 	}
-	
-	
+
+
 
 	@Override
 	public final void setRefreshing(boolean doScroll) {
@@ -678,7 +678,7 @@ public abstract class PullToRefreshBase<T extends View> extends LinearLayout imp
 	 * <p/>
 	 * Be sure to set the ID of the view in this method, especially if you're
 	 * using a ListActivity or ListFragment.
-	 * 
+	 *
 	 * @param context Context to create view with
 	 * @param attrs AttributeSet from wrapped class. Means that anything you
 	 *            include in the XML layout declaration will be routed to the
@@ -722,7 +722,7 @@ public abstract class PullToRefreshBase<T extends View> extends LinearLayout imp
 	/**
 	 * Allows Derivative classes to handle the XML Attrs without creating a
 	 * TypedArray themsevles
-	 * 
+	 *
 	 * @param a - TypedArray of PullToRefresh Attributes
 	 */
 	protected void handleStyledAttributes(TypedArray a) {
@@ -731,7 +731,7 @@ public abstract class PullToRefreshBase<T extends View> extends LinearLayout imp
 	/**
 	 * Implemented by derived class to return whether the View is in a state
 	 * where the user can Pull to Refresh by scrolling from the end.
-	 * 
+	 *
 	 * @return true if the View is currently in the correct state (for example,
 	 *         bottom of a ListView)
 	 */
@@ -740,7 +740,7 @@ public abstract class PullToRefreshBase<T extends View> extends LinearLayout imp
 	/**
 	 * Implemented by derived class to return whether the View is in a state
 	 * where the user can Pull to Refresh by scrolling from the start.
-	 * 
+	 *
 	 * @return true if the View is currently the correct state (for example, top
 	 *         of a ListView)
 	 */
@@ -749,7 +749,7 @@ public abstract class PullToRefreshBase<T extends View> extends LinearLayout imp
 	/**
 	 * Called by {@link #onRestoreInstanceState(Parcelable)} so that derivative
 	 * classes can handle their saved instance state.
-	 * 
+	 *
 	 * @param savedInstanceState - Bundle which contains saved instance state.
 	 */
 	protected void onPtrRestoreInstanceState(Bundle savedInstanceState) {
@@ -758,7 +758,7 @@ public abstract class PullToRefreshBase<T extends View> extends LinearLayout imp
 	/**
 	 * Called by {@link #onSaveInstanceState()} so that derivative classes can
 	 * save their instance state.
-	 * 
+	 *
 	 * @param saveState - Bundle to be updated with saved state.
 	 */
 	protected void onPtrSaveInstanceState(Bundle saveState) {
@@ -785,7 +785,7 @@ public abstract class PullToRefreshBase<T extends View> extends LinearLayout imp
 	/**
 	 * Called when the UI has been to be updated to be in the
 	 * {@link State#REFRESHING} or {@link State#MANUAL_REFRESHING} state.
-	 * 
+	 *
 	 * @param doScroll - Whether the UI should scroll for this event.
 	 */
 	protected void onRefreshing(final boolean doScroll) {
@@ -1006,7 +1006,7 @@ public abstract class PullToRefreshBase<T extends View> extends LinearLayout imp
 	/**
 	 * Helper method which just calls scrollTo() in the correct scrolling
 	 * direction.
-	 * 
+	 *
 	 * @param value - New Scroll value
 	 */
 	@TargetApi(VERSION_CODES.HONEYCOMB)
@@ -1053,7 +1053,7 @@ public abstract class PullToRefreshBase<T extends View> extends LinearLayout imp
 	/**
 	 * Smooth Scroll to position using the default duration of
 	 * {@value #SMOOTH_SCROLL_DURATION_MS} ms.
-	 * 
+	 *
 	 * @param scrollValue - Position to scroll to
 	 */
 	protected final void smoothScrollTo(int scrollValue) {
@@ -1063,7 +1063,7 @@ public abstract class PullToRefreshBase<T extends View> extends LinearLayout imp
 	/**
 	 * Smooth Scroll to position using the default duration of
 	 * {@value #SMOOTH_SCROLL_DURATION_MS} ms.
-	 * 
+	 *
 	 * @param scrollValue - Position to scroll to
 	 * @param listener - Listener for scroll
 	 */
@@ -1074,7 +1074,7 @@ public abstract class PullToRefreshBase<T extends View> extends LinearLayout imp
 	/**
 	 * Smooth Scroll to position using the longer default duration of
 	 * {@value #SMOOTH_SCROLL_LONG_DURATION_MS} ms.
-	 * 
+	 *
 	 * @param scrollValue - Position to scroll to
 	 */
 	protected final void smoothScrollToLonger(int scrollValue) {
@@ -1222,7 +1222,7 @@ public abstract class PullToRefreshBase<T extends View> extends LinearLayout imp
 
 	/**
 	 * Actions a Pull Event
-	 * 
+	 *
 	 * @return true if the Event has been handled, false if there has been no
 	 *         change
 	 */
@@ -1302,7 +1302,7 @@ public abstract class PullToRefreshBase<T extends View> extends LinearLayout imp
 
 	/**
 	 * Smooth Scroll to position using the specific duration
-	 * 
+	 *
 	 * @param scrollValue - Position to scroll to
 	 * @param duration - Duration of animation in milliseconds
 	 */
@@ -1373,7 +1373,7 @@ public abstract class PullToRefreshBase<T extends View> extends LinearLayout imp
 		 * Maps an int to a specific mode. This is needed when saving state, or
 		 * inflating the view from XML where the mode is given through a attr
 		 * int.
-		 * 
+		 *
 		 * @param modeInt - int to map a Mode to
 		 * @return Mode that modeInt maps to, or ROTATE by default.
 		 */
@@ -1449,7 +1449,7 @@ public abstract class PullToRefreshBase<T extends View> extends LinearLayout imp
 		 * Maps an int to a specific mode. This is needed when saving state, or
 		 * inflating the view from XML where the mode is given through a attr
 		 * int.
-		 * 
+		 *
 		 * @param modeInt - int to map a Mode to
 		 * @return Mode that modeInt maps to, or PULL_FROM_START by default.
 		 */
@@ -1510,7 +1510,7 @@ public abstract class PullToRefreshBase<T extends View> extends LinearLayout imp
 	 * Simple Listener that allows you to be notified when the user has scrolled
 	 * to the end of the AdapterView. See (
 	 * {@link PullToRefreshAdapterViewBase#setOnLastItemVisibleListener}.
-	 * 
+	 *
 	 * @author Chris Banes
 	 */
 	public static interface OnLastItemVisibleListener {
@@ -1527,7 +1527,7 @@ public abstract class PullToRefreshBase<T extends View> extends LinearLayout imp
 	 * finished a touch event. Useful when you want to append extra UI events
 	 * (such as sounds). See (
 	 * {@link PullToRefreshAdapterViewBase#setOnPullEventListener}.
-	 * 
+	 *
 	 * @author Chris Banes
 	 */
 	public static interface OnPullEventListener<V extends View> {
@@ -1535,7 +1535,7 @@ public abstract class PullToRefreshBase<T extends View> extends LinearLayout imp
 		/**
 		 * Called when the internal state has been changed, usually by the user
 		 * pulling.
-		 * 
+		 *
 		 * @param refreshView - View which has had it's state change.
 		 * @param state - The new state of View.
 		 * @param direction - One of {@link Mode#PULL_FROM_START} or
@@ -1550,7 +1550,7 @@ public abstract class PullToRefreshBase<T extends View> extends LinearLayout imp
 
 	/**
 	 * Simple Listener to listen for any callbacks to Refresh.
-	 * 
+	 *
 	 * @author Chris Banes
 	 */
 	public static interface OnRefreshListener<V extends View> {
@@ -1567,7 +1567,7 @@ public abstract class PullToRefreshBase<T extends View> extends LinearLayout imp
 	 * An advanced version of the Listener to listen for callbacks to Refresh.
 	 * This listener is different as it allows you to differentiate between Pull
 	 * Ups, and Pull Downs.
-	 * 
+	 *
 	 * @author Chris Banes
 	 */
 	public static interface OnRefreshListener2<V extends View> {
@@ -1629,7 +1629,7 @@ public abstract class PullToRefreshBase<T extends View> extends LinearLayout imp
 
 		/**
 		 * Maps an int to a specific state. This is needed when saving state.
-		 * 
+		 *
 		 * @param stateInt - int to map a State to
 		 * @return State that stateInt maps to
 		 */

+ 2 - 1
settings.gradle

@@ -1,5 +1,5 @@
 //主工程
-include ':WeiChat'
+include ':WeiChat', ':appmessages'
 
 //核心模块
 include ':network'
@@ -36,6 +36,7 @@ project(':applogin').projectDir = new File('app_modular/applogin')
 project(':appme').projectDir = new File('app_modular/appme')
 project(':appworks').projectDir = new File('app_modular/appworks')
 project(':appcontact').projectDir = new File('app_modular/appcontact')
+project(':appmessages').projectDir = new File('app_modular/appmessages')
 
 //第三库模块
 project(':lib-zxing').projectDir = new File('app_third/lib-zxing')