raomeng 8 лет назад
Родитель
Сommit
ff95666c33
71 измененных файлов с 930 добавлено и 357 удалено
  1. 0 4
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/ADActivity.java
  2. 0 12
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/net/HttpUtil.java
  3. 5 58
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/me/MeFragment.java
  4. 4 1
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/message/ChatActivity.java
  5. 0 5
      WeiChat/src/main/java/com/xzjmyk/pm/activity/util/oa/AutoErpService.java
  6. 0 6
      WeiChat/src/main/java/com/xzjmyk/pm/activity/util/oa/DepositNoticeUtil.java
  7. 11 22
      WeiChat/src/main/java/com/xzjmyk/pm/activity/video/VideoActivity.java
  8. 5 5
      WeiChat/version.properties
  9. BIN
      app_core/common/libs/tbs_sdk_thirdapp_v3.2.0.1104_43200_sharewithdownload_withfilereader_withoutGame_obfs_20170609_115346.jar
  10. 3 3
      app_core/common/src/main/java/com/common/LogUtil.java
  11. 11 1
      app_core/common/src/main/java/com/core/app/Constants.java
  12. 19 1
      app_core/common/src/main/java/com/core/app/MyApplication.java
  13. 4 2
      app_core/common/src/main/java/com/core/db/DBOpenHelper.java
  14. 12 0
      app_core/common/src/main/java/com/core/db/DatabaseTables.java
  15. 0 2
      app_core/common/src/main/java/com/core/net/http/http/OAHttpHelper.java
  16. 0 8
      app_core/common/src/main/java/com/core/net/location/BdLocationHelper.java
  17. 42 11
      app_core/common/src/main/java/com/core/xmpp/FriendHelper.java
  18. 36 0
      app_core/common/src/main/java/com/core/xmpp/dao/FriendDao.java
  19. 0 26
      app_core/network/src/androidTest/java/base/android/com/network/ExampleInstrumentedTest.java
  20. 0 26
      app_modular/appbooking/src/androidTest/java/base/android/com/appbooking/ExampleInstrumentedTest.java
  21. 8 1
      app_modular/appcontact/src/main/java/com/uas/appcontact/adapter/FriendSortAdapter.java
  22. 143 0
      app_modular/appcontact/src/main/java/com/uas/appcontact/db/TopContactsDao.java
  23. 5 0
      app_modular/appcontact/src/main/java/com/uas/appcontact/manager/ContactsManager.java
  24. 73 0
      app_modular/appcontact/src/main/java/com/uas/appcontact/model/TopContacts.java
  25. 7 1
      app_modular/appcontact/src/main/java/com/uas/appcontact/ui/activity/CompanyContactsActivity.java
  26. 6 0
      app_modular/appcontact/src/main/java/com/uas/appcontact/ui/activity/MyFriendActivity.java
  27. 1 1
      app_modular/appcontact/src/main/java/com/uas/appcontact/ui/fragment/ContactsFragment.java
  28. 1 1
      app_modular/appme/build.gradle
  29. 11 4
      app_modular/appme/src/main/java/com/uas/appme/other/activity/BasicInfoActivity.java
  30. 11 19
      app_modular/appme/src/main/java/com/uas/appme/settings/activity/AboutActivity.java
  31. 3 2
      app_modular/appme/src/main/java/com/uas/appme/settings/activity/BaseInfoActivity.java
  32. 0 2
      app_modular/appmessages/src/main/java/com/modular/appmessages/activity/AppWebViewActivity.java
  33. 0 1
      app_modular/appmessages/src/main/java/com/modular/appmessages/activity/ApprovalActivity.java
  34. 0 4
      app_modular/appmessages/src/main/java/com/modular/appmessages/presenter/MessagePresenter.java
  35. 1 3
      app_modular/apputils/build.gradle
  36. 9 8
      app_modular/apputils/src/main/AndroidManifest.xml
  37. 11 15
      app_modular/apputils/src/main/java/com/modular/apputils/IntentUrlActivity.java
  38. 1 2
      app_modular/apputils/src/main/java/com/modular/apputils/activity/BaseNetActivity.java
  39. 120 63
      app_modular/apputils/src/main/java/com/modular/apputils/activity/SimpleWebActivity.java
  40. 4 3
      app_modular/apputils/src/main/res/layout/activity_simple_web.xml
  41. 14 2
      app_modular/appworks/src/main/AndroidManifest.xml
  42. 0 1
      app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/AddBusinessActivity.java
  43. 0 1
      app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/ScanDetailActivity.java
  44. 0 1
      app_modular/appworks/src/main/java/com/uas/appworks/OA/platform/activity/PurchaseDetailsActivity.java
  45. 1 27
      app_modular/appworks/src/main/java/com/uas/appworks/OA/platform/adapter/ActivityAdapter.java
  46. 0 1
      app_modular/appworks/src/main/java/com/uas/appworks/OA/platform/adapter/AutoPlayPagerAdapter.java
  47. 2 1
      app_modular/appworks/src/main/java/com/uas/appworks/OA/platform/adapter/PurchaseDetailsAdapter.java
  48. 2 0
      app_modular/appworks/src/main/res/layout/item_btn.xml
  49. 1 0
      app_third/librarytbs/.gitignore
  50. 24 0
      app_third/librarytbs/build.gradle
  51. 25 0
      app_third/librarytbs/proguard-rules.pro
  52. 25 0
      app_third/librarytbs/src/main/AndroidManifest.xml
  53. 200 0
      app_third/librarytbs/src/main/java/com/yifeng/sample/tbs/TBSFilesActivity.java
  54. BIN
      app_third/librarytbs/src/main/jniLibs/armeabi/liblbs.so
  55. 18 0
      app_third/librarytbs/src/main/res/layout/activity_index.xml
  56. 11 0
      app_third/librarytbs/src/main/res/layout/activity_tbsfile.xml
  57. BIN
      app_third/librarytbs/src/main/res/mipmap-hdpi/ic_launcher.png
  58. BIN
      app_third/librarytbs/src/main/res/mipmap-hdpi/ic_launcher_round.png
  59. BIN
      app_third/librarytbs/src/main/res/mipmap-mdpi/ic_launcher.png
  60. BIN
      app_third/librarytbs/src/main/res/mipmap-mdpi/ic_launcher_round.png
  61. BIN
      app_third/librarytbs/src/main/res/mipmap-xhdpi/ic_launcher.png
  62. BIN
      app_third/librarytbs/src/main/res/mipmap-xhdpi/ic_launcher_round.png
  63. BIN
      app_third/librarytbs/src/main/res/mipmap-xxhdpi/ic_launcher.png
  64. BIN
      app_third/librarytbs/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
  65. BIN
      app_third/librarytbs/src/main/res/mipmap-xxxhdpi/ic_launcher.png
  66. BIN
      app_third/librarytbs/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
  67. 6 0
      app_third/librarytbs/src/main/res/values/colors.xml
  68. 3 0
      app_third/librarytbs/src/main/res/values/strings.xml
  69. 11 0
      app_third/librarytbs/src/main/res/values/styles.xml
  70. 18 0
      app_third/librarytbs/src/test/java/com/yifeng/sample/tbs/ExampleUnitTest.java
  71. 2 0
      settings.gradle

+ 0 - 4
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/ADActivity.java

@@ -97,19 +97,15 @@ public class ADActivity extends BaseActivity {
                 switch (checkedId) {
                     case R.id.rb1:
                         item = 0;
-                        LogUtil.i("R.id.rb1");
                         break;
                     case R.id.rb2:
                         item = 1;
-                        LogUtil.i("R.id.rb2");
                         break;
                     case R.id.rb3:
                         item = 2;
-                        LogUtil.i("R.id.rb3");
                         break;
                     case R.id.rb4:
                         item = 3;
-                        LogUtil.i("R.id.rb4");
                         break;
                 }
                 ad_vp.setCurrentItem(item);

+ 0 - 12
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/net/HttpUtil.java

@@ -158,7 +158,6 @@ public class HttpUtil {
     public static Response httpPostWithJSON(String url, String json) throws Exception {
         // 将JSON进行UTF-8编码,以便传输中文
         String encoderJson = URLEncoder.encode(json, HTTP.UTF_8);
-        LogUtil.i("json=" + json);
         DefaultHttpClient httpClient = new DefaultHttpClient();
         HttpPost httpPost = new HttpPost(url);
         httpPost.addHeader(HTTP.CONTENT_TYPE, APPLICATION_JSON);
@@ -318,7 +317,6 @@ public class HttpUtil {
 
     private static void onFileLoadResult(final String filePath,    final OpenFilesUtils.OnFileLoadListener onFileLoadListener) {
         boolean ok;
-        LogUtil.i("filePath=" + filePath);
         if (!StringUtil.isEmpty(filePath) && new File(filePath).exists()) {
             ok = true;
         } else {
@@ -370,16 +368,12 @@ public class HttpUtil {
 
             final int file_leng = connection.getContentLength();
             InputStream bin = connection.getInputStream();
-            LogUtil.i("path=" + path);
-            LogUtil.i("fileName=" + fileName);
             File file = new File(path);
             if (!file.exists()) {
-                LogUtil.i("!file.exists()");
                 file.mkdirs();
             }
             file = new File(path + "/" + fileName);
             if (!file.exists()) {
-                LogUtil.i("!file.exists()2");
                 file.createNewFile();
             }
             OutputStream out = new FileOutputStream(file);
@@ -397,34 +391,28 @@ public class HttpUtil {
                         onFileLoadListener.onLoadIng(finalLen * 100, file_leng);
                     }
                 });
-                LogUtil.i("下载了=" + len * 100 / file_leng);
             }
             bin.close();
             out.close();
             return path + "/" + fileName;
         } catch (MalformedURLException e) {
             if (e != null) {
-                LogUtil.i("MalformedURLException=" + e.getMessage());
                 return e.getMessage();
             }
         } catch (IOException e) {
             if (e != null) {
-                LogUtil.i("IOException=" + e.getMessage());
                 return e.getMessage();
             }
         } catch (NoSuchAlgorithmException e) {
             if (e != null) {
-                LogUtil.i("NoSuchAlgorithmException=" + e.getMessage());
                 return e.getMessage();
             }
         } catch (KeyManagementException e) {
             if (e != null) {
-                LogUtil.i("KeyManagementException=" + e.getMessage());
                 return e.getMessage();
             }
         } catch (Exception e) {
             if (e != null) {
-                LogUtil.i("Exception=" + e.getMessage());
                 return e.getMessage();
             }
         }

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

@@ -36,7 +36,6 @@ import com.core.app.MyApplication;
 import com.core.broadcast.MsgBroadcast;
 import com.core.net.http.ViewUtil;
 import com.core.utils.FlexJsonUtil;
-import com.core.utils.NotificationManage;
 import com.core.utils.ToastUtil;
 import com.core.utils.helper.AvatarHelper;
 import com.lidroid.xutils.view.annotation.ViewInject;
@@ -262,24 +261,11 @@ public class MeFragment extends EasyFragment implements View.OnClickListener {
         }
     }
 
-    //    private String getImageUrl(int id) {
-//        return CommonUtil.getAppBaseUrl(ct) + "common/downloadbyId.action?id=" + id + "&sessionId=" +
-//                CommonUtil.getSharedPreferences(ct, "sessionId") +
-//                "&sessionUser=" + CommonUtil.getSharedPreferences(ct, "erp_username") +
-//                "&master=" + CommonUtil.getSharedPreferences(ct, "erp_master");
-//    }
+
     private static final String TAG = "MeFragment";
 
     private void initView() {
-        LogUtil.d(TAG, "initView()");
         ct = getActivity();
-
-//       new Thread(new Runnable() {
-//           @Override
-//           public void run() {
-//               ContactsUtils.testAddContact();
-//           }
-//       }).start();
         findViewById(R.id.my_data_rl).setOnClickListener(this);
         findViewById(R.id.my_friend_rl).setOnClickListener(this);
         findViewById(R.id.my_space_rl).setOnClickListener(this);
@@ -365,8 +351,9 @@ public class MeFragment extends EasyFragment implements View.OnClickListener {
         picture_selector_rl.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
-                NotificationManage notificationManage = new NotificationManage();
-                notificationManage.sendNotification(MyApplication.getInstance(), "UU互联通知测试消息!", MainActivity.class);
+              startActivity(new Intent("com.modular.apputils.activity.SimpleWebActivity")
+              .putExtra("url","http://qq784602719.imwork.net:13767/Chapter/")
+              );
             }
         });
         picture_selector_rl.setOnLongClickListener(new View.OnLongClickListener() {
@@ -434,10 +421,6 @@ public class MeFragment extends EasyFragment implements View.OnClickListener {
                     changeMaster();
                 }
                 break;
-            case R.id.my_data_rl:// 我的资料
-                //作废
-                //  startActivityForResult(new Intent(getActivity(), BasicInfoEditActivity.class), 1);
-                break;
             case my_friend_rl://我的朋友圈
                 setChangerRemain(true);
                 MainActivity.isUnReadWork = false;
@@ -453,43 +436,7 @@ public class MeFragment extends EasyFragment implements View.OnClickListener {
                 tv_oa_desc.setVisibility(View.GONE);
                 iv_desc_oa.setVisibility(View.GONE);
                 break;
-//            case R.id.app_scan_code_rl://APP二维码
-//                ImageView imageView = new ImageView(getActivity());
-//                imageView.setImageResource(R.drawable.ic_uu_scan_code);
-//                MaterialDialog materialDialog = new MaterialDialog.Builder(getActivity())
-//                        .title("UU互联最新版二维码\n长按可识别")
-//                        .customView(imageView, false)
-//                        .titleGravity(GravityEnum.CENTER)
-//                        .show();
-//                final Bitmap bitmap = ((BitmapDrawable) imageView.getDrawable()).getBitmap();
-//                imageView.setOnLongClickListener(new View.OnLongClickListener() {
-//                    @Override
-//                    public boolean onLongClick(View v) {
-//                        CodeUtils.analyzeBitmap(bitmap, new CodeUtils.AnalyzeCallback() {
-//                            @Override
-//                            public void onAnalyzeSuccess(Bitmap mBitmap, String result) {
-//                                Intent intent = new Intent();
-//                                intent.setClass(getActivity(), CommonWebviewActivity.class);
-//                                intent.putExtra("scan_url", result);
-//                                Log.d("image_url", result);
-//                                startActivity(intent);
-//                            }
-//
-//                            @Override
-//                            public void onAnalyzeFailed() {
-//
-//                            }
-//                        });
-//                        return false;
-//                    }
-//                });
-//                break;
-//            case R.id.app_drafts_rl:
-//                ToastUtil.showToast(getActivity(), "新功能未上线!请期待!");
-//                break;
-//            case R.id.app_friend_rl:
-//
-//                break;
+
         }
     }
 

+ 4 - 1
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/message/ChatActivity.java

@@ -29,6 +29,7 @@ import android.widget.Toast;
 import com.alibaba.fastjson.JSON;
 import com.android.volley.Response;
 import com.android.volley.VolleyError;
+import com.common.LogUtil;
 import com.common.data.CalendarUtil;
 import com.common.data.ListUtils;
 import com.common.preferences.PreferenceUtils;
@@ -63,6 +64,7 @@ import com.core.xmpp.widget.ChatContentView;
 import com.core.xmpp.widget.PullDownListView;
 import com.uas.appcontact.R;
 import com.nostra13.universalimageloader.core.ImageLoader;
+import com.uas.appcontact.db.TopContactsDao;
 
 import java.io.File;
 import java.util.ArrayList;
@@ -515,7 +517,8 @@ public class ChatActivity extends ActionBackActivity
             sendPushTask(mLoginUserId, mFriend.getUserId(), message.getContent());
 
         }
-        FriendHelper.addGoodFriend(this,mFriend);
+        LogUtil.i("发送聊天\n"+JSON.toJSONString(mFriend));
+        TopContactsDao.api().addGoodFriend(mFriend);
     }
 
     private UploadEngine.ImFileUploadResponse mUploadResponse = new UploadEngine.ImFileUploadResponse() {

+ 0 - 5
WeiChat/src/main/java/com/xzjmyk/pm/activity/util/oa/AutoErpService.java

@@ -101,7 +101,6 @@ public class AutoErpService extends Service {
 
 	@Override
 	public int onStartCommand(Intent intent, int flags, int startId) {
-		LogUtil.i("onStartCommand");
 		try {
 			initBroadcast();//初始化广播接受器
 			initDB();//初始化数据库数据,1.删除昨天数据   2.下拉当天数据
@@ -114,7 +113,6 @@ public class AutoErpService extends Service {
 
 	@Override
 	public void onDestroy() {
-		LogUtil.i("onDestroy");
 		super.onDestroy();
 		LocalBroadcastManager.getInstance(MyApplication.getInstance()).unregisterReceiver(updateReceiver);
 		//TODO 获取此刻精确时间并转换为yyyy-MM-dd HH:mm:ss
@@ -168,18 +166,15 @@ public class AutoErpService extends Service {
 						}
 						dnotice = true;
 						isDNoticeRuning = true;
-						LogUtil.i("startDNoticeTask Runnable");
 						int i = DNOTICE_ITER - 1;
 						Log.i("dnoticeIter", dnoticeIter + "");
 
 						if (dnoticeIter == i) {
-							LogUtil.i("dnoticeIter == i");
 //                            MyApplication.getInstance().getBdLocationHelper().requestLocation();   // 暂时去掉定位
 						}
 						if (dnoticeIter == 0 || dnoticeIter == DNOTICE_ITER) {
 							dnoticeIter = 0;
 							//TODO 修改
-							LogUtil.i("dnoticeIter == 0 || dnoticeIter == DNOTICE_ITER");
 							DepositNoticeUtil.isNoticeTime(mSureBookModel);
 
 						}

+ 0 - 6
WeiChat/src/main/java/com/xzjmyk/pm/activity/util/oa/DepositNoticeUtil.java

@@ -133,7 +133,6 @@ public class DepositNoticeUtil {
 /*            LatLng latLng = new LatLng(Double.valueOf(model.getAb_latitude()), Double.valueOf(model.getAb_longitude()));
             float distance = BaiduMapUtil.getInstence().autoDistance(latLng);
             if (distance == -1f) {
-                LogUtil.i("distance == -1f");
                 continue;
             }*/
             if (model.getAb_starttime().compareTo(TimeUtils.f_long_2_str(System.currentTimeMillis())) > 0) {
@@ -155,8 +154,6 @@ public class DepositNoticeUtil {
         } else {
             Log.i("notificationManage", "提醒时间不符合");
         }
-        LogUtil.i("startNoticeTime=" + TimeUtils.f_long_2_str(startNoticeTime));
-        LogUtil.i("System.currentTimeMillis()=" + TimeUtils.f_long_2_str(System.currentTimeMillis()));
     }
 
     public static List<SureBookModel> getsureBookData() {
@@ -202,9 +199,6 @@ public class DepositNoticeUtil {
                             } else {
                                 Log.i("notificationManage", "提醒时间不符合");
                             }
-                            LogUtil.i("minTime=" + minTime);
-                            LogUtil.i("startNoticeTime=" + TimeUtils.f_long_2_str(startNoticeTime));
-                            LogUtil.i("System.currentTimeMillis()=" + TimeUtils.f_long_2_str(System.currentTimeMillis()));
                         } catch (Exception e) {
                             if (e != null)
                                 Log.i("setStartime Exception=", e.getMessage() + "");

+ 11 - 22
WeiChat/src/main/java/com/xzjmyk/pm/activity/video/VideoActivity.java

@@ -132,8 +132,7 @@ public class VideoActivity extends BaseActivity implements MediaRecorder.OnError
         try {
             mCamera = Camera.open();
         } catch (Exception e) {
-            if (e != null)
-                LogUtil.i("initCamera Exception=" + e.getMessage());
+
             freeCameraResource();
             Toast.makeText(MyApplication.getInstance(), "权限未开启,请检查", Toast.LENGTH_SHORT);
             finish();
@@ -192,11 +191,9 @@ public class VideoActivity extends BaseActivity implements MediaRecorder.OnError
                 releaseRecord();
             }
         } catch (IOException e) {
-            if (e != null)
-                LogUtil.i("IOException==" + e.getMessage());
+
         } catch (Exception e) {
-            if (e != null)
-                LogUtil.i("Exception==" + e.getMessage());
+
         }
     }
 
@@ -221,14 +218,11 @@ public class VideoActivity extends BaseActivity implements MediaRecorder.OnError
                 mMediaRecorder.stop();
                 mMediaRecorder.reset();
             } catch (IllegalStateException e) {
-                if (e != null)
-                    LogUtil.i("IllegalStateException==" + e.getMessage());
+
             } catch (RuntimeException e) {
-                if (e != null)
-                    LogUtil.i("RuntimeException==" + e.getMessage());
+
             } catch (Exception e) {
-                if (e != null)
-                    LogUtil.i("Exception==" + e.getMessage());
+
             }
         }
     }
@@ -285,12 +279,10 @@ public class VideoActivity extends BaseActivity implements MediaRecorder.OnError
         try {
             mMediaRecorder.prepare();
         } catch (IllegalStateException e) {
-            if (e != null)
-                LogUtil.i("IllegalStateException==" + e.getMessage());
+
             return false;
         } catch (IOException e) {
-            if (e != null)
-                LogUtil.i("IOException==" + e.getMessage());
+
             return false;
         }
         return true;
@@ -303,11 +295,9 @@ public class VideoActivity extends BaseActivity implements MediaRecorder.OnError
             if (mr != null)
                 mr.reset();
         } catch (IllegalStateException e) {
-            if (e != null)
-                LogUtil.i("IllegalStateException==" + e.getMessage());
+
         } catch (Exception e) {
-            if (e != null)
-                LogUtil.i("IllegalStateException==" + e.getMessage());
+
         }
     }
 
@@ -322,8 +312,7 @@ public class VideoActivity extends BaseActivity implements MediaRecorder.OnError
             try {
                 initCamera();
             } catch (IOException e) {
-                if (e != null)
-                    LogUtil.i("IOException==" + e.getMessage());
+
             }
         }
 

+ 5 - 5
WeiChat/version.properties

@@ -1,5 +1,5 @@
-#Wed Jan 24 11:47:36 CST 2018
-debugName=563
-versionName=625
-debugCode=563
-versionCode=164
+#Tue Jan 23 17:51:35 CST 2018
+debugName=135
+versionName=613
+debugCode=135
+versionCode=152

BIN
app_core/common/libs/tbs_sdk_thirdapp_v3.2.0.1104_43200_sharewithdownload_withfilereader_withoutGame_obfs_20170609_115346.jar


+ 3 - 3
app_core/common/src/main/java/com/common/LogUtil.java

@@ -102,14 +102,14 @@ public class LogUtil {
 				for (int i = 0; i <= chunkCount; i++) {
 					int max = 3000 * (i + 1);
 					if (max >= responseInfo.length()) {
-						Log.v(TAG, "【chunk " + i + " of " + chunkCount + "】:" + responseInfo.substring(3000 * i));
+						Log.i(TAG, "【chunk " + i + " of " + chunkCount + "】:" + responseInfo.substring(3000 * i));
 					} else {
-						Log.v(TAG, "【chunk " + i + " of " + chunkCount + "】:" + responseInfo.substring(3000 * i, max));
+						Log.i(TAG, "【chunk " + i + " of " + chunkCount + "】:" + responseInfo.substring(3000 * i, max));
 					}
 				}
 			} else {
 				Log.v(TAG, "sb.length = " + responseInfo.length());
-				Log.v(TAG, responseInfo.toString());
+				Log.i(TAG, responseInfo.toString());
 			}
 		}
 

+ 11 - 1
app_core/common/src/main/java/com/core/app/Constants.java

@@ -17,7 +17,6 @@ public class Constants {
         String url = "";
         if (BaseConfig.isDebug()) {
             url = IM_BASE_URL_TEST;
-            url = IM_BASE_URL;
         } else {
             url = IM_BASE_URL;
         }
@@ -320,6 +319,17 @@ public class Constants {
             + "," + DatabaseTables.UUHelperTable.Cols.TYPE
             + ")";
 
+    //TopContactsTable
+    public static final String TABLE_TOPCONTACTS_RECORD = "create table "
+            + DatabaseTables.TopContactsTable.NAME + "("
+            + DatabaseTables.TopContactsTable.Cols.USER_ID
+            + "," + DatabaseTables.TopContactsTable.Cols.OWNER_ID
+            + "," + DatabaseTables.TopContactsTable.Cols.PHONE
+            + "," + DatabaseTables.TopContactsTable.Cols.NAME
+            + "," + DatabaseTables.TopContactsTable.Cols.EM_CODE
+            + "," + DatabaseTables.TopContactsTable.Cols.LAST_TIME
+            + "," + DatabaseTables.TopContactsTable.Cols.STATUS
+            + ")";
     public static String IS_NOTIFICATION = "is_notification";//是是否进行通知
     /**
      * @desc:常量

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

@@ -33,6 +33,7 @@ import com.nostra13.universalimageloader.core.DisplayImageOptions;
 import com.nostra13.universalimageloader.core.ImageLoader;
 import com.nostra13.universalimageloader.core.ImageLoaderConfiguration;
 import com.nostra13.universalimageloader.core.assist.QueueProcessingType;
+import com.tencent.smtt.sdk.QbSdk;
 
 import org.apache.http.cookie.Cookie;
 
@@ -109,14 +110,31 @@ public class MyApplication extends BaseApplication {
 
         mHttpUtils = new HttpUtils();
         configHttpUtils();
-
         // 初始化定位
         getBdLocationHelper();
         // 初始化App目录
         initAppDir();
         // 初始化图片加载
         initImageLoader();
+        //搜集本地tbs内核信息并上报服务器,服务器返回结果决定使用哪个内核。
+
+        QbSdk.PreInitCallback cb = new QbSdk.PreInitCallback() {
 
+            @Override
+            public void onViewInitFinished(boolean arg0) {
+                // TODO Auto-generated method stub
+                //x5內核初始化完成的回调,为true表示x5内核加载成功,否则表示x5内核加载失败,会自动切换到系统内核。
+                Log.d("app", " onViewInitFinished is " + arg0);
+            }
+
+            @Override
+            public void onCoreInitFinished() {
+                // TODO Auto-generated method stub
+            }
+        };
+        //x5内核初始化接口
+        QbSdk.initX5Environment(getApplicationContext(),  cb);
+  
         // 初始化网络监听
         mNetWorkObservable = new NetWorkObservable(this);
 

+ 4 - 2
app_core/common/src/main/java/com/core/db/DBOpenHelper.java

@@ -13,8 +13,8 @@ import com.core.app.Constants;
  * @注释:建立数据库
  */
 public class DBOpenHelper extends SQLiteOpenHelper {
-    //TODO  上一个发布版本是88
-    private static final int DATABASE_VERSION = 89;
+    //TODO  上一个发布版本是89
+    private static final int DATABASE_VERSION = 90;
     public static String dataBaseName = "erp.db";
     public Context context;
 
@@ -57,6 +57,7 @@ public class DBOpenHelper extends SQLiteOpenHelper {
 //            db.execSQL(Constants.TRACK_POINT); //运行轨迹,实时定位点记录表
             db.execSQL(Constants.TABLE_HISTORICAL_RECORD);//数据查询历史记录表
             db.execSQL(Constants.TABLE_UUHELPER_RECORD);//UU助手
+            db.execSQL(Constants.TABLE_TOPCONTACTS_RECORD);//常用联系人
             db.execSQL(Constants.STEPRANKING_FIRST); //用于存贮每天UU运动排名第一相关的数据表
         } catch (Exception e) {
 
@@ -101,6 +102,7 @@ public class DBOpenHelper extends SQLiteOpenHelper {
 //        db.execSQL("DROP TABLE IF EXISTS trackPoint");
         db.execSQL("DROP TABLE IF EXISTS " + DatabaseTables.HistoricalRecordTable.NAME);
         db.execSQL("DROP TABLE IF EXISTS " + DatabaseTables.UUHelperTable.NAME);
+        db.execSQL("DROP TABLE IF EXISTS " + DatabaseTables.TopContactsTable.NAME);
         db.execSQL("DROP TABLE IF EXISTS StepRankingFirst");
     }
 

+ 12 - 0
app_core/common/src/main/java/com/core/db/DatabaseTables.java

@@ -32,4 +32,16 @@ public interface DatabaseTables {
             String TYPE = "type";
         }
     }
+    interface TopContactsTable {
+        String NAME = "top_contacts";
+        interface Cols {
+            String USER_ID = "userId";
+            String OWNER_ID = "ownerId";
+            String PHONE = "phone";
+            String NAME = "name";
+            String EM_CODE = "emCode";
+            String LAST_TIME = "lastTime";
+            String STATUS = "status";
+        }
+    }
 }

+ 0 - 2
app_core/common/src/main/java/com/core/net/http/http/OAHttpHelper.java

@@ -54,8 +54,6 @@ public class OAHttpHelper extends Handler {
     @Override
     public void handleMessage(Message msg) {
         try {
-            LogUtil.i("handleMessage");
-            LogUtil.i("msg="+ JSON.toJSONString(msg));
             OnHttpResultListener listener = (OnHttpResultListener) msg.getData().getSerializable("listener");
             if (listener == null) return;
             Bundle bundle = msg.getData();

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

@@ -112,8 +112,6 @@ public class BdLocationHelper {
 			try {
 				setLocation(location);
 			} catch (Exception e) {
-				if (e != null)
-					LogUtil.i("onReceiveLocation Exception" + e.getMessage());
 				clearLocation();
 			}
 		}
@@ -127,7 +125,6 @@ public class BdLocationHelper {
 				) {
 			//定位成功
 			mLocationClient.stop();
-			LogUtil.i("定位成功" + location.getLocType());
 			locationOk = true;
 			latLng = new LatLng(location.getLatitude(), location.getLongitude());
 			this.location = location.getLocationDescribe();
@@ -150,22 +147,17 @@ public class BdLocationHelper {
 		} else {
 			//统一为定位失败
 			locationOk = false;
-			LogUtil.i("定位失败");
 			if (location.getLocType() == BDLocation.TypeServerError) {
 				//服务端网络定位失败,可以反馈IMEI号和大体定位时间到loc-bugs@baidu.com,会有人追查原因
 				errorMessage = "服务端网络定位失败";
-				LogUtil.i("服务端网络定位失败");
 			} else if (location.getLocType() == BDLocation.TypeNetWorkException) {
 				//网络不同导致定位失败,请检查网络是否通畅
 				errorMessage = "网络不同导致定位失败,请检查网络是否通畅";
-				LogUtil.i("网络不同导致定位失败,请检查网络是否通畅");
 			} else if (location.getLocType() == BDLocation.TypeCriteriaException) {
 				//无法获取有效定位依据导致定位失败,一般是由于手机的原因,处于飞行模式下一般会造成这种结果,可以试着重启手机
 				errorMessage = "无法获取有效定位依据导致定位失败";
-				LogUtil.i("无法获取有效定位依据导致定位失败");
 			} else {
 				errorMessage = "未知错误";
-				LogUtil.i("未知错误");
 			}
 			if (mFaildCount < 3) {
 				mFaildCount++;

+ 42 - 11
app_core/common/src/main/java/com/core/xmpp/FriendHelper.java

@@ -3,6 +3,7 @@ package com.core.xmpp;
 import android.content.Context;
 import android.content.Intent;
 
+import com.alibaba.fastjson.JSON;
 import com.android.volley.Response.ErrorListener;
 import com.android.volley.VolleyError;
 import com.common.LogUtil;
@@ -12,10 +13,12 @@ import com.core.broadcast.MsgBroadcast;
 import com.core.model.AttentionUser;
 import com.core.model.CircleMessage;
 import com.core.model.Friend;
+import com.core.model.Hrorgs;
 import com.core.net.volley.ArrayResult;
 import com.core.net.volley.FastVolley;
 import com.core.net.volley.Result;
 import com.core.net.volley.StringJsonArrayRequest;
+import com.core.utils.sortlist.BaseSortModel;
 import com.core.utils.sp.TableVersionSp;
 import com.core.xmpp.dao.ChatMessageDao;
 import com.core.xmpp.dao.CircleMessageDao;
@@ -121,25 +124,52 @@ public class FriendHelper {
         MsgBroadcast.broadcastMsgNumReset(MyApplication.getInstance());
     }
 
+    public static void addGoodFriend(Context context, Hrorgs.Employee employee) {
+        if (employee != null) {
+            Friend friend = new Friend();
+            friend.setTimeCreate((int) (System.currentTimeMillis() / 1000));
+            friend.setTimeSend((int) (System.currentTimeMillis() / 1000));
+            friend.setOwnerId(MyApplication.getInstance().getLoginUserId());
+            friend.setUserId(String.valueOf(employee.em_imid));
+            friend.setNickName(employee.em_name);
+            friend.setPhone(employee.em_mobile);
+            friend.setEmCode(employee.em_code);
+            friend.setRoomFlag(0);// 0朋友 1群组
+            friend.setStatus(Friend.STATUS_FRIEND);
+            BaseSortModel<Friend> mode = new BaseSortModel<>();
+            mode.setBean(friend);
+            addGoodFriend(context, friend);
+        }
+    }
+
     /**
      * 添加常用
+     * 1.拨打电话
+     * 2.发送聊天信息
      */
-    public static void addGoodFriend(Context context,Friend friend) {
-        if (friend != null && friend.getClickNum() < 10) {
-            int lastMagSend = friend.getTimeSend();
-            int defTime = ((int) System.currentTimeMillis() / 1000) - lastMagSend;
-            if (defTime<86400){
-                friend.setClickNum(10);
-                boolean b=FriendDao.getInstance().createOrUpdateFriend(friend);
-                if (b&&context!=null){
-                    Intent intent = new Intent("com.app.home.update");
-                    intent.putExtra("isGood", true);
-                    context.sendBroadcast(intent);
+    public static void addGoodFriend(Context context, Friend friend) {
+        if (friend != null) {
+            String ownId = MyApplication.getInstance().getLoginUserId();
+            LogUtil.i("ownId== " + ownId);
+            LogUtil.i("friendid== " + friend.getUserId());
+            Friend updateFriend = FriendDao.getInstance().getFriend(ownId, friend.getUserId());
+            if (updateFriend == null) {
+                friend.setTimeSend( (int) (System.currentTimeMillis() / 1000));
+                FriendDao.getInstance().createFriend(friend);
+            } else {
+                LogUtil.i("updateFriend==elseelseelse");
+                int lastMagSend = updateFriend.getTimeSend();
+                int defTime = ((int) System.currentTimeMillis() / 1000) - lastMagSend;
+                if (defTime < 86400) {
+                    FriendDao.getInstance().updateClickNum(ownId, friend.getUserId(), 10);
+                } else {
+                    FriendDao.getInstance().updateSendTime(ownId, friend.getUserId(), (int) (System.currentTimeMillis() / 1000));
                 }
             }
         }
     }
 
+
     /**
      * 在本地数据库表中出入一条关注记录,额外需要做的操作
      */
@@ -161,6 +191,7 @@ public class FriendHelper {
         // 更新Main Ui message 未读数量
         MsgBroadcast.broadcastMsgNumUpdate(MyApplication.getInstance(), true, 1);
     }
+
     /**
      * 如果关注或加好友某个人,那么就去下载他的商务圈消息
      *

+ 36 - 0
app_core/common/src/main/java/com/core/xmpp/dao/FriendDao.java

@@ -5,6 +5,7 @@ import android.os.Handler;
 import android.text.TextUtils;
 import android.util.Log;
 
+import com.common.LogUtil;
 import com.core.app.R;
 import com.common.data.CalendarUtil;
 import com.core.app.MyApplication;
@@ -1172,6 +1173,41 @@ public class FriendDao {
         ).start();
     }
 
+    public int createFriend(Friend friend) {
+        try {
+            int status = friendDao.create(friend);
+            return status;
+        } catch (SQLException e) {
+            e.printStackTrace();
+        }
+        return -1;
+    }
+    public void updateSendTime(String ownerId, String friendId, int sendTime) {
+        UpdateBuilder<Friend, Integer> builder = friendDao.updateBuilder();
+        try {
+            builder.where().eq("ownerId", ownerId).and().eq("userId", friendId);
+            builder.updateColumnValue("timeSend", sendTime);
+            int e = friendDao.update(builder.prepare());
+            LogUtil.i("updateSendTime e=" + e);
+        } catch (SQLException e) {
+            e.printStackTrace();
+            LogUtil.i("e=" + e.getMessage());
+        }
+    }
+
+    public void updateClickNum(String ownerId, String friendId, int clickNum) {
+        UpdateBuilder<Friend, Integer> builder = friendDao.updateBuilder();
+        try {
+            builder.where().eq("ownerId", ownerId).and().eq("userId", friendId);
+            builder.updateColumnValue("clickNum", clickNum);
+            int e = friendDao.update(builder.prepare());
+            LogUtil.i("updateClickNum e=" + e);
+        } catch (SQLException e) {
+            e.printStackTrace();
+            LogUtil.i("e=" + e.getMessage());
+        }
+    }
+
     public void updateNickName(String ownerId, String friendId, String myNickName) {
         UpdateBuilder<Friend, Integer> builder = friendDao.updateBuilder();
         try {

+ 0 - 26
app_core/network/src/androidTest/java/base/android/com/network/ExampleInstrumentedTest.java

@@ -1,26 +0,0 @@
-package base.android.com.network;
-
-import android.content.Context;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.runner.AndroidJUnit4;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import static org.junit.Assert.*;
-
-/**
- * Instrumentation test, which will execute on an Android device.
- *
- * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
- */
-@RunWith(AndroidJUnit4.class)
-public class ExampleInstrumentedTest {
-    @Test
-    public void useAppContext() throws Exception {
-        // Context of the app under test.
-        Context appContext = InstrumentationRegistry.getTargetContext();
-
-        assertEquals("base.android.com.network.test", appContext.getPackageName());
-    }
-}

+ 0 - 26
app_modular/appbooking/src/androidTest/java/base/android/com/appbooking/ExampleInstrumentedTest.java

@@ -1,26 +0,0 @@
-package base.android.com.appbooking;
-
-import android.content.Context;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.runner.AndroidJUnit4;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import static org.junit.Assert.*;
-
-/**
- * Instrumentation test, which will execute on an Android device.
- *
- * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
- */
-@RunWith(AndroidJUnit4.class)
-public class ExampleInstrumentedTest {
-    @Test
-    public void useAppContext() throws Exception {
-        // Context of the app under test.
-        Context appContext = InstrumentationRegistry.getTargetContext();
-
-        assertEquals("base.android.com.appbooking.test", appContext.getPackageName());
-    }
-}

+ 8 - 1
app_modular/appcontact/src/main/java/com/uas/appcontact/adapter/FriendSortAdapter.java

@@ -10,6 +10,8 @@ import android.widget.ImageView;
 import android.widget.SectionIndexer;
 import android.widget.TextView;
 
+import com.alibaba.fastjson.JSON;
+import com.common.LogUtil;
 import com.common.data.StringUtil;
 import com.common.system.SystemUtil;
 import com.core.model.Friend;
@@ -18,6 +20,7 @@ import com.core.utils.sortlist.BaseSortModel;
 import com.core.widget.crouton.Crouton;
 import com.core.xmpp.FriendHelper;
 import com.uas.appcontact.R;
+import com.uas.appcontact.db.TopContactsDao;
 import com.uas.appcontact.ui.widget.stickylistheaders.StickyListHeadersAdapter;
 
 import java.util.ArrayList;
@@ -152,7 +155,11 @@ public class FriendSortAdapter extends BaseAdapter implements SectionIndexer,Sti
                     if (matcher.matches()) {
 //                        selectByPhone(phone, finalConvertView);
                         SystemUtil.phoneAction(mContext,phone);
-                        FriendHelper.addGoodFriend(mContext,friend);
+                        LogUtil.i("通讯录界面 拨打电话\n"+ JSON.toJSONString(friend));
+                        if (friend!=null){
+                            friend.setPhone(phone);
+                        }
+                        TopContactsDao.api().addGoodFriend(friend);
                     } else {
                         Crouton.makeText(mContext, R.string.not_format_phone);
                     }

+ 143 - 0
app_modular/appcontact/src/main/java/com/uas/appcontact/db/TopContactsDao.java

@@ -0,0 +1,143 @@
+package com.uas.appcontact.db;
+
+import android.content.ContentValues;
+import android.content.Context;
+import android.database.Cursor;
+
+import com.alibaba.fastjson.JSON;
+import com.common.LogUtil;
+import com.common.data.ListUtils;
+import com.core.app.MyApplication;
+import com.core.dao.Dao;
+import com.core.db.DatabaseTables;
+import com.core.model.Friend;
+import com.core.model.Hrorgs;
+import com.core.utils.sortlist.BaseSortModel;
+import com.core.xmpp.dao.FriendDao;
+import com.uas.appcontact.model.TopContacts;
+
+import java.util.List;
+
+/**
+ * Created by Bitlike on 2018/1/23.
+ */
+
+public class TopContactsDao extends Dao<TopContacts> {
+    @Override
+    protected String getTable() {
+        return DatabaseTables.TopContactsTable.NAME;
+    }
+
+    @Override
+    protected ContentValues getValues(TopContacts topContacts) throws Exception {
+        ContentValues values = new ContentValues();
+        values.put(DatabaseTables.TopContactsTable.Cols.USER_ID, topContacts.getUserId());
+        values.put(DatabaseTables.TopContactsTable.Cols.OWNER_ID, topContacts.getOwnerId());
+        values.put(DatabaseTables.TopContactsTable.Cols.PHONE, topContacts.getPhone());
+        values.put(DatabaseTables.TopContactsTable.Cols.NAME, topContacts.getName());
+        values.put(DatabaseTables.TopContactsTable.Cols.EM_CODE, topContacts.getEmCode());
+        values.put(DatabaseTables.TopContactsTable.Cols.LAST_TIME, topContacts.getLastTime());
+        values.put(DatabaseTables.TopContactsTable.Cols.STATUS, topContacts.getStatus());
+        return values;
+    }
+
+    @Override
+    protected TopContacts getData(Cursor c) throws Exception {
+        TopContacts topContacts = new TopContacts();
+        topContacts.setUserId(c.getString(c.getColumnIndex(DatabaseTables.TopContactsTable.Cols.USER_ID)));
+        topContacts.setOwnerId(c.getString(c.getColumnIndex(DatabaseTables.TopContactsTable.Cols.OWNER_ID)));
+        topContacts.setPhone(c.getString(c.getColumnIndex(DatabaseTables.TopContactsTable.Cols.PHONE)));
+        topContacts.setName(c.getString(c.getColumnIndex(DatabaseTables.TopContactsTable.Cols.NAME)));
+        topContacts.setEmCode(c.getString(c.getColumnIndex(DatabaseTables.TopContactsTable.Cols.EM_CODE)));
+        topContacts.setLastTime(c.getLong(c.getColumnIndex(DatabaseTables.TopContactsTable.Cols.LAST_TIME)));
+        topContacts.setStatus(c.getInt(c.getColumnIndex(DatabaseTables.TopContactsTable.Cols.STATUS)));
+        return topContacts;
+    }
+
+
+    private static TopContactsDao api;
+
+    public static TopContactsDao api() {
+        if (api == null) {
+            synchronized (TopContactsDao.class) {
+                if (api == null) {
+                    api = new TopContactsDao();
+                }
+            }
+        }
+        return api;
+    }
+
+    private TopContactsDao() {
+
+    }
+
+
+    public void addGoodFriend(Friend friend) {
+        if (friend != null) {
+            TopContacts topContacts = new TopContacts();
+            String ownerId = MyApplication.getInstance().getLoginUserId();
+            String userId = String.valueOf(friend.getUserId());
+            topContacts.setUserId(userId);
+            topContacts.setOwnerId(ownerId);
+            topContacts.setName(friend.getNickName());
+            topContacts.setEmCode(friend.getEmCode());
+            topContacts.setPhone(friend.getPhone());
+            topContacts.setLastTime(System.currentTimeMillis());
+            addGoodFriend(topContacts);
+        }
+    }
+
+
+    public void addGoodFriend(Hrorgs.Employee employee) {
+        if (employee != null) {
+            TopContacts topContacts = new TopContacts();
+            String ownerId = MyApplication.getInstance().getLoginUserId();
+            String userId = String.valueOf(employee.em_imid);
+            topContacts.setUserId(userId);
+            topContacts.setOwnerId(ownerId);
+            topContacts.setName(employee.em_name);
+            topContacts.setEmCode(employee.em_code);
+            topContacts.setPhone(employee.em_mobile);
+            topContacts.setLastTime(System.currentTimeMillis());
+            addGoodFriend(topContacts);
+        }
+    }
+
+    /**
+     * 添加常用
+     * 1.拨打电话
+     * 2.发送聊天信息
+     */
+    public void addGoodFriend(TopContacts topContacts) {
+        String where = DatabaseTables.TopContactsTable.Cols.OWNER_ID + "=? and "
+                + DatabaseTables.TopContactsTable.Cols.USER_ID + "=? ";
+        String[] whereAge = new String[]{topContacts.getOwnerId(), topContacts.getUserId()};
+        List<TopContacts> dbContacts = query(where, whereAge);
+        LogUtil.i("owner_id=" + topContacts.getOwnerId());
+        LogUtil.i("user_id=" + topContacts.getUserId());
+        if (ListUtils.isEmpty(dbContacts)) {
+            LogUtil.i("ListUtils.isEmpty(dbContacts)=");
+            boolean b = insert(topContacts, where, whereAge);
+            LogUtil.i("insert=" + b);
+        } else {
+            LogUtil.i("ListUtils.isEmpty(dbContacts)=elseelseelseelseelse"+dbContacts.size());
+            TopContacts dbContact = dbContacts.get(0);
+            if (dbContact != null && (System.currentTimeMillis() - dbContact.getLastTime())< (86400000)) {
+                topContacts.setStatus(1);
+            }
+            LogUtil.i("dbContact=" + JSON.toJSONString(dbContact));
+            boolean b = update(topContacts, where, whereAge);
+            LogUtil.i("update=" + b);
+        }
+    }
+    public List<TopContacts> getTopContacts(){
+        String owerId= MyApplication.getInstance().getLoginUserId();
+        String where = DatabaseTables.TopContactsTable.Cols.OWNER_ID + "=? ";
+//                + " and " +DatabaseTables.TopContactsTable.Cols.STATUS + "=? ";
+        String[] whereAge = new String[]{owerId/*, String.valueOf(1)*/};
+        LogUtil.i("owerId="+owerId);
+        LogUtil.i("where="+where);
+        return query(where,whereAge);
+    }
+}

+ 5 - 0
app_modular/appcontact/src/main/java/com/uas/appcontact/manager/ContactsManager.java

@@ -3,6 +3,7 @@ package com.uas.appcontact.manager;
 
 import android.os.Bundle;
 import android.os.Looper;
+import android.text.TextUtils;
 
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
@@ -12,6 +13,7 @@ import com.common.config.BaseConfig;
 import com.common.data.JSONUtil;
 import com.common.data.ListUtils;
 import com.common.data.StringUtil;
+import com.common.data.TextUtil;
 import com.common.thread.ThreadUtil;
 import com.core.api.wxapi.ApiConfig;
 import com.core.api.wxapi.ApiModel;
@@ -100,6 +102,9 @@ public class ContactsManager {
         } else {
             baseUrl = CommonUtil.getAppBaseUrl(MyApplication.getInstance());
         }
+        if (TextUtils.isEmpty(baseUrl)){
+            baseUrl="http://";
+        }
         String url = isB2b ? "mobile/approvalflow/getUsersInfo" : "mobile/getAllHrorgEmps.action";
         String sessionId = CommonUtil.getSharedPreferences(BaseConfig.getContext(), "sessionId");
         HttpClient httpClient = new HttpClient.Builder(baseUrl)

+ 73 - 0
app_modular/appcontact/src/main/java/com/uas/appcontact/model/TopContacts.java

@@ -0,0 +1,73 @@
+package com.uas.appcontact.model;
+
+/**
+ * Created by Bitlike on 2018/1/23.
+ */
+
+public class TopContacts {
+
+    private String userId;
+    private String ownerId;
+    private String phone;
+    private String name;
+    private String emCode;
+    private long lastTime;
+    private int status;//1,常用联系人  0,联系人
+
+
+    public String getOwnerId() {
+        return ownerId;
+    }
+
+    public void setOwnerId(String ownerId) {
+        this.ownerId = ownerId;
+    }
+
+    public String getUserId() {
+        return userId;
+    }
+
+    public void setUserId(String userId) {
+        this.userId = userId;
+    }
+
+    public String getPhone() {
+        return phone;
+    }
+
+    public void setPhone(String phone) {
+        this.phone = phone;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getEmCode() {
+        return emCode;
+    }
+
+    public void setEmCode(String emCode) {
+        this.emCode = emCode;
+    }
+
+    public long getLastTime() {
+        return lastTime;
+    }
+
+    public void setLastTime(long lastTime) {
+        this.lastTime = lastTime;
+    }
+
+    public int getStatus() {
+        return status;
+    }
+
+    public void setStatus(int status) {
+        this.status = status;
+    }
+}

+ 7 - 1
app_modular/appcontact/src/main/java/com/uas/appcontact/ui/activity/CompanyContactsActivity.java

@@ -1,5 +1,6 @@
 package com.uas.appcontact.ui.activity;
 
+import android.annotation.SuppressLint;
 import android.content.Context;
 import android.content.Intent;
 import android.graphics.Color;
@@ -51,10 +52,12 @@ import com.core.utils.CommonUtil;
 import com.core.utils.helper.AvatarHelper;
 import com.core.widget.CustomerListView;
 import com.core.widget.VoiceSearchView;
+import com.core.xmpp.FriendHelper;
 import com.core.xmpp.dao.FriendDao;
 import com.scwang.smartrefresh.layout.api.RefreshLayout;
 import com.scwang.smartrefresh.layout.listener.OnRefreshListener;
 import com.uas.appcontact.R;
+import com.uas.appcontact.db.TopContactsDao;
 
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
@@ -896,6 +899,7 @@ public class CompanyContactsActivity extends BaseActivity {
 
     private PopupWindow popupWindow = null;
 
+    @SuppressLint("WrongConstant")
     public void showPopupWindow(View parent) {
         View view = null;
         WindowManager windowManager = (WindowManager) getSystemService(Context.WINDOW_SERVICE);
@@ -1133,6 +1137,7 @@ public class CompanyContactsActivity extends BaseActivity {
                         @Override
                         public void onClick(View v) {
                             SystemUtil.phoneAction(ct, employees.get(position - lists.size()).getEm_mobile());
+                            TopContactsDao.api().addGoodFriend( employees.get(position - lists.size()));
                         }
                     });
                 }
@@ -1169,6 +1174,7 @@ public class CompanyContactsActivity extends BaseActivity {
                     @Override
                     public void onClick(View v) {
                         SystemUtil.phoneAction(ct, employees.get(position - lists.size()).getEm_mobile());
+                        TopContactsDao.api().addGoodFriend( employees.get(position - lists.size()));
                     }
                 });
             }
@@ -1250,8 +1256,8 @@ public class CompanyContactsActivity extends BaseActivity {
             phone_img.setOnClickListener(new View.OnClickListener() {
                 @Override
                 public void onClick(View v) {
-
                     SystemUtil.phoneAction(mContext, mMap.get("item_phone").toString());
+                    LogUtil.i("企业架构界面 拨打电话"+JSON.toJSONString(mMap));
                 }
             });
 

+ 6 - 0
app_modular/appcontact/src/main/java/com/uas/appcontact/ui/activity/MyFriendActivity.java

@@ -50,6 +50,8 @@ import com.handmark.pulltorefresh.library.PullToRefreshBase;
 import com.handmark.pulltorefresh.library.PullToRefreshListView;
 import com.uas.appcontact.R;
 import com.uas.appcontact.adapter.UUFriendSortAdapter;
+import com.uas.appcontact.db.TopContactsDao;
+import com.uas.appcontact.model.TopContacts;
 
 import java.util.ArrayList;
 import java.util.Collections;
@@ -245,6 +247,10 @@ public class MyFriendActivity extends BaseActivity {
                 if (mLoginUserId == null)
                     mLoginUserId = MyApplication.getInstance().mLoginUser.getUserId();
                 if (isPeculiar) {
+                    List<TopContacts> topContacts = TopContactsDao.api().getTopContacts();
+                    if (topContacts!=null){
+                        LogUtil.i("topContacts="+JSON.toJSONString(topContacts));
+                    }
                     friends = FriendDao.getInstance().getFriends(mLoginUserId, "clickNum", 10);
                 } else {
                     friends = FriendDao.getInstance().getFriends(mLoginUserId);// 取所有好友

+ 1 - 1
app_modular/appcontact/src/main/java/com/uas/appcontact/ui/fragment/ContactsFragment.java

@@ -409,7 +409,7 @@ public class ContactsFragment extends EasyFragment
         friend.setPrivacy(e.getEM_EMAIL());
         friend.setCompanyId(0);
         friend.setRoomFlag(0);// 0朋友 1群组
-        friend.setStatus(Friend.STATUS_UNKNOW);
+        friend.setStatus(Friend.STATUS_FRIEND);
         BaseSortModel<Friend> mode = new BaseSortModel<>();
         mode.setBean(friend);
         setSortCondition(mode);

+ 1 - 1
app_modular/appme/build.gradle

@@ -25,5 +25,5 @@ dependencies {
     compile project(':appworks')
     compile project(':applogin')
     compile project(':appcontact')
-    compile 'com.android.support.constraint:constraint-layout:1.0.2'
+
 }

+ 11 - 4
app_modular/appme/src/main/java/com/uas/appme/other/activity/BasicInfoActivity.java

@@ -31,6 +31,7 @@ import android.widget.LinearLayout;
 import android.widget.PopupWindow;
 import android.widget.TextView;
 
+import com.alibaba.fastjson.JSON;
 import com.android.volley.Response.ErrorListener;
 import com.android.volley.VolleyError;
 import com.common.LogUtil;
@@ -66,6 +67,7 @@ import com.core.xmpp.listener.NewFriendListener;
 import com.core.xmpp.model.AddAttentionResult;
 import com.core.xmpp.utils.CardcastUiUpdateUtil;
 import com.uas.appcontact.db.ContactsDao;
+import com.uas.appcontact.db.TopContactsDao;
 import com.uas.appcontact.model.contacts.ContactsModel;
 import com.uas.appme.R;
 
@@ -529,17 +531,22 @@ public class BasicInfoActivity extends BaseActivity implements NewFriendListener
         phone_img.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
-                if (!StringUtil.isEmpty(phone_tv.getText().toString())) {
+                String phone=StringUtil.getText(phone_tv);
+                if (!StringUtil.isEmpty(phone)) {
                     String check = "^[1][3,5,7,8][0-9]\\d{8}$";
                     Pattern regex = Pattern.compile(check);
-                    Matcher matcher = regex.matcher(phone_tv.getText().toString());
+                    Matcher matcher = regex.matcher(phone);
                     boolean isMatched = matcher.matches();
                     if (isMatched) {
-                        SystemUtil.phoneAction(BasicInfoActivity.this,phone_tv.getText().toString());
+                        SystemUtil.phoneAction(BasicInfoActivity.this,phone);
                     } else {
                         ViewUtil.ShowMessageTitle(BasicInfoActivity.this, getString(R.string.error_phone));
                     }
-                    FriendHelper.addGoodFriend(ct,mFriend);
+                    if (mFriend!=null){
+                        mFriend.setPhone(phone);
+                    }
+                    LogUtil.i("个人资料界面 拨打电话\n"+ JSON.toJSONString(mFriend));
+                    TopContactsDao.api().addGoodFriend(mFriend);
                 }
             }
         });

+ 11 - 19
app_modular/appme/src/main/java/com/uas/appme/settings/activity/AboutActivity.java

@@ -22,7 +22,6 @@ import com.core.utils.IntentUtils;
 import com.core.widget.view.Activity.CommonWebviewActivity;
 import com.lidroid.xutils.ViewUtils;
 import com.uas.appme.R;
-import com.umeng.socialize.Config;
 import com.umeng.socialize.ShareAction;
 import com.umeng.socialize.UMShareAPI;
 import com.umeng.socialize.bean.SHARE_MEDIA;
@@ -31,7 +30,7 @@ import com.uuzuche.lib_zxing.activity.CodeUtils;
 
 public class AboutActivity extends BaseActivity implements View.OnClickListener {
 
-    private RelativeLayout me_name;//评价
+    private RelativeLayout me_name;
     private RelativeLayout me_function;
     private RelativeLayout me_QRcode;
 
@@ -50,13 +49,6 @@ public class AboutActivity extends BaseActivity implements View.OnClickListener
         me_name.setOnClickListener(this);
         me_function.setOnClickListener(this);
         me_QRcode.setOnClickListener(this);
-
-      
-//		UmengTool.getSignature(activity);
-//		UmengTool.checkSina(activity);
-//		UmengTool.getREDICRECT_URL(activity);
-//		UmengTool.checkWx(activity);
-//		UmengTool.checkSina(activity);
     }
 
     private void initView() {
@@ -73,7 +65,7 @@ public class AboutActivity extends BaseActivity implements View.OnClickListener
 
     @Override
     public boolean onOptionsItemSelected(MenuItem item) {
-        if (item.getItemId() == R.id.app_about){
+        if (item.getItemId() == R.id.app_about) {
             try {
                 new ShareAction(activity).setDisplayList(
                         SHARE_MEDIA.SINA,
@@ -84,15 +76,15 @@ public class AboutActivity extends BaseActivity implements View.OnClickListener
                         SHARE_MEDIA.WEIXIN_FAVORITE,
                         SHARE_MEDIA.MORE)
                         .withTitle("UU互联")
-                        .withText("UU互联 Android客户端"+ SystemUtil.getVersionName(mContext))
+                        .withText("UU互联 Android客户端" + SystemUtil.getVersionName(mContext))
                         .withMedia(new UMImage(activity, "http://img.my.csdn.net/uploads/201609/30/1475204542_1365.png"))
                         .withTargetUrl("http://www.usoftchina.com/usoft/uas_client.html")
                         .setCallback(CommonUtil.umShareListener)
                         .open();
             } catch (Exception e) {
-                
+
             }
-        }else if (item.getItemId() == android.R.id.home){
+        } else if (item.getItemId() == android.R.id.home) {
 
             onBackPressed();
         }
@@ -102,7 +94,7 @@ public class AboutActivity extends BaseActivity implements View.OnClickListener
 
     @Override
     public void onClick(View v) {
-        if (v.getId() ==  R.id.me_name){
+        if (v.getId() == R.id.me_name) {
             try {
                 Uri uri = Uri.parse("market://details?id=" + getPackageName());
                 Intent intent = new Intent(Intent.ACTION_VIEW, uri);
@@ -111,11 +103,12 @@ public class AboutActivity extends BaseActivity implements View.OnClickListener
             } catch (Exception e) {
                 IntentUtils.webLinks(ct, "http://apk.91.com/Soft/Android/com.xzjmyk.pm.activity-54.html", "UU互联");
             }
-        }else if (v.getId() ==  R.id.me_function){
-            String url="";
-            url=  "http://113.105.74.140:8080/new/";
+        } else if (v.getId() == R.id.me_function) {
+            String url = "";
+            url = "http://113.105.74.140:8080/new/";
             IntentUtils.webLinks(ct, url, getString(R.string.about_function));
-        }else if (v.getId() ==  R.id.me_QRcode){
+
+        } else if (v.getId() == R.id.me_QRcode) {
             ImageView imageView = new ImageView(ct);
             imageView.setImageResource(R.drawable.ic_uu_scan_code);
             new MaterialDialog.Builder(ct)
@@ -148,7 +141,6 @@ public class AboutActivity extends BaseActivity implements View.OnClickListener
         }
     }
 
- 
 
     @Override
     protected void onActivityResult(int requestCode, int resultCode, Intent data) {

+ 3 - 2
app_modular/appme/src/main/java/com/uas/appme/settings/activity/BaseInfoActivity.java

@@ -65,8 +65,9 @@ import java.util.List;
 
 
 /**
- * 个人资料页面
- */
+  * @desc:用户个人资料界面
+  * @author:Arison on 2018/1/23
+  */
 public class BaseInfoActivity extends BaseActivity implements View.OnClickListener {
 
     private ImageView iv_headImage;

+ 0 - 2
app_modular/appmessages/src/main/java/com/modular/appmessages/activity/AppWebViewActivity.java

@@ -365,9 +365,7 @@ public class AppWebViewActivity extends BaseActivity {
                 }
             }
         } catch (Exception e) {
-            LogUtil.i("Exception=" + e.getMessage());
         }
-        LogUtil.i("nodeId=" + nodeId);
         return nodeId;
     }
 

+ 0 - 1
app_modular/appmessages/src/main/java/com/modular/appmessages/activity/ApprovalActivity.java

@@ -103,7 +103,6 @@ public class ApprovalActivity extends OABaseActivity implements IApproval, Appro
         MenuItem item = menu.getItem(1);
         item.setTitle("返回旧版");
         boolean hiteAble=!PreferenceUtils.getBoolean(AppConfig.IS_ADMIN, false);
-        LogUtil.i("hiteAble="+hiteAble);
         if (hiteAble) {
             MenuItem setItem = menu.getItem(0);
             setItem.setVisible(false);

+ 0 - 4
app_modular/appmessages/src/main/java/com/modular/appmessages/presenter/MessagePresenter.java

@@ -13,7 +13,6 @@ import android.text.TextUtils;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
-import com.common.LogUtil;
 import com.common.data.DateFormatUtil;
 import com.common.data.JSONUtil;
 import com.common.data.ListUtils;
@@ -106,7 +105,6 @@ public class MessagePresenter implements OnHttpResultListener {
         public void onReceive(Context context, Intent intent) {
             String action = intent.getAction();
             if (StringUtil.isEmpty(action)) return;
-            LogUtil.i("MessagePresenter=" + action);
             if (action.equals(ConnectivityManager.CONNECTIVITY_ACTION)) {
                 iMessageView.changeNet(SystemUtil.isNetWorkConnected(MyApplication.getInstance()));
             } else if (OAConfig.AUTO_SIGIN_ALART.equals(action)) {
@@ -599,7 +597,6 @@ public class MessagePresenter implements OnHttpResultListener {
         List<MessageModel> detailModels = new ArrayList<>();
         MessageModel model = null;
         MessageModel detailModel = null;
-        LogUtil.i("array=" + array.size());
         for (int i = 0; i < array.size(); i++) {
             object = array.getJSONObject(i);
             model = new MessageModel();
@@ -1057,7 +1054,6 @@ public class MessagePresenter implements OnHttpResultListener {
         List<MessageHeader> models = new ArrayList<>();
         MessageHeader model = null;
         String role = CommonUtil.getUserRole();
-        LogUtil.i("role=" + role);
         if (role.equals("1")) {//个人用户
             models.addAll(getPersonalHeader());
         } else if (role.equals("3")) {//b2b用户

+ 1 - 3
app_modular/apputils/build.gradle

@@ -20,10 +20,8 @@ android {
 
 dependencies {
     compile fileTree(include: ['*.jar'], dir: 'libs')
-    testCompile deps.junit
-    compile deps.appcompatV7
     compile project(':common')
     compile project(':network')
     compile project(':imageload')
-    compile 'com.android.support.constraint:constraint-layout:+'
+
 }

+ 9 - 8
app_modular/apputils/src/main/AndroidManifest.xml

@@ -42,18 +42,19 @@
                 <category android:name="android.intent.category.DEFAULT" />
             </intent-filter>
         </activity>
-        
-        
         <activity android:name=".IntentUrlActivity">
             <intent-filter>
-                <action android:name="android.intent.action.VIEW"></action>
-                <category android:name="android.intent.category.DEFAULT"></category>
-                <category android:name="android.intent.category.BROWSABLE"></category>
-                <data android:scheme="app"
-                    android:host="usoftchina.com">
-                </data>
+                <action android:name="android.intent.action.VIEW" />
+
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.BROWSABLE" />
+
+                <data
+                    android:host="usoftchina.com"
+                    android:scheme="app"></data>
             </intent-filter>
         </activity>
+
     </application>
 
 </manifest>

+ 11 - 15
app_modular/apputils/src/main/java/com/modular/apputils/IntentUrlActivity.java

@@ -6,7 +6,6 @@ import android.net.Uri;
 import android.os.Bundle;
 
 import com.common.LogUtil;
-import com.modular.apputils.activity.SimpleWebActivity;
 
 /**
   * @desc:负责分发外部URL链接的中转界面
@@ -27,26 +26,23 @@ private static final String TAG = "IntentUrlActivity";
                 String id= uri.getQueryParameter("id");
                 LogUtil.d(TAG,"pagekind:"+pagekind+" id:"+id);
                 if ("A".equals(pagekind)){
-                    Intent intent=new Intent(this, SimpleWebActivity.class);
-                    intent.putExtra("id",id);
-                    intent.putExtra("url","https://www.baidu.com");
-                    intent.putExtra("p","询价单");
+                    Intent intent=new Intent("com.modular.work.platform.activity.CustomerInquiryDetailActivity");
+
+                    intent.putExtra("extra_b2b_list_id",id);
+                    intent.putExtra("extra_b2b_list_state","todo");
                     startActivity(intent);
-                    
                 }
-                if ("B".equals(pagekind)){
-                    Intent intent=new Intent(this, SimpleWebActivity.class);
-                    intent.putExtra("id",id);
-                    intent.putExtra("url","https://github.com");
-                    intent.putExtra("p","公共询价单");
+                if ("B".equals(pagekind)){//公共询价单
+                    Intent intent=new Intent("com.modular.work.platform.activity.CustomerInquiryDetailActivity");
+                    intent.putExtra("extra_b2b_list_id",id);
+                    intent.putExtra("extra_b2b_list_state","public_todo");
                     startActivity(intent);
                   
                 }
                 if ("C".equals(pagekind)){
-                    Intent intent=new Intent(this, SimpleWebActivity.class);
-                    intent.putExtra("id",id);
-                    intent.putExtra("url","https://www.jianshu.com/u/7cfc7246c714");
-                    intent.putExtra("p","采购单");
+                    Intent intent=new Intent("com.modular.work.platform.activity.PurchaseDetailsActivity");
+                    intent.putExtra("extra_b2b_list_id",id);
+                    intent.putExtra("extra_b2b_list_state","todo");
                     startActivity(intent);
                 }
                 overridePendingTransition(0,0);

+ 1 - 2
app_modular/apputils/src/main/java/com/modular/apputils/activity/BaseNetActivity.java

@@ -97,7 +97,6 @@ public abstract class BaseNetActivity extends ActionBackActivity {
 
     private void initHttpConfig() {
         String baseUrl = getBaseUrl();
-        LogUtil.i("baseUrl=" + baseUrl);
         if (!StringUtil.isEmpty(baseUrl)) {
             httpClient = new HttpClient.Builder(baseUrl).isDebug(true)
                     .connectTimeout(5000)
@@ -114,7 +113,7 @@ public abstract class BaseNetActivity extends ActionBackActivity {
                     .addHeaders(parameter.getHeaders())
                     .method(parameter.getMode())
                     .url(parameter.getUrl())
-                    .isDebug(true);
+                    .isDebug(false);
             if (parameter.autoProgress()) {
                 showProgress();
             }

+ 120 - 63
app_modular/apputils/src/main/java/com/modular/apputils/activity/SimpleWebActivity.java

@@ -2,68 +2,89 @@ package com.modular.apputils.activity;
 
 import android.annotation.SuppressLint;
 import android.content.ActivityNotFoundException;
-import android.content.Context;
 import android.content.Intent;
 import android.net.Uri;
 import android.os.Build;
 import android.os.Bundle;
+import android.os.Environment;
+import android.text.TextUtils;
 import android.view.KeyEvent;
-import android.webkit.CookieManager;
-import android.webkit.CookieSyncManager;
-import android.webkit.WebSettings;
-import android.webkit.WebView;
-import android.webkit.WebViewClient;
+import android.widget.RelativeLayout;
 
 import com.alibaba.fastjson.JSON;
 import com.common.LogUtil;
 import com.core.app.MyApplication;
-import com.core.base.BaseActivity;
+import com.core.base.OABaseActivity;
 import com.core.utils.CommonUtil;
+import com.core.utils.ToastUtil;
 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 com.modular.apputils.R;
+import com.tencent.smtt.sdk.CookieManager;
+import com.tencent.smtt.sdk.TbsReaderView;
+import com.tencent.smtt.sdk.TbsReaderView.ReaderCallback;
+import com.tencent.smtt.sdk.WebSettings;
+import com.tencent.smtt.sdk.WebView;
+import com.tencent.smtt.sdk.WebViewClient;
 
-public class SimpleWebActivity extends BaseActivity {
-private static final String TAG = "SimpleWebActivity";
-    WebView webView;
+import java.io.File;
+
+public class SimpleWebActivity extends OABaseActivity implements ReaderCallback {
+    private static final String TAG = "SimpleWebActivity";
+    private WebView webView;
+    private TbsReaderView mTbsReaderView;
+    private String filepath;
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.activity_simple_web);
-
-        webView= findViewById(R.id.mSimpleWebView);
+      
+        webView = findViewById(R.id.mSimpleWebView);
+        mTbsReaderView = new TbsReaderView(this, this);
+        RelativeLayout rootRl =  findViewById(R.id.rl_root);
+        rootRl.addView(mTbsReaderView, new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT));
         webView.getSettings().setJavaScriptEnabled(true);
         webView.getSettings().setAllowFileAccess(true);
         webView.getSettings().setDomStorageEnabled(true);
         webView.getSettings().setDatabaseEnabled(true);
         webView.getSettings().setAppCacheEnabled(true);
         webView.getSettings().setCacheMode(WebSettings.LOAD_DEFAULT);
-        
-        
-        
+
+
         Intent intent = getIntent();
-        String  url = intent.getStringExtra("url");
+        String url = intent.getStringExtra("url");
         getSupportActionBar().setTitle(intent.getStringExtra("p"));
-        LogUtil.d(TAG,"url:"+url+" title:"+intent.getStringExtra("p"));
-        if ("http://mall.ubtob.com".equals(url)){
+        filepath = intent.getStringExtra("filepath");
+        if (!TextUtils.isEmpty(filepath)) {
+            if (isLocalExist()) {
+                openFileByTBS();
+            }
+            return;
+        }
+
+        if ("http://mall.ubtob.com".equals(url)) {
             initBusinessToken();
         }
-       
+
         setThirdPartyCookiesEnabled(true);
-        webView.setWebViewClient(new WebViewClient(){
+        webView.setWebViewClient(new WebViewClient() {
             public boolean shouldOverrideUrlLoading(WebView view, String url) {
-                LogUtil.d(TAG,"转发url:"+url);
+                LogUtil.d(TAG,"url="+url);
                 if (url.startsWith(WebView.SCHEME_TEL) || url.startsWith("sms:") || url.startsWith(WebView.SCHEME_MAILTO)) {
                     try {
                         Intent intent = new Intent(Intent.ACTION_VIEW);
                         intent.setData(Uri.parse(url));
-                        mContext.startActivity(intent);
+                        startActivity(intent);
                     } catch (ActivityNotFoundException ignored) {
                     }
                     return true;
+                }else if(url.contains("jsps/oa/persontask/workDaily/addWorkDaily.jsp")){
+                    LogUtil.d(TAG,"event url="+url);
+                    ToastUtil.showToast(mContext,"调转日报界面");
+                    return true;
                 }
                 webView.loadUrl(url);
                 return true;
@@ -73,58 +94,82 @@ private static final String TAG = "SimpleWebActivity";
                 super.onPageFinished(view, url);
             }
         });
-         webView.loadUrl(url);
+        webView.loadUrl(url);
+
     }
 
+    private boolean isLocalExist() {
+        return getLocalFile().exists();
+    }
 
-    //企业uu为空,则取附近账套和子帐套的
-    public void initBusinessToken(){
-          LogUtil.d(TAG, CommonUtil.getSharedPreferences(this,"erp_uu"));
-       
-          HttpClient httpClient=new HttpClient.Builder("https://account.ubtob.com/").build();
-                 httpClient.Api().send(new HttpClient.Builder()
-                 .url("api/user/getToken")
-                         .add("appId","b2b")
-                         .add("spaceDialectUID",CommonUtil.getSharedPreferences(this,"erp_uu"))
-                         .add("uid", MyApplication.getInstance().mLoginUser.getTelephone())
-                 .method(Method.GET)
-                 .build(),new ResultSubscriber<Object>(new ResultListener<Object>() {
-          
-                     @Override
-                     public void onResponse(Object o) {
-                         try {
-                             LogUtil.d(TAG,o.toString());
-                             String token= JSON.parseObject(o.toString()).getString("content");
-                             String url="https://account.ubtob.com/sso/login/proxy?appId=b2b&returnURL=https://www.usoftmall.com&token="+token+"&baseURL=https://www.usoftmall.com/login/other&isLoginAll=false";
-                             webView.loadUrl(url);
-                         } catch (Exception e) {
-                             e.printStackTrace();
-                         }
-                     }
-                 }));
+    private File getLocalFile() {
+        return new File(filepath);
+    }
+    
+    private void openFileByTBS() {
+        String fileName = parseFormat(filepath);
+        Bundle bundle = new Bundle();
+        bundle.putString("filePath", filepath);
+        bundle.putString("tempPath", Environment.getExternalStorageDirectory().getPath());
+        boolean result = mTbsReaderView.preOpen(fileName, false);
+        if (result) {
+            mTbsReaderView.openFile(bundle);
+        }
+        
     }
 
-    public static void synCookies(Context context, String url,String cookies) {
-        CookieSyncManager.createInstance(context);
-        CookieManager cookieManager = CookieManager.getInstance();
-        cookieManager.setAcceptCookie(true);
-        cookieManager.removeSessionCookie();//移除  
-        LogUtil.d(TAG, cookies);
-        cookieManager.setCookie(url, cookies);
-        CookieSyncManager.getInstance().sync();
+    private String parseFormat(String fileName) {
+        return fileName.substring(fileName.lastIndexOf(".") + 1);
     }
 
 
-    @SuppressWarnings("static-method")
-    public void setCookiesEnabled(final boolean enabled) {
-        CookieManager.getInstance().setAcceptCookie(enabled);
+    //企业uu为空,则取附近账套和子帐套的
+    public void initBusinessToken() {
+        LogUtil.d(TAG, CommonUtil.getSharedPreferences(this, "erp_uu"));
+        HttpClient httpClient = new HttpClient.Builder("https://account.ubtob.com/").build();
+        httpClient.Api().send(new HttpClient.Builder()
+                .url("api/user/getToken")
+                .add("appId", "b2b")
+                .add("spaceDialectUID", CommonUtil.getSharedPreferences(this, "erp_uu"))
+                .add("uid", MyApplication.getInstance().mLoginUser.getTelephone())
+                .method(Method.GET)
+                .build(), new ResultSubscriber<Object>(new ResultListener<Object>() {
+
+            @Override
+            public void onResponse(Object o) {
+                try {
+                    LogUtil.d(TAG, o.toString());
+                    String token = JSON.parseObject(o.toString()).getString("content");
+                    String url = "https://account.ubtob.com/sso/login/proxy?appId=b2b&returnURL=https://www.usoftmall.com&token=" + token + "&baseURL=https://www.usoftmall.com/login/other&isLoginAll=false";
+                    webView.loadUrl(url);
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+            }
+        }));
     }
 
+//    public static void synCookies(Context context, String url, String cookies) {
+//        CookieSyncManager.createInstance(context);
+//        CookieManager cookieManager = CookieManager.getInstance();
+//        cookieManager.setAcceptCookie(true);
+//        cookieManager.removeSessionCookie();//移除  
+//        LogUtil.d(TAG, cookies);
+//        cookieManager.setCookie(url, cookies);
+//        CookieSyncManager.getInstance().sync();
+//    }
+
+
+    @SuppressWarnings("static-method")
+//    public void setCookiesEnabled(final boolean enabled) {
+//        CookieManager.getInstance().setAcceptCookie(enabled);
+//    }
+
     @SuppressLint("NewApi")
     public void setThirdPartyCookiesEnabled(final boolean enabled) {
         if (Build.VERSION.SDK_INT >= 21) {
             CookieManager.getInstance().setAcceptThirdPartyCookies(webView, enabled);
-        }else {
+        } else {
             CookieManager.getInstance().setAcceptCookie(true);
         }
     }
@@ -132,12 +177,18 @@ private static final String TAG = "SimpleWebActivity";
 
     @Override
     public void onBackPressed() {
-        startActivity( new Intent("com.modular.main.MainActivity"));
-        overridePendingTransition(com.core.app.R.anim.anim_activity_back_in,com.core.app.R.anim.anim_activity_back_out);
-        //overridePendingTransition(R.anim.anim_activity_back_in,R.anim.anim_activity_back_out);
+        startActivity(new Intent("com.modular.main.MainActivity"));
+        finish();
+        overridePendingTransition(com.core.app.R.anim.anim_activity_back_in, com.core.app.R.anim.anim_activity_back_out);
     }
 
     @Override
+    protected void onDestroy() {
+        super.onDestroy();
+        mTbsReaderView.onStop();
+    }
+
+        @Override
     public boolean onKeyDown(int keyCode, KeyEvent event) {
         if (keyCode == KeyEvent.KEYCODE_BACK && webView.canGoBack()) {
             webView.goBack();// 返回前一个页面
@@ -145,4 +196,10 @@ private static final String TAG = "SimpleWebActivity";
         }
         return super.onKeyDown(keyCode, event);
     }
+
+
+    @Override
+    public void onCallBackAction(Integer integer, Object o, Object o1) {
+        
+    }
 }

+ 4 - 3
app_modular/apputils/src/main/res/layout/activity_simple_web.xml

@@ -1,13 +1,14 @@
 <?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
     xmlns:tools="http://schemas.android.com/tools"
+    android:id="@+id/rl_root"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     tools:context="com.modular.apputils.activity.SimpleWebActivity">
-    <WebView
+    <com.tencent.smtt.sdk.WebView
         android:id="@+id/mSimpleWebView"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
         android:background="@color/linen" />
-</LinearLayout>
+</RelativeLayout>

+ 14 - 2
app_modular/appworks/src/main/AndroidManifest.xml

@@ -401,8 +401,20 @@
             android:theme="@style/StyledBlueIndicators"
             android:windowSoftInputMode="adjustPan|stateHidden" />
         <activity android:name=".activity.PublicInquiryDetailActivity" />
-        <activity android:name=".activity.CustomerInquiryDetailActivity"/>
-        <activity android:name=".OA.platform.activity.PurchaseDetailsActivity" />
+        
+        <activity android:name=".activity.CustomerInquiryDetailActivity">
+            <intent-filter>
+                <action android:name="com.modular.work.platform.activity.CustomerInquiryDetailActivity" />
+                <category android:name="android.intent.category.DEFAULT" />
+            </intent-filter>
+        </activity>
+        
+        <activity android:name=".OA.platform.activity.PurchaseDetailsActivity" >
+            <intent-filter>
+                <action android:name="com.modular.work.platform.activity.PurchaseDetailsActivity" />
+                <category android:name="android.intent.category.DEFAULT" />
+            </intent-filter>
+        </activity>
     </application>
 
 </manifest>

+ 0 - 1
app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/AddBusinessActivity.java

@@ -340,7 +340,6 @@ public class AddBusinessActivity extends OABaseActivity implements View.OnClickL
             @Override
             public void onResponse(Object t) {
                 String message = t.toString();
-                LogUtil.i("message=" + message);
                 judgeApprovers(mBcId);
             }
 

+ 0 - 1
app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/ScanDetailActivity.java

@@ -251,7 +251,6 @@ public class ScanDetailActivity extends BaseActivity implements View.OnClickList
         }
     };
     private void handleData(String message) throws Exception {
-        LogUtil.prinlnLongMsg("gongpengming", "message=" + message);
         JSONObject json = JSON.parseObject(message);
         boolean success = JSONUtil.getBoolean(json, "success");
         JSONObject object = JSONUtil.getJSONObject(json, "data");

+ 0 - 1
app_modular/appworks/src/main/java/com/uas/appworks/OA/platform/activity/PurchaseDetailsActivity.java

@@ -13,7 +13,6 @@ import android.widget.Toast;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
-import com.common.LogUtil;
 import com.common.data.DateFormatUtil;
 import com.common.data.JSONUtil;
 import com.common.data.ListUtils;

+ 1 - 27
app_modular/appworks/src/main/java/com/uas/appworks/OA/platform/adapter/ActivityAdapter.java

@@ -93,19 +93,16 @@ public class ActivityAdapter extends BaseAdapter {
         ImageLoader.getInstance().displayImage(model.getActImg(), finalHoder.contantImg, ImageConfig.getCharitableImageOptions(), new ImageLoadingListener() {
             @Override
             public void onLoadingStarted(String s, View view) {
-                LogUtil.i("onLoadingStarted view instanceof ImageView");
                 finalHoder.contantImg.setImageResource(R.drawable.charitable_def_image);
             }
 
             @Override
             public void onLoadingFailed(String s, View view, FailReason failReason) {
-                LogUtil.i("onLoadingFailed view instanceof ImageView");
                 finalHoder.contantImg.setImageResource(R.drawable.charitable_def_image);
             }
 
             @Override
             public void onLoadingComplete(String s, View view, Bitmap bitmap) {
-                LogUtil.i("onLoadingComplete view instanceof ImageView");
                 if (finalHoder.contantImg.getTag()!=null&& url.equals(finalHoder.contantImg.getTag())){
                     finalHoder.contantImg.setImageBitmap(bitmap);
                 }
@@ -113,7 +110,6 @@ public class ActivityAdapter extends BaseAdapter {
 
             @Override
             public void onLoadingCancelled(String s, View view) {
-                LogUtil.i("onLoadingCancelled view instanceof ImageView");
                 finalHoder.contantImg.setImageResource(R.drawable.charitable_def_image);
             }
         });
@@ -160,27 +156,5 @@ public class ActivityAdapter extends BaseAdapter {
         TextView subTv;
     }
 
-//    private ImageLoadingListener imageLoadingListener = new ImageLoadingListener() {
-//        @Override
-//        public void onLoadingStarted(String s, View view) {
-//            if (view instanceof ImageView) {
-//                LogUtil.i("onLoadingStarted view instanceof ImageView");
-//            }
-//        }
-//
-//        @Override
-//        public void onLoadingFailed(String s, View view, FailReason failReason) {
-//            LogUtil.i("onLoadingFailed view instanceof ImageView");
-//        }
-//
-//        @Override
-//        public void onLoadingComplete(String s, View view, Bitmap bitmap) {
-//            LogUtil.i("onLoadingComplete view instanceof ImageView");
-//        }
-//
-//        @Override
-//        public void onLoadingCancelled(String s, View view) {
-//            LogUtil.i("onLoadingCancelled view instanceof ImageView");
-//        }
-//    };
+
 }

+ 0 - 1
app_modular/appworks/src/main/java/com/uas/appworks/OA/platform/adapter/AutoPlayPagerAdapter.java

@@ -56,7 +56,6 @@ public class AutoPlayPagerAdapter extends AutoPagerAdapter implements View.OnCli
 		if (c!=null){
 			itemClickListener.clickItem( c);
 		}else{
-			LogUtil.i("c is null");
 		}
 	}
 

+ 2 - 1
app_modular/appworks/src/main/java/com/uas/appworks/OA/platform/adapter/PurchaseDetailsAdapter.java

@@ -57,7 +57,7 @@ public class PurchaseDetailsAdapter extends RecyclerView.Adapter<RecyclerView.Vi
     public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
         if (viewType == 0) {
             return new TotalViewHolder(parent);
-        } else if (viewType == (getItemCount() - 1)) {
+        } else if (viewType == ListUtils.getSize(purchases)) {
             return new BtnViewHolder(parent);
         }
         return new ViewHolder(parent);
@@ -79,6 +79,7 @@ public class PurchaseDetailsAdapter extends RecyclerView.Adapter<RecyclerView.Vi
         public BtnViewHolder(View itemView) {
             super(itemView);
             replyBtn = itemView.findViewById(R.id.replyBtn);
+            replyBtn.setVisibility(canReply ? View.VISIBLE : View.GONE);
         }
     }
 

+ 2 - 0
app_modular/appworks/src/main/res/layout/item_btn.xml

@@ -1,6 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
+    android:paddingTop="@dimen/padding"
+    android:paddingBottom="@dimen/padding"
     android:layout_height="wrap_content">
     <Button
         android:id="@+id/replyBtn"

+ 1 - 0
app_third/librarytbs/.gitignore

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

+ 24 - 0
app_third/librarytbs/build.gradle

@@ -0,0 +1,24 @@
+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(dir: 'libs', include: ['*.jar'])
+    testCompile deps.junit
+    compile deps.appcompatV7
+}

+ 25 - 0
app_third/librarytbs/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 /Users/xianfeng/Develop/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

+ 25 - 0
app_third/librarytbs/src/main/AndroidManifest.xml

@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.yifeng.sample.tbs">
+
+    <uses-permission android:name="android.permission.INTERNET" />
+    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
+    <uses-permission android:name="android.permission.DOWNLOAD_WITHOUT_NOTIFICATION" />
+    <uses-permission android:name="android.permission.ACCESS_DOWNLOAD_MANAGER" />
+    <uses-permission android:name="android.permission.WRITE_SETTINGS" />
+    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
+
+    <application
+        android:allowBackup="true"
+        android:supportsRtl="true">
+        <activity android:name=".TBSFilesActivity">
+            <intent-filter>
+                <action android:name="com.yifeng.sample.tbs.TBSFilesActivity" />
+
+                <category android:name="android.intent.category.DEFAULT" />
+            </intent-filter>
+        </activity>
+  
+    </application>
+
+</manifest>

+ 200 - 0
app_third/librarytbs/src/main/java/com/yifeng/sample/tbs/TBSFilesActivity.java

@@ -0,0 +1,200 @@
+package com.yifeng.sample.tbs;
+
+import android.app.DownloadManager;
+import android.app.DownloadManager.Request;
+import android.content.ActivityNotFoundException;
+import android.content.Intent;
+import android.database.ContentObserver;
+import android.database.Cursor;
+import android.net.Uri;
+import android.os.Bundle;
+import android.os.Environment;
+import android.os.Handler;
+import android.support.v7.app.AppCompatActivity;
+import android.text.TextUtils;
+import android.util.Log;
+import android.view.ViewGroup.LayoutParams;
+import android.widget.RelativeLayout;
+
+import com.tencent.smtt.sdk.TbsReaderView;
+import com.tencent.smtt.sdk.TbsReaderView.ReaderCallback;
+import com.tencent.smtt.sdk.WebSettings;
+import com.tencent.smtt.sdk.WebView;
+import com.tencent.smtt.sdk.WebViewClient;
+
+import java.io.File;
+
+/**
+  * @desc:接收两个参数 
+  * @author:Arison on 2018/1/16
+  */
+public class TBSFilesActivity extends AppCompatActivity implements ReaderCallback {
+
+  private TbsReaderView mTbsReaderView;
+
+  private String filepath;
+  private WebView webView;
+
+  private DownloadManager mDownloadManager;
+  private long mRequestId;
+  private DownloadObserver mDownloadObserver;
+  private String mFileUrl = "http://www.beijing.gov.cn/zhuanti/ggfw/htsfwbxzzt/shxfl/fw/P020150720516332194302.doc";
+  private String mFileName;
+  private String urlpath;
+
+  @Override
+  protected void onCreate(Bundle savedInstanceState) {
+    super.onCreate(savedInstanceState);
+    setContentView(R.layout.activity_tbsfile);
+    mTbsReaderView = new TbsReaderView(this, this);
+    webView= findViewById(R.id.mSimpleWebView);
+    RelativeLayout rootRl =findViewById(R.id.rl_root);
+    rootRl.addView(mTbsReaderView, new RelativeLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
+    mFileName = parseName(mFileUrl);
+    Intent intent=getIntent();
+    if (intent!=null){
+      filepath= intent.getStringExtra("filepath");
+      urlpath=intent.getStringExtra("urlpath");
+      if (TextUtils.isEmpty(filepath)) {
+          filepath = "/storage/emulated/0/uu/HTTP权威指南.pdf";
+      }else{
+        try {
+          if (isLocalExist()) {
+             displayFile();
+          } else {
+            //startDownload();//下载功能
+          }
+        } catch (Exception e) {
+          e.printStackTrace();
+        }
+      }
+      
+      if (!TextUtils.isEmpty(urlpath)){
+        webView.getSettings().setJavaScriptEnabled(true);
+        webView.getSettings().setAllowFileAccess(true);
+        webView.getSettings().setDomStorageEnabled(true);
+        webView.getSettings().setDatabaseEnabled(true);
+        webView.getSettings().setAppCacheEnabled(true);
+        webView.getSettings().setCacheMode(WebSettings.LOAD_DEFAULT);
+    
+        webView.setWebViewClient(new WebViewClient(){
+          public boolean shouldOverrideUrlLoading(WebView view, String url) {
+            if (url.startsWith(WebView.SCHEME_TEL) || url.startsWith("sms:") || url.startsWith(WebView.SCHEME_MAILTO)) {
+              try {
+                Intent intent = new Intent(Intent.ACTION_VIEW);
+                intent.setData(Uri.parse(url));
+                startActivity(intent);
+              } catch (ActivityNotFoundException ignored) {
+              }
+              return true;
+            }
+            webView.loadUrl(url);
+            return true;
+          }
+
+          public void onPageFinished(WebView view, String url) {
+            super.onPageFinished(view, url);
+          }
+        });
+        webView.loadUrl(urlpath);
+      }
+    }
+  }
+  
+  private void displayFile() {
+    Bundle bundle = new Bundle();
+    bundle.putString("filePath", filepath);
+    bundle.putString("tempPath", Environment.getExternalStorageDirectory().getPath());
+    boolean result = mTbsReaderView.preOpen(parseFormat(filepath), false);
+    if (result) {
+      mTbsReaderView.openFile(bundle);
+    }
+  }
+
+  private String parseFormat(String fileName) {
+    return fileName.substring(fileName.lastIndexOf(".") + 1);
+  }
+
+  private String parseName(String url) {
+    String fileName = null;
+    try {
+      fileName = url.substring(url.lastIndexOf("/") + 1);
+    } finally {
+      if (TextUtils.isEmpty(fileName)) {
+        fileName = String.valueOf(System.currentTimeMillis());
+      }
+    }
+    return fileName;
+  }
+
+  private boolean isLocalExist() {
+    return getLocalFile().exists();
+  }
+
+  private File getLocalFile() {
+    return new File(filepath);
+  }
+
+  
+  
+  private void startDownload() {
+    mDownloadObserver = new DownloadObserver(new Handler());
+    getContentResolver().registerContentObserver(Uri.parse("content://downloads/my_downloads"), true, mDownloadObserver);
+
+    mDownloadManager = (DownloadManager) getSystemService(DOWNLOAD_SERVICE);
+    DownloadManager.Request request = new DownloadManager.Request(Uri.parse(mFileUrl));
+    request.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, mFileName);
+    request.allowScanningByMediaScanner();
+    request.setNotificationVisibility(Request.VISIBILITY_HIDDEN);
+    mRequestId = mDownloadManager.enqueue(request);
+  }
+
+  private void queryDownloadStatus() {
+    DownloadManager.Query query = new DownloadManager.Query().setFilterById(mRequestId);
+    Cursor cursor = null;
+    try {
+      cursor = mDownloadManager.query(query);
+      if (cursor != null && cursor.moveToFirst()) {
+        //已经下载的字节数
+        int currentBytes = cursor.getInt(cursor.getColumnIndexOrThrow(DownloadManager.COLUMN_BYTES_DOWNLOADED_SO_FAR));
+        //总需下载的字节数
+        int totalBytes = cursor.getInt(cursor.getColumnIndexOrThrow(DownloadManager.COLUMN_TOTAL_SIZE_BYTES));
+        //状态所在的列索引
+        int status = cursor.getInt(cursor.getColumnIndex(DownloadManager.COLUMN_STATUS));
+        Log.i("downloadUpdate: ", currentBytes + " " + totalBytes + " " + status);
+       // mDownloadBtn.setText("正在下载:" + currentBytes + "/" + totalBytes);
+      }
+    } finally {
+      if (cursor != null) {
+        cursor.close();
+      }
+    }
+  }
+
+  @Override
+  public void onCallBackAction(Integer integer, Object o, Object o1) {
+
+  }
+
+  @Override
+  protected void onDestroy() {
+    super.onDestroy();
+    mTbsReaderView.onStop();
+    if (mDownloadObserver != null) {
+      getContentResolver().unregisterContentObserver(mDownloadObserver);
+    }
+  }
+
+  private class DownloadObserver extends ContentObserver {
+
+    private DownloadObserver(Handler handler) {
+      super(handler);
+    }
+
+    @Override
+    public void onChange(boolean selfChange, Uri uri) {
+      Log.i("downloadUpdate: ", "onChange(boolean selfChange, Uri uri)");
+      queryDownloadStatus();
+    }
+  }
+}

BIN
app_third/librarytbs/src/main/jniLibs/armeabi/liblbs.so


+ 18 - 0
app_third/librarytbs/src/main/res/layout/activity_index.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    tools:context="com.yifeng.sample.tbs.IndexActivity">
+
+    <Button
+        android:id="@+id/button"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignParentLeft="true"
+        android:layout_alignParentStart="true"
+       android:layout_centerInParent="true"
+       
+        android:text="Button" />
+</RelativeLayout>

+ 11 - 0
app_third/librarytbs/src/main/res/layout/activity_tbsfile.xml

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout
+  xmlns:android="http://schemas.android.com/apk/res/android"
+  android:id="@+id/rl_root"
+  android:layout_width="match_parent"
+  android:layout_height="match_parent">
+    <com.tencent.smtt.sdk.WebView
+        android:id="@+id/mSimpleWebView"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent" />
+</RelativeLayout>

BIN
app_third/librarytbs/src/main/res/mipmap-hdpi/ic_launcher.png


BIN
app_third/librarytbs/src/main/res/mipmap-hdpi/ic_launcher_round.png


BIN
app_third/librarytbs/src/main/res/mipmap-mdpi/ic_launcher.png


BIN
app_third/librarytbs/src/main/res/mipmap-mdpi/ic_launcher_round.png


BIN
app_third/librarytbs/src/main/res/mipmap-xhdpi/ic_launcher.png


BIN
app_third/librarytbs/src/main/res/mipmap-xhdpi/ic_launcher_round.png


BIN
app_third/librarytbs/src/main/res/mipmap-xxhdpi/ic_launcher.png


BIN
app_third/librarytbs/src/main/res/mipmap-xxhdpi/ic_launcher_round.png


BIN
app_third/librarytbs/src/main/res/mipmap-xxxhdpi/ic_launcher.png


BIN
app_third/librarytbs/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png


+ 6 - 0
app_third/librarytbs/src/main/res/values/colors.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+  <color name="colorPrimary">#3F51B5</color>
+  <color name="colorPrimaryDark">#303F9F</color>
+  <color name="colorAccent">#FF4081</color>
+</resources>

+ 3 - 0
app_third/librarytbs/src/main/res/values/strings.xml

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

+ 11 - 0
app_third/librarytbs/src/main/res/values/styles.xml

@@ -0,0 +1,11 @@
+<resources>
+
+  <!-- Base application theme. -->
+  <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
+    <!-- Customize your theme here. -->
+    <item name="colorPrimary">@color/colorPrimary</item>
+    <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
+    <item name="colorAccent">@color/colorAccent</item>
+  </style>
+
+</resources>

+ 18 - 0
app_third/librarytbs/src/test/java/com/yifeng/sample/tbs/ExampleUnitTest.java

@@ -0,0 +1,18 @@
+package com.yifeng.sample.tbs;
+
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+/**
+ * Example local unit test, which will execute on the development machine (host).
+ *
+ * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
+ */
+public class ExampleUnitTest {
+
+  @Test
+  public void addition_isCorrect() throws Exception {
+    assertEquals(4, 2 + 2);
+  }
+}

+ 2 - 0
settings.gradle

@@ -19,6 +19,7 @@ include ':apptasks'
 include ':apputils'
 
 //第三库模块
+include ':librarytbs'
 include ':lib-zxing'
 include ':libbdupdatesdk'
 include ':libedittextformlibrary'
@@ -50,6 +51,7 @@ project(':apptasks').projectDir = new File('app_modular/apptasks')
 project(':apputils').projectDir = new File('app_modular/apputils')
 
 //第三库模块
+project(':librarytbs').projectDir = new File('app_third/librarytbs')
 project(':lib-zxing').projectDir = new File('app_third/lib-zxing')
 project(':libbdupdatesdk').projectDir = new File('app_third/libbdupdatesdk')
 project(':library-viewpager-indicator').projectDir = new File('app_third/library-viewpager-indicator')