Browse Source

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

# Conflicts:
#	settings.gradle
SpringBoots 8 years ago
parent
commit
541fa1589c
100 changed files with 405 additions and 14 deletions
  1. 15 1
      WeiChat/build.gradle
  2. 1 1
      WeiChat/src/main/AndroidManifest.xml
  3. 1 1
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/me/MeFragment.java
  4. 28 3
      WeiChat/src/main/res/layout/toast_demo.xml
  5. 1 1
      app_core/common/src/main/java/com/core/app/AppConfig.java
  6. 0 0
      app_core/common/src/main/java/com/core/model/AttentionUser.java
  7. 0 0
      app_core/common/src/main/java/com/core/model/Company.java
  8. 0 0
      app_core/common/src/main/java/com/core/model/ConfigBean.java
  9. 0 0
      app_core/common/src/main/java/com/core/model/Friend.java
  10. 0 0
      app_core/common/src/main/java/com/core/model/User.java
  11. 4 7
      app_core/common/src/main/java/com/core/net/NetWorkObservable.java
  12. 229 0
      app_core/common/src/main/java/com/core/net/location/BdLocationHelper.java
  13. 0 0
      app_core/common/src/main/java/com/core/net/ssl/AuthImageDownloader.java
  14. 8 0
      app_core/common/src/main/java/com/core/net/utils/NetUtils.java
  15. 118 0
      app_core/common/src/main/java/com/core/net/volley/FastVolley.java
  16. BIN
      app_core/common/src/main/res/drawable-hdpi/account_avatar_bg.png
  17. BIN
      app_core/common/src/main/res/drawable-hdpi/account_icon.png
  18. BIN
      app_core/common/src/main/res/drawable-hdpi/actionbar_bg.9.png
  19. BIN
      app_core/common/src/main/res/drawable-hdpi/add_friend.png
  20. BIN
      app_core/common/src/main/res/drawable-hdpi/add_picture.png
  21. BIN
      app_core/common/src/main/res/drawable-hdpi/add_task.png
  22. BIN
      app_core/common/src/main/res/drawable-hdpi/aguanzu.png
  23. BIN
      app_core/common/src/main/res/drawable-hdpi/aguanzu_pass.png
  24. BIN
      app_core/common/src/main/res/drawable-hdpi/allegedlying.png
  25. BIN
      app_core/common/src/main/res/drawable-hdpi/appitem_del_btn_normal.png
  26. BIN
      app_core/common/src/main/res/drawable-hdpi/appitem_del_btn_pressed.png
  27. BIN
      app_core/common/src/main/res/drawable-hdpi/attendance_bg.png
  28. BIN
      app_core/common/src/main/res/drawable-hdpi/attendances_bg.png
  29. BIN
      app_core/common/src/main/res/drawable-hdpi/avatar_normal.png
  30. BIN
      app_core/common/src/main/res/drawable-hdpi/b2bs.png
  31. BIN
      app_core/common/src/main/res/drawable-hdpi/b2btixing.png
  32. BIN
      app_core/common/src/main/res/drawable-hdpi/back.png
  33. BIN
      app_core/common/src/main/res/drawable-hdpi/bakchat_check_list_progress.png
  34. BIN
      app_core/common/src/main/res/drawable-hdpi/bao.png
  35. BIN
      app_core/common/src/main/res/drawable-hdpi/bg.9.png
  36. BIN
      app_core/common/src/main/res/drawable-hdpi/bg1.png
  37. BIN
      app_core/common/src/main/res/drawable-hdpi/bg_face_sel.9.png
  38. BIN
      app_core/common/src/main/res/drawable-hdpi/biangeng.png
  39. BIN
      app_core/common/src/main/res/drawable-hdpi/blend_spinner_76_inner_holo.png
  40. BIN
      app_core/common/src/main/res/drawable-hdpi/blend_spinner_76_outer_holo.png
  41. BIN
      app_core/common/src/main/res/drawable-hdpi/bo.png
  42. BIN
      app_core/common/src/main/res/drawable-hdpi/boy.png
  43. BIN
      app_core/common/src/main/res/drawable-hdpi/boy_pass.png
  44. BIN
      app_core/common/src/main/res/drawable-hdpi/btn_back.png
  45. BIN
      app_core/common/src/main/res/drawable-hdpi/btn_yuyin_nor.png
  46. BIN
      app_core/common/src/main/res/drawable-hdpi/btn_yuyin_pressed.png
  47. BIN
      app_core/common/src/main/res/drawable-hdpi/business_manage.png
  48. BIN
      app_core/common/src/main/res/drawable-hdpi/butongyi.png
  49. BIN
      app_core/common/src/main/res/drawable-hdpi/cai.png
  50. BIN
      app_core/common/src/main/res/drawable-hdpi/calculator_delete.png
  51. BIN
      app_core/common/src/main/res/drawable-hdpi/camera_video.png
  52. BIN
      app_core/common/src/main/res/drawable-hdpi/chakan.png
  53. BIN
      app_core/common/src/main/res/drawable-hdpi/changyongyu.png
  54. BIN
      app_core/common/src/main/res/drawable-hdpi/chao.png
  55. BIN
      app_core/common/src/main/res/drawable-hdpi/chat_bg_blue_press.9.png
  56. BIN
      app_core/common/src/main/res/drawable-hdpi/chat_bg_white.9.png
  57. BIN
      app_core/common/src/main/res/drawable-hdpi/chat_bg_white_press.9.png
  58. BIN
      app_core/common/src/main/res/drawable-hdpi/chat_icon_voice1.png
  59. BIN
      app_core/common/src/main/res/drawable-hdpi/chat_icon_voice2.png
  60. BIN
      app_core/common/src/main/res/drawable-hdpi/chat_icon_voice3.png
  61. BIN
      app_core/common/src/main/res/drawable-hdpi/chat_icon_voice4.png
  62. BIN
      app_core/common/src/main/res/drawable-hdpi/chat_icon_voice5.png
  63. BIN
      app_core/common/src/main/res/drawable-hdpi/chat_icon_voice6.png
  64. BIN
      app_core/common/src/main/res/drawable-hdpi/chat_map_bg.png
  65. BIN
      app_core/common/src/main/res/drawable-hdpi/chat_top_voice_bg.9.png
  66. BIN
      app_core/common/src/main/res/drawable-hdpi/chatsystem_bg.9.png
  67. BIN
      app_core/common/src/main/res/drawable-hdpi/chu.png
  68. BIN
      app_core/common/src/main/res/drawable-hdpi/common_header_boy.png
  69. BIN
      app_core/common/src/main/res/drawable-hdpi/crm_left.png
  70. BIN
      app_core/common/src/main/res/drawable-hdpi/crm_right.png
  71. BIN
      app_core/common/src/main/res/drawable-hdpi/crms.png
  72. BIN
      app_core/common/src/main/res/drawable-hdpi/crmtixing.png
  73. BIN
      app_core/common/src/main/res/drawable-hdpi/da.png
  74. BIN
      app_core/common/src/main/res/drawable-hdpi/daibangongzuo.png
  75. BIN
      app_core/common/src/main/res/drawable-hdpi/dan.png
  76. BIN
      app_core/common/src/main/res/drawable-hdpi/dao.png
  77. BIN
      app_core/common/src/main/res/drawable-hdpi/defaultpic.png
  78. BIN
      app_core/common/src/main/res/drawable-hdpi/dele.png
  79. BIN
      app_core/common/src/main/res/drawable-hdpi/delete.png
  80. BIN
      app_core/common/src/main/res/drawable-hdpi/dg_btn_normal.9.png
  81. BIN
      app_core/common/src/main/res/drawable-hdpi/dg_btn_pressed.9.png
  82. BIN
      app_core/common/src/main/res/drawable-hdpi/dividing_line.png
  83. BIN
      app_core/common/src/main/res/drawable-hdpi/domo_toolbar_bg.png
  84. BIN
      app_core/common/src/main/res/drawable-hdpi/dot_avatar.png
  85. BIN
      app_core/common/src/main/res/drawable-hdpi/down.png
  86. BIN
      app_core/common/src/main/res/drawable-hdpi/edit.png
  87. BIN
      app_core/common/src/main/res/drawable-hdpi/em_add_friend.png
  88. BIN
      app_core/common/src/main/res/drawable-hdpi/email.png
  89. BIN
      app_core/common/src/main/res/drawable-hdpi/end_meeting.png
  90. BIN
      app_core/common/src/main/res/drawable-hdpi/end_meeting_pass.png
  91. BIN
      app_core/common/src/main/res/drawable-hdpi/ex_icon_share_nor.png
  92. BIN
      app_core/common/src/main/res/drawable-hdpi/expense_tishi_detail.png
  93. BIN
      app_core/common/src/main/res/drawable-hdpi/f_u.png
  94. BIN
      app_core/common/src/main/res/drawable-hdpi/fa.png
  95. BIN
      app_core/common/src/main/res/drawable-hdpi/feed_main_player_play.png
  96. BIN
      app_core/common/src/main/res/drawable-hdpi/file.png
  97. BIN
      app_core/common/src/main/res/drawable-hdpi/filter.png
  98. BIN
      app_core/common/src/main/res/drawable-hdpi/folder.png
  99. BIN
      app_core/common/src/main/res/drawable-hdpi/for_dyy.png
  100. BIN
      app_core/common/src/main/res/drawable-hdpi/friend_prialy_top.png

+ 15 - 1
WeiChat/build.gradle

@@ -29,6 +29,10 @@ android {
         versionName rootProject.ext.android.versionName
         multiDexEnabled true
         signingConfig signingConfigs.config
+
+        // 默认是umeng的渠道
+        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
+        manifestPlaceholders = [UMENG_CHANNEL_VALUE: "umeng"]
     }
 
     useLibrary 'org.apache.http.legacy'
@@ -51,9 +55,19 @@ android {
             signingConfig signingConfigs.config
         }
     }
-    productFlavors {
+    productFlavors {   // 友盟多渠道打包
+        wandoujia {}
+        _360 {}
+        baidu {}
+        xiaomi {}
+        tencent {}
+        taobao {}
+
     }
 
+    productFlavors.all {
+        flavor -> flavor.manifestPlaceholders = [UMENG_CHANNEL_VALUE: name]
+    }
 }
 
 dependencies {

+ 1 - 1
WeiChat/src/main/AndroidManifest.xml

@@ -126,7 +126,7 @@
         android:theme="@style/AppTheme">
         <meta-data
             android:name="UMENG_CHANNEL"
-            android:value="baidu" />
+            android:value="${UMENG_CHANNEL_VALUE}" />
         <!-- 启动页面 -->
         <activity android:name=".ui.SplashActivity">
             <intent-filter>

+ 1 - 1
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/me/MeFragment.java

@@ -364,7 +364,7 @@ public class MeFragment extends EasyFragment implements View.OnClickListener {
             public void onClick(View v) {
 //                startActivity(new Intent(ct, PictureSelectorDemo.class));
 //                startActivity(new Intent(ct, PersonalRegActivity.class));
-                startActivity(new Intent(ct,TemperatureActivity.class));
+//                startActivity(new Intent(ct,TemperatureActivity.class));
 //                startActivity(new Intent(ct,ToastDemoActivity.class));
             }
         });

+ 28 - 3
WeiChat/src/main/res/layout/toast_demo.xml

@@ -3,7 +3,8 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:orientation="horizontal"
-    android:background="@color/bg_main">
+    android:background="@color/light_green"
+    >
     <LinearLayout
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
@@ -40,7 +41,7 @@
             android:layout_width="80dp"
             android:layout_height="wrap_content"
             android:layout_marginTop="10dp"
-            android:text="Center"/>
+            android:text="Notifi"/>
     </LinearLayout>
     <LinearLayout
         android:layout_width="wrap_content"
@@ -79,7 +80,13 @@
             android:layout_width="80dp"
             android:layout_height="wrap_content"
             android:layout_marginTop="10dp"
-            android:text="Center"/>
+            android:text="Notifi"/>
+        <Button
+            android:id="@+id/btn_b6"
+            android:layout_width="80dp"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="10dp"
+            android:text="WithPicuure"/>
     </LinearLayout>
 
     <LinearLayout
@@ -113,6 +120,12 @@
             android:layout_height="wrap_content"
             android:layout_marginTop="10dp"
             android:text="Center"/>
+        <Button
+            android:id="@+id/btn_c5"
+            android:layout_width="80dp"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="10dp"
+            android:text="Notifi"/>
     </LinearLayout>
     <LinearLayout
         android:layout_width="wrap_content"
@@ -146,5 +159,17 @@
             android:layout_height="wrap_content"
             android:layout_marginTop="10dp"
             android:text="Center"/>
+        <Button
+            android:id="@+id/btn_d5"
+            android:layout_width="80dp"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="10dp"
+            android:text="Notifi"/>
+        <Button
+            android:id="@+id/btn_d6"
+            android:layout_width="80dp"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="10dp"
+            android:text="CusXml"/>
     </LinearLayout>
 </LinearLayout>

+ 1 - 1
WeiChat/src/main/java/com/xzjmyk/pm/activity/AppConfig.java → app_core/common/src/main/java/com/core/app/AppConfig.java

@@ -6,7 +6,7 @@ import android.content.SharedPreferences.Editor;
 import android.text.TextUtils;
 import android.util.Log;
 
-import com.xzjmyk.pm.activity.bean.ConfigBean;
+import com.core.model.ConfigBean;
 
 public class AppConfig {
     public static final boolean COMPANY = true;//不可以乱动,调试接口

+ 0 - 0
WeiChat/src/main/java/com/xzjmyk/pm/activity/bean/AttentionUser.java → app_core/common/src/main/java/com/core/model/AttentionUser.java


+ 0 - 0
WeiChat/src/main/java/com/xzjmyk/pm/activity/bean/Company.java → app_core/common/src/main/java/com/core/model/Company.java


+ 0 - 0
WeiChat/src/main/java/com/xzjmyk/pm/activity/bean/ConfigBean.java → app_core/common/src/main/java/com/core/model/ConfigBean.java


+ 0 - 0
WeiChat/src/main/java/com/xzjmyk/pm/activity/bean/Friend.java → app_core/common/src/main/java/com/core/model/Friend.java


+ 0 - 0
WeiChat/src/main/java/com/xzjmyk/pm/activity/bean/User.java → app_core/common/src/main/java/com/core/model/User.java


+ 4 - 7
WeiChat/src/main/java/com/xzjmyk/pm/activity/NetWorkObservable.java → app_core/common/src/main/java/com/core/net/NetWorkObservable.java

@@ -8,8 +8,9 @@ import android.database.Observable;
 import android.net.ConnectivityManager;
 import android.util.Log;
 
+import com.core.app.AppConfig;
+import com.core.net.utils.NetUtils;
 import com.xzjmyk.pm.activity.NetWorkObservable.NetWorkObserver;
-import com.xzjmyk.pm.activity.util.oa.CommonUtil;
 
 public class NetWorkObservable extends Observable<NetWorkObserver> {
 	public static interface NetWorkObserver {
@@ -26,7 +27,7 @@ public class NetWorkObservable extends Observable<NetWorkObserver> {
 		// 获取程序启动时的网络状态
 		mConnectivityManager = (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE);
 		
-		mIsNetWorkActive = CommonUtil.isNetWorkConnected(mContext);
+		mIsNetWorkActive = NetUtils.isNetWorkConnected(mContext);
 				//isGprsOrWifiConnected();
 		if (AppConfig.DEBUG) {
 			Log.d(AppConfig.TAG, "mIsNetWorkActive:" + mIsNetWorkActive);
@@ -38,11 +39,7 @@ public class NetWorkObservable extends Observable<NetWorkObserver> {
 	}
 
 	private boolean isGprsOrWifiConnected() {
-//		NetworkInfo gprs = mConnectivityManager.getNetworkInfo(ConnectivityManager.TYPE_MOBILE);
-//		NetworkInfo wifi = mConnectivityManager.getNetworkInfo(ConnectivityManager.TYPE_WIFI);
-//		boolean isConnectedGprs = gprs != null && gprs.isConnected();
-//		boolean isConnectedWifi = wifi != null && wifi.isConnected();
-		return CommonUtil.isNetWorkConnected(MyApplication.getInstance());
+		return NetUtils.isNetWorkConnected(MyApplication.getInstance());
 	}
 
 	private BroadcastReceiver mNetWorkChangeReceiver = new BroadcastReceiver() {

+ 229 - 0
app_core/common/src/main/java/com/core/net/location/BdLocationHelper.java

@@ -0,0 +1,229 @@
+package com.xzjmyk.pm.activity;
+
+import android.content.Intent;
+import android.support.v4.content.LocalBroadcastManager;
+
+import com.baidu.location.BDLocation;
+import com.baidu.location.BDLocationListener;
+import com.baidu.location.LocationClient;
+import com.baidu.location.LocationClientOption;
+import com.baidu.mapapi.model.LatLng;
+import com.common.LogUtil;
+import com.common.data.StringUtil;
+import com.common.preferences.PreferenceUtils;
+
+public class BdLocationHelper {
+    public static final String UPLOCATION_ACTION = "UPLOCATION_ACTION";//更新位置时候广播数据
+
+    private boolean locationOk;//是否定位成功
+    private LatLng latLng;
+    private String location;//位置信息
+    private String address;//详细地址
+    private String province;// 省份
+    private String cityName;// 城市
+    private String district;// 街道
+    private String errorMessage;//定位错误信息
+
+    private final Intent broadcast = new Intent(UPLOCATION_ACTION);//更新后广播
+    private LocationClient mLocationClient = null;
+    private int mFaildCount = 0;//失败次数
+
+    public BdLocationHelper() {
+        initLocation();
+    }
+
+    private void initLocation() {
+        mLocationClient = new LocationClient(MyApplication.getInstance().getApplicationContext()); // 声明LocationClient类
+        mLocationClient.registerLocationListener(mLocationListener); // 注册监听函数
+        mLocationClient.setLocOption(getOptionByGPS());
+//        requestLocation();
+    }
+
+    /**
+     * 获取配置
+     *
+     * @return
+     */
+    private LocationClientOption getOptionByGPS() {
+        LocationClientOption option = new LocationClientOption();
+        option.setLocationMode(LocationClientOption.LocationMode.Hight_Accuracy);//可选,默认高精度,设置定位模式,高精度,低功耗,仅设备
+        option.setCoorType("bd09ll");//可选,默认gcj02,设置返回的定位结果坐标系
+        option.setScanSpan(20 * 1000);//可选,默认0,即仅定位一次,设置发起定位请求的间隔需要大于等于1000ms才是有效的
+        option.setIsNeedAddress(true);//可选,设置是否需要地址信息,默认不需要
+        option.setOpenGps(true);//可选,默认false,设置是否使用gps
+        option.setLocationNotify(false);//可选,默认false,设置是否当GPS有效时按照1S/1次频率输出GPS结果
+        option.setIsNeedLocationDescribe(true);//可选,默认false,设置是否需要位置语义化结果,可以在BDLocation.getLocationDescribe里得到,结果类似于“在北京天安门附近”
+        option.setIsNeedLocationPoiList(false);//可选,默认false,设置是否需要POI结果,可以在BDLocation.getPoiList里得到
+        option.setIgnoreKillProcess(false);//可选,默认true,定位SDK内部是一个SERVICE,并放到了独立进程,设置是否在stop的时候杀死这个进程,默认不杀死
+        option.SetIgnoreCacheException(false);//可选,默认false,设置是否收集CRASH信息,默认收集
+        option.setEnableSimulateGps(true);//可选,默认false,设置是否需要过滤GPS仿真结果,默认需要
+        option.setNeedDeviceDirect(false);
+        return option;
+    }
+
+    /**
+     * 获取配置
+     *
+     * @return
+     */
+    private LocationClientOption getOptionNotGPS() {
+        LocationClientOption option = getOptionByGPS();
+        option.setOpenGps(false);
+        return option;
+    }
+
+
+    /**
+     * 关闭定位
+     **/
+    public void release() {
+        if (mLocationClient.isStarted()) {
+            mLocationClient.stop();
+        }
+    }
+
+
+    /**
+     * 重新定位
+     **/
+    public void requestLocation() {
+        if (mLocationClient == null) return;
+        if (!mLocationClient.isStarted()) {
+            mFaildCount = 0;
+            mLocationClient.start();
+        } else {
+            mLocationClient.requestLocation();
+        }
+    }
+
+
+    private BDLocationListener mLocationListener = new BDLocationListener() {
+        @Override
+        public void onReceiveLocation(BDLocation location) {
+            try {
+                setLocation(location);
+            } catch (Exception e) {
+                if (e != null)
+                    log("onReceiveLocation Exception" + e.getMessage());
+                clearLocation();
+            }
+        }
+    };
+
+
+    private void setLocation(BDLocation location) throws Exception {
+        if (location.getLocType() == BDLocation.TypeGpsLocation// GPS定位结果
+                || location.getLocType() == BDLocation.TypeNetWorkLocation//网络定位
+                || location.getLocType() == BDLocation.TypeOffLineLocation//离线定位(未验证离线定位的有效性)
+                ) {
+            //定位成功
+            locationOk = true;
+            latLng = new LatLng(location.getLatitude(), location.getLongitude());
+            this.location = location.getLocationDescribe();
+            province = location.getProvince();
+            cityName = location.getCity();
+            district = location.getDistrict();
+            address = location.getAddrStr();
+            if (!StringUtil.isEmpty(this.location))
+                PreferenceUtils.putString("bdlocation", this.location);
+            if (!StringUtil.isEmpty(address))
+                PreferenceUtils.putString("bdaddress", address);
+            errorMessage = "";
+        } else {
+            //统一为定位失败
+            locationOk = false;
+            log("定位失败");
+            if (location.getLocType() == BDLocation.TypeServerError) {
+                //服务端网络定位失败,可以反馈IMEI号和大体定位时间到loc-bugs@baidu.com,会有人追查原因
+                errorMessage = "服务端网络定位失败";
+                log("服务端网络定位失败");
+            } else if (location.getLocType() == BDLocation.TypeNetWorkException) {
+                //网络不同导致定位失败,请检查网络是否通畅
+                errorMessage = "网络不同导致定位失败,请检查网络是否通畅";
+                log("网络不同导致定位失败,请检查网络是否通畅");
+            } else if (location.getLocType() == BDLocation.TypeCriteriaException) {
+                //无法获取有效定位依据导致定位失败,一般是由于手机的原因,处于飞行模式下一般会造成这种结果,可以试着重启手机
+                errorMessage = "无法获取有效定位依据导致定位失败";
+                log("无法获取有效定位依据导致定位失败");
+            } else {
+                errorMessage = "未知错误";
+                log("未知错误");
+            }
+            if (mFaildCount < 3) {
+                mFaildCount++;
+                requestLocation();
+                return;
+            }
+        }
+        //发送广播
+        broadcast.putExtra(UPLOCATION_ACTION, locationOk);
+        LocalBroadcastManager.getInstance(MyApplication.getInstance()).sendBroadcast(broadcast);
+    }
+
+    private void log(String message) {
+        LogUtil.i(message);
+    }
+
+
+    public String getName() {
+        return StringUtil.isEmpty(location) ? "" : location;
+    }
+
+
+    // 获取经纬度
+    public double getLongitude() {
+        return latLng == null ? 1 : latLng.longitude;
+    }
+
+    // 获取经纬度
+    public double getLatitude() {
+        return latLng == null ? 1 : latLng.latitude;
+    }
+
+    // 获取地址详情
+    public String getAddress() {
+        return StringUtil.isEmpty(address) ? PreferenceUtils.getString("bdaddress") : address;
+    }
+
+
+    public String getProvinceName() {
+        return province;
+    }
+
+    public LatLng getLocation() {
+        return latLng;
+    }
+
+    public String getCityName() {
+        return cityName;
+    }
+
+    public String getDistrictName() {
+        return district;
+    }
+
+    public boolean locationOk() {
+        return locationOk;
+    }
+
+    public String getErrorMessage() {
+        return errorMessage;
+    }
+
+    public boolean isLocationUpdate() {
+        return true;
+    }
+
+    private void clearLocation() {
+        locationOk = false;
+        latLng = null;
+        location = null;
+        address = null;
+        province = null;
+        cityName = null;
+        district = null;
+        errorMessage = null;
+    }
+
+}
+

+ 0 - 0
WeiChat/src/main/java/com/xzjmyk/pm/activity/view/AuthImageDownloader.java → app_core/common/src/main/java/com/core/net/ssl/AuthImageDownloader.java


+ 8 - 0
app_core/common/src/main/java/com/core/net/utils/NetUtils.java

@@ -0,0 +1,8 @@
+package com.core.net.utils;
+
+/**
+ * Created by Arison on 2017/8/26.
+ */
+
+public class NetUtils {
+}

+ 118 - 0
app_core/common/src/main/java/com/core/net/volley/FastVolley.java

@@ -0,0 +1,118 @@
+package com.xzjmyk.pm.activity.volley;
+
+import android.content.Context;
+
+import com.android.volley.DefaultRetryPolicy;
+import com.android.volley.NetworkError;
+import com.android.volley.Request;
+import com.android.volley.RequestQueue;
+import com.android.volley.RetryPolicy;
+import com.android.volley.VolleyError;
+import com.android.volley.toolbox.Volley;
+import com.xzjmyk.pm.activity.MyApplication;
+import com.xzjmyk.pm.activity.util.oa.CommonUtil;
+
+public class FastVolley {
+
+	static final String TAG = "Volley";
+	static final boolean DEBUG = true;
+
+	private RequestQueue mRequestQueue;
+
+	public FastVolley(Context context) {
+		mRequestQueue = Volley.newRequestQueue(context);
+	}
+
+	public void start() {
+		mRequestQueue.start();
+	}
+
+	public void stop() {
+		mRequestQueue.stop();
+	}
+
+	public void addDefaultRequest(String parentTag, Request<?> request) {
+		addRequest(parentTag, request, FastVolley.newDefaultRetryPolicy());
+	}
+
+	public void addShortRequest(String parentTag, Request<?> request) {
+		addRequest(parentTag, request, FastVolley.newShortRetryPolicy());
+	}
+
+	public void addRequest(String parentTag, Request<?> request, RetryPolicy retryPolicy) {
+		if (request == null) {
+			return;
+		}
+		if (!CommonUtil.isNetWorkConnected(MyApplication.getInstance())) {
+			request.deliverError(new VolleyError(new NetworkError()));
+			return;
+		}
+		if (retryPolicy == null) {
+			retryPolicy = FastVolley.newShortRetryPolicy();
+		}
+		request.setRetryPolicy(retryPolicy);
+
+		request.setTag(getRequestTag(parentTag, request.getTag()));
+		mRequestQueue.add(request);
+	}
+
+	private static String getRequestTag(String parentTag, Object realTag) {
+		if (realTag == null) {
+			return parentTag;
+		} else {
+			return realTag + Integer.toHexString(realTag.hashCode());
+		}
+	}
+
+	public void cancelAll(String parentTag, Object tag) {
+		mRequestQueue.cancelAll(getRequestTag(parentTag, tag));
+	}
+
+	public void cancelAll(final String parentTag) {
+		mRequestQueue.cancelAll(new RequestQueue.RequestFilter() {
+			@Override
+			public boolean apply(Request<?> arg0) {
+				Object tag = arg0.getTag();
+				if (tag == null) {
+					return false;
+				}
+				if (tag instanceof String) {
+					return ((String) tag).indexOf(parentTag) != -1;
+				}
+				return false;
+			}
+		});
+	}
+
+	/* 请求一次,重试两次,最长请求时间可达30s,5s+10s+15s,普通接口使用此默认配置 */
+	public static DefaultRetryPolicy newDefaultRetryPolicy() {
+		return new DefaultRetryPolicy(5000, 2, 1);
+	}
+
+	/* 请求一次,重试0次,最长请求时间可达5s,一些很小的数据请求用此接口 */
+	public static DefaultRetryPolicy newShortRetryPolicy() {
+		return new DefaultRetryPolicy(5000, 0, 0);
+	}
+
+	// private RequestQueue mRequestQueue;
+	// public FastVolley(Context context) {
+	// mRequestQueue = Volley.newRequestQueue(context);
+	// mRequestQueue.start();
+	// }
+	//
+	// public void stop() {
+	// mRequestQueue.stop();
+	// }
+	//
+	// public void add(Request<?> request) {
+	// if (request == null) {
+	// return;
+	// }
+	// if (!MyApplication.getInstance().isNetworkActive()) {
+	// request.deliverError(new VolleyError(new NetworkError()));
+	// return;
+	// }
+	// mRequestQueue.add(request);
+	// }
+
+}

BIN
app_core/common/src/main/res/drawable-hdpi/account_avatar_bg.png


BIN
app_core/common/src/main/res/drawable-hdpi/account_icon.png


BIN
app_core/common/src/main/res/drawable-hdpi/actionbar_bg.9.png


BIN
app_core/common/src/main/res/drawable-hdpi/add_friend.png


BIN
app_core/common/src/main/res/drawable-hdpi/add_picture.png


BIN
app_core/common/src/main/res/drawable-hdpi/add_task.png


BIN
app_core/common/src/main/res/drawable-hdpi/aguanzu.png


BIN
app_core/common/src/main/res/drawable-hdpi/aguanzu_pass.png


BIN
app_core/common/src/main/res/drawable-hdpi/allegedlying.png


BIN
app_core/common/src/main/res/drawable-hdpi/appitem_del_btn_normal.png


BIN
app_core/common/src/main/res/drawable-hdpi/appitem_del_btn_pressed.png


BIN
app_core/common/src/main/res/drawable-hdpi/attendance_bg.png


BIN
app_core/common/src/main/res/drawable-hdpi/attendances_bg.png


BIN
app_core/common/src/main/res/drawable-hdpi/avatar_normal.png


BIN
app_core/common/src/main/res/drawable-hdpi/b2bs.png


BIN
app_core/common/src/main/res/drawable-hdpi/b2btixing.png


BIN
app_core/common/src/main/res/drawable-hdpi/back.png


BIN
app_core/common/src/main/res/drawable-hdpi/bakchat_check_list_progress.png


BIN
app_core/common/src/main/res/drawable-hdpi/bao.png


BIN
app_core/common/src/main/res/drawable-hdpi/bg.9.png


BIN
app_core/common/src/main/res/drawable-hdpi/bg1.png


BIN
app_core/common/src/main/res/drawable-hdpi/bg_face_sel.9.png


BIN
app_core/common/src/main/res/drawable-hdpi/biangeng.png


BIN
app_core/common/src/main/res/drawable-hdpi/blend_spinner_76_inner_holo.png


BIN
app_core/common/src/main/res/drawable-hdpi/blend_spinner_76_outer_holo.png


BIN
app_core/common/src/main/res/drawable-hdpi/bo.png


BIN
app_core/common/src/main/res/drawable-hdpi/boy.png


BIN
app_core/common/src/main/res/drawable-hdpi/boy_pass.png


BIN
app_core/common/src/main/res/drawable-hdpi/btn_back.png


BIN
app_core/common/src/main/res/drawable-hdpi/btn_yuyin_nor.png


BIN
app_core/common/src/main/res/drawable-hdpi/btn_yuyin_pressed.png


BIN
app_core/common/src/main/res/drawable-hdpi/business_manage.png


BIN
app_core/common/src/main/res/drawable-hdpi/butongyi.png


BIN
app_core/common/src/main/res/drawable-hdpi/cai.png


BIN
app_core/common/src/main/res/drawable-hdpi/calculator_delete.png


BIN
app_core/common/src/main/res/drawable-hdpi/camera_video.png


BIN
app_core/common/src/main/res/drawable-hdpi/chakan.png


BIN
app_core/common/src/main/res/drawable-hdpi/changyongyu.png


BIN
app_core/common/src/main/res/drawable-hdpi/chao.png


BIN
app_core/common/src/main/res/drawable-hdpi/chat_bg_blue_press.9.png


BIN
app_core/common/src/main/res/drawable-hdpi/chat_bg_white.9.png


BIN
app_core/common/src/main/res/drawable-hdpi/chat_bg_white_press.9.png


BIN
app_core/common/src/main/res/drawable-hdpi/chat_icon_voice1.png


BIN
app_core/common/src/main/res/drawable-hdpi/chat_icon_voice2.png


BIN
app_core/common/src/main/res/drawable-hdpi/chat_icon_voice3.png


BIN
app_core/common/src/main/res/drawable-hdpi/chat_icon_voice4.png


BIN
app_core/common/src/main/res/drawable-hdpi/chat_icon_voice5.png


BIN
app_core/common/src/main/res/drawable-hdpi/chat_icon_voice6.png


BIN
app_core/common/src/main/res/drawable-hdpi/chat_map_bg.png


BIN
app_core/common/src/main/res/drawable-hdpi/chat_top_voice_bg.9.png


BIN
app_core/common/src/main/res/drawable-hdpi/chatsystem_bg.9.png


BIN
app_core/common/src/main/res/drawable-hdpi/chu.png


BIN
app_core/common/src/main/res/drawable-hdpi/common_header_boy.png


BIN
app_core/common/src/main/res/drawable-hdpi/crm_left.png


BIN
app_core/common/src/main/res/drawable-hdpi/crm_right.png


BIN
app_core/common/src/main/res/drawable-hdpi/crms.png


BIN
app_core/common/src/main/res/drawable-hdpi/crmtixing.png


BIN
app_core/common/src/main/res/drawable-hdpi/da.png


BIN
app_core/common/src/main/res/drawable-hdpi/daibangongzuo.png


BIN
app_core/common/src/main/res/drawable-hdpi/dan.png


BIN
app_core/common/src/main/res/drawable-hdpi/dao.png


BIN
app_core/common/src/main/res/drawable-hdpi/defaultpic.png


BIN
app_core/common/src/main/res/drawable-hdpi/dele.png


BIN
app_core/common/src/main/res/drawable-hdpi/delete.png


BIN
app_core/common/src/main/res/drawable-hdpi/dg_btn_normal.9.png


BIN
app_core/common/src/main/res/drawable-hdpi/dg_btn_pressed.9.png


BIN
app_core/common/src/main/res/drawable-hdpi/dividing_line.png


BIN
app_core/common/src/main/res/drawable-hdpi/domo_toolbar_bg.png


BIN
app_core/common/src/main/res/drawable-hdpi/dot_avatar.png


BIN
app_core/common/src/main/res/drawable-hdpi/down.png


BIN
app_core/common/src/main/res/drawable-hdpi/edit.png


BIN
app_core/common/src/main/res/drawable-hdpi/em_add_friend.png


BIN
app_core/common/src/main/res/drawable-hdpi/email.png


BIN
app_core/common/src/main/res/drawable-hdpi/end_meeting.png


BIN
app_core/common/src/main/res/drawable-hdpi/end_meeting_pass.png


BIN
app_core/common/src/main/res/drawable-hdpi/ex_icon_share_nor.png


BIN
app_core/common/src/main/res/drawable-hdpi/expense_tishi_detail.png


BIN
app_core/common/src/main/res/drawable-hdpi/f_u.png


BIN
app_core/common/src/main/res/drawable-hdpi/fa.png


BIN
app_core/common/src/main/res/drawable-hdpi/feed_main_player_play.png


BIN
app_core/common/src/main/res/drawable-hdpi/file.png


BIN
app_core/common/src/main/res/drawable-hdpi/filter.png


BIN
app_core/common/src/main/res/drawable-hdpi/folder.png


BIN
app_core/common/src/main/res/drawable-hdpi/for_dyy.png


BIN
app_core/common/src/main/res/drawable-hdpi/friend_prialy_top.png


Some files were not shown because too many files changed in this diff