Browse Source

Merge branch 'master' of ssh://10.10.100.21/source/uu-android

# Conflicts:
#	WeiChat/version.properties
#	app_core/common/src/main/java/com/core/utils/CommonUtil.java
#	app_modular/apputils/src/main/java/com/modular/apputils/activity/BillInputActivity.java
#	app_modular/apputils/src/main/java/com/modular/apputils/adapter/BillAdapter.java
#	app_modular/apputils/src/main/java/com/modular/apputils/presenter/BillPresenter.java
#	app_modular/appworks/src/main/java/com/uas/appworks/activity/DeviceQueryActivity.java
RaoMeng 5 years ago
parent
commit
f1fc4dc0ba

+ 3 - 22
WeiChat/src/main/java/com/xzjmyk/pm/activity/CustomCrashActivity.java

@@ -8,10 +8,6 @@ import android.widget.Button;
 import android.widget.ImageView;
 import android.widget.ImageView;
 
 
 import com.afollestad.materialdialogs.MaterialDialog;
 import com.afollestad.materialdialogs.MaterialDialog;
-import com.me.network.app.http.HttpClient;
-import com.me.network.app.http.Method;
-import com.me.network.app.http.rx.ResultListener;
-import com.me.network.app.http.rx.ResultSubscriber;
 
 
 import cat.ereza.customactivityoncrash.CustomActivityOnCrash;
 import cat.ereza.customactivityoncrash.CustomActivityOnCrash;
 
 
@@ -34,25 +30,10 @@ public class CustomCrashActivity extends Activity {
         mErrorIv = (ImageView) findViewById(R.id.error_image);
         mErrorIv = (ImageView) findViewById(R.id.error_image);
         intent = getIntent();
         intent = getIntent();
         stackTraceString = CustomActivityOnCrash.getAllErrorDetailsFromIntent(this, intent);
         stackTraceString = CustomActivityOnCrash.getAllErrorDetailsFromIntent(this, intent);
-
-        new MaterialDialog.Builder(this).content(stackTraceString)
+//        if (stackTraceString != null && !CommonUtil.isReleaseVersion()) {
+            new MaterialDialog.Builder(this).content(stackTraceString)
                     .build().show();
                     .build().show();
-
-        HttpClient httpClient = new HttpClient.Builder("http://10.1.80.56:8085/")
-                .isDebug(true)
-                .build(true);
-        httpClient.Api().send(new HttpClient.Builder()
-                .url("mail/errorInfo")
-                .add("message", stackTraceString)
-                .method(Method.GET)
-                .build(), new ResultSubscriber<>(new ResultListener<Object>() {
-            @Override
-            public void onResponse(Object o) {
-               
-               
-            }
-        }));
-        
+//        }
         final Class<? extends Activity> activityClassFromIntent = CustomActivityOnCrash.getRestartActivityClassFromIntent(intent);
         final Class<? extends Activity> activityClassFromIntent = CustomActivityOnCrash.getRestartActivityClassFromIntent(intent);
         final CustomActivityOnCrash.EventListener listenerFromIntent = CustomActivityOnCrash.getEventListenerFromIntent(intent);
         final CustomActivityOnCrash.EventListener listenerFromIntent = CustomActivityOnCrash.getEventListenerFromIntent(intent);
 
 

+ 13 - 21
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/MainActivity.java

@@ -342,21 +342,6 @@ public class MainActivity extends BaseActivity implements ImStatusListener, NetW
         LinkedHashMap<String, Object> headers = new LinkedHashMap<>();
         LinkedHashMap<String, Object> headers = new LinkedHashMap<>();
         headers.put("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(ct, "sessionId"));
         headers.put("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(ct, "sessionId"));
         ViewUtil.httpSendRequest(ct, url, params, mUserCheckHander, headers, 0x12312, message, null, "get");
         ViewUtil.httpSendRequest(ct, url, params, mUserCheckHander, headers, 0x12312, message, null, "get");
-
-//       new Thread(()->{
-//           while (true){
-//               try {
-//                   Thread.sleep(1000);
-//               } catch (InterruptedException e) {
-//                   e.printStackTrace();
-//               }
-//               LogUtil.d(TAG,"执行一次网络请求..."+DateFormatUtil.getStrDate4Date(new Date(),DateFormatUtil.YMD_HMS));
-//               ViewUtil.AutoLoginErp(this);
-//    
-//               com.core.utils.CommonUtil.displayBriefMemory();
-//           }
-//       }).start();
-
     }
     }
 
 
     private void delay() {
     private void delay() {
@@ -680,7 +665,19 @@ public class MainActivity extends BaseActivity implements ImStatusListener, NetW
             }
             }
         });
         });
 
 
-        
+
+        //查询数据库,取出中文名:
+//        DBManager  dbManager = new DBManager(ct);
+//        List<EmployeesEntity> db = dbManager.select_getEmployee(
+//                new String[]{CommonUtil.getSharedPreferences(ct, "erp_master"),
+//                        CommonUtil.getSharedPreferences(ct, "erp_username")}
+//                , "whichsys=? and em_code=? ");
+//        if (!ListUtils.isEmpty(db)){
+//            if (!StringUtil.isEmpty(db.get(0).getEM_NAME())){
+//                CommonUtil.setSharedPreferences(ct,"erp_emname",db.get(0).getEM_NAME());
+//            }
+//        }
+//        dbManager.closeDB();
         doHiTask();
         doHiTask();
         autoPresenter = AutoPresenter.onCreate();
         autoPresenter = AutoPresenter.onCreate();
         SchedulePresenter.getInstance().startSchedule();
         SchedulePresenter.getInstance().startSchedule();
@@ -691,12 +688,7 @@ public class MainActivity extends BaseActivity implements ImStatusListener, NetW
         //初始化面部识别
         //初始化面部识别
         com.baidu.aip.excep.utils.FaceConfig.initFace(ct);
         com.baidu.aip.excep.utils.FaceConfig.initFace(ct);
         Login();
         Login();
-        
-          
-        
     }
     }
-    
- 
 
 
     private AutoPresenter autoPresenter;
     private AutoPresenter autoPresenter;
     private Handler handler = new Handler();
     private Handler handler = new Handler();

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

@@ -1,6 +1,7 @@
 package com.core.app;
 package com.core.app;
 
 
 import android.app.Activity;
 import android.app.Activity;
+import android.app.Application;
 import android.content.Context;
 import android.content.Context;
 import android.graphics.Bitmap;
 import android.graphics.Bitmap;
 import android.os.Build;
 import android.os.Build;
@@ -24,6 +25,7 @@ import com.core.net.ssl.AuthImageDownloader;
 import com.core.net.utils.NetUtils;
 import com.core.net.utils.NetUtils;
 import com.core.net.volley.FastVolley;
 import com.core.net.volley.FastVolley;
 import com.core.service.InitializeService;
 import com.core.service.InitializeService;
+import com.core.utils.CommonUtil;
 import com.hss01248.notifyutil.NotifyUtil;
 import com.hss01248.notifyutil.NotifyUtil;
 import com.lidroid.xutils.HttpUtils;
 import com.lidroid.xutils.HttpUtils;
 import com.nostra13.universalimageloader.cache.disc.impl.TotalSizeLimitedDiscCache;
 import com.nostra13.universalimageloader.cache.disc.impl.TotalSizeLimitedDiscCache;
@@ -48,7 +50,6 @@ import org.apache.http.cookie.Cookie;
 
 
 import java.io.File;
 import java.io.File;
 
 
-
 /**
 /**
  * Created by Arison on 2017/8/25.
  * Created by Arison on 2017/8/25.
  */
  */
@@ -96,21 +97,20 @@ public class MyApplication extends BaseApplication {
      * 提供网络全局监听
      * 提供网络全局监听
      ************************/
      ************************/
     private NetWorkObservable mNetWorkObservable;
     private NetWorkObservable mNetWorkObservable;
-    private final static int CWJ_HEAP_SIZE = 6* 1024* 1024 ;
-    
-    
+
 
 
     @Override
     @Override
     public void initConfig() throws Exception {
     public void initConfig() throws Exception {
         //后台服务初始化application
         //后台服务初始化application
         InitializeService.initApplication(this);
         InitializeService.initApplication(this);
+
+//        LeakCanary.install(this);
+
         INSTANCE = this;
         INSTANCE = this;
-        
-        
         mRequestQueue = Volley.newRequestQueue(this);
         mRequestQueue = Volley.newRequestQueue(this);
         mHttpUtils = new HttpUtils();
         mHttpUtils = new HttpUtils();
         configHttpUtils();
         configHttpUtils();
-        initUmengStatistics() ;
+
         new Handler().postDelayed(new Runnable() {
         new Handler().postDelayed(new Runnable() {
             @Override
             @Override
             public void run() {
             public void run() {
@@ -121,7 +121,6 @@ public class MyApplication extends BaseApplication {
                 // 初始化图片加载
                 // 初始化图片加载
                 initImageLoader();
                 initImageLoader();
                 NotifyUtil.init(getInstance());
                 NotifyUtil.init(getInstance());
-                
 
 
             }
             }
         }, 1);
         }, 1);
@@ -209,8 +208,9 @@ public class MyApplication extends BaseApplication {
         MobclickAgent.UMAnalyticsConfig config = new MobclickAgent.UMAnalyticsConfig(this, "57ea27bb67e58e088c003bbf",
         MobclickAgent.UMAnalyticsConfig config = new MobclickAgent.UMAnalyticsConfig(this, "57ea27bb67e58e088c003bbf",
                 "baidu", MobclickAgent.EScenarioType.E_UM_NORMAL);
                 "baidu", MobclickAgent.EScenarioType.E_UM_NORMAL);
         MobclickAgent.startWithConfigure(config);
         MobclickAgent.startWithConfigure(config);
-       // MobclickAgent.setCatchUncaughtExceptions(false);
-      
+        if (!CommonUtil.isReleaseVersion()) {//当前为开发版本时候不需要上传友盟
+            MobclickAgent.setCatchUncaughtExceptions(false);
+        }
     }
     }
 
 
     private void configHttpUtils() {
     private void configHttpUtils() {

+ 2 - 8
app_core/common/src/main/java/com/core/net/http/HttpUtil.java

@@ -89,7 +89,7 @@ public class HttpUtil {
             response = httpClient.execute(httpGet);
             response = httpClient.execute(httpGet);
             return Response.getResponse(response);
             return Response.getResponse(response);
         } finally {
         } finally {
-            httpClient.getConnectionManager().shutdown();
+
         }
         }
     }
     }
 
 
@@ -136,8 +136,6 @@ public class HttpUtil {
             response = httpClient.execute(httpPost);
             response = httpClient.execute(httpPost);
             return Response.getResponse(response);
             return Response.getResponse(response);
         } finally {
         } finally {
-            // 关闭连接,释放资源
-            httpClient.getConnectionManager().shutdown();
         }
         }
     }
     }
 
 
@@ -183,11 +181,7 @@ public class HttpUtil {
             response = httpClient.execute(httpPost);
             response = httpClient.execute(httpPost);
             return Response.getResponse(response);
             return Response.getResponse(response);
         } finally {
         } finally {
-            // 关闭连接,释放资源
-            httpClient.getConnectionManager().shutdown();
-            /*if (httpClient!=null){
-                httpClient.getConnectionManager().shutdown();
-            }*/
+
         }
         }
     }
     }
 
 

+ 4 - 5
app_core/common/src/main/java/com/core/service/InitializeService.java

@@ -9,7 +9,6 @@ import android.support.annotation.Nullable;
 import android.util.Log;
 import android.util.Log;
 
 
 import com.baidu.mapapi.SDKInitializer;
 import com.baidu.mapapi.SDKInitializer;
-import com.common.LogUtil;
 import com.common.preferences.PreferenceUtils;
 import com.common.preferences.PreferenceUtils;
 import com.common.preferences.SharedUtil;
 import com.common.preferences.SharedUtil;
 import com.core.app.AppConfig;
 import com.core.app.AppConfig;
@@ -17,6 +16,7 @@ import com.core.app.Constants;
 import com.core.db.DBOpenHelper;
 import com.core.db.DBOpenHelper;
 import com.core.db.DatabaseManager;
 import com.core.db.DatabaseManager;
 import com.core.db.SQLiteHelper;
 import com.core.db.SQLiteHelper;
+import com.core.utils.CommonUtil;
 import com.facebook.stetho.Stetho;
 import com.facebook.stetho.Stetho;
 import com.iflytek.cloud.SpeechConstant;
 import com.iflytek.cloud.SpeechConstant;
 import com.iflytek.cloud.SpeechUtility;
 import com.iflytek.cloud.SpeechUtility;
@@ -144,9 +144,8 @@ public class InitializeService extends IntentService {
         MobclickAgent.UMAnalyticsConfig config = new MobclickAgent.UMAnalyticsConfig(mContext, "57ea27bb67e58e088c003bbf",
         MobclickAgent.UMAnalyticsConfig config = new MobclickAgent.UMAnalyticsConfig(mContext, "57ea27bb67e58e088c003bbf",
                 "baidu", MobclickAgent.EScenarioType.E_UM_NORMAL);
                 "baidu", MobclickAgent.EScenarioType.E_UM_NORMAL);
         MobclickAgent.startWithConfigure(config);
         MobclickAgent.startWithConfigure(config);
-        LogUtil.d("initUmengStatistics()");
-//        if (!CommonUtil.isReleaseVersion()) {//当前为开发版本时候不需要上传友盟
-           // MobclickAgent.setCatchUncaughtExceptions(false);
-//        }
+        if (!CommonUtil.isReleaseVersion()) {//当前为开发版本时候不需要上传友盟
+            MobclickAgent.setCatchUncaughtExceptions(false);
+        }
     }
     }
 }
 }

+ 2 - 2
app_core/common/src/main/res/drawable/tab_job_bg.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <?xml version="1.0" encoding="utf-8"?>
 <selector xmlns:android="http://schemas.android.com/apk/res/android">
 <selector xmlns:android="http://schemas.android.com/apk/res/android">
 
 
-<item android:drawable="@drawable/icon_massage_selected" android:state_checked="true" android:state_enabled="true" />
-<item android:drawable="@drawable/icon_massage_nor" />
+    <item android:drawable="@drawable/icon_massage_selected" android:state_checked="true" android:state_enabled="true"/>
+    <item android:drawable="@drawable/icon_massage_nor"/>
 
 
 </selector>
 </selector>

+ 4 - 5
app_core/common/src/main/res/layout/activity_setting.xml

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="utf-8"?>
 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:background="@color/oa_bg"
-    android:orientation="vertical">
+              android:layout_width="match_parent"
+              android:layout_height="match_parent"
+              android:background="@color/oa_bg"
+              android:orientation="vertical">
 
 
     <ScrollView
     <ScrollView
         android:layout_width="match_parent"
         android:layout_width="match_parent"
@@ -566,7 +566,6 @@
                     android:background="@drawable/oa_next"
                     android:background="@drawable/oa_next"
                     android:contentDescription="@string/app_name" />
                     android:contentDescription="@string/app_name" />
             </RelativeLayout>
             </RelativeLayout>
-
             <RelativeLayout
             <RelativeLayout
                 android:id="@+id/language_us_rl"
                 android:id="@+id/language_us_rl"
                 style="@style/commonSettingItem"
                 style="@style/commonSettingItem"

+ 1 - 1
app_modular/applogin/src/main/java/com/modular/login/activity/PersonalRegActivity.java

@@ -51,7 +51,7 @@ public class PersonalRegActivity extends SupportToolBarActivity {
     protected void onCreate(Bundle savedInstanceState) {
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         super.onCreate(savedInstanceState);
         setContentView(R.layout.personal_reg_activity);
         setContentView(R.layout.personal_reg_activity);
-         setTitle(getString(R.string.person_register));
+     setTitle(getString(R.string.person_register));
 
 
         initView();
         initView();
     }
     }

+ 3 - 3
app_modular/appmusic/src/main/java/com/usoftchina/music/MusicService.java

@@ -40,9 +40,9 @@ public class MusicService extends Service {
     private void initMusic() {
     private void initMusic() {
         Log.i(TAG, "onStartCommand");
         Log.i(TAG, "onStartCommand");
         try {
         try {
-//            mediaPlayer =  MediaPlayer.create(this, R.raw.yingtang);
-//            mediaPlayer.prepare();
-//            mediaPlayer.setLooping(true);
+            mediaPlayer =  MediaPlayer.create(this, R.raw.yingtang);
+            mediaPlayer.prepare();
+            mediaPlayer.setLooping(true);
         } catch (Exception e) {
         } catch (Exception e) {
             e.printStackTrace();
             e.printStackTrace();
         }
         }

BIN
app_modular/appmusic/src/main/res/raw/yingtang.mp3