14px
44px
19px
+
+
+ 100px
+ 32px
+
572px
diff --git a/modules/mogo-module-v2x/src/main/res/values-mdpi/dimens.xml b/modules/mogo-module-v2x/src/main/res/values-mdpi/dimens.xml
index a580148415..af1575dcd3 100644
--- a/modules/mogo-module-v2x/src/main/res/values-mdpi/dimens.xml
+++ b/modules/mogo-module-v2x/src/main/res/values-mdpi/dimens.xml
@@ -99,6 +99,11 @@
14px
44px
19px
+
+
+ 100px
+ 32px
+
572px
diff --git a/modules/mogo-module-v2x/src/main/res/values-xhdpi-1920x1000/dimens.xml b/modules/mogo-module-v2x/src/main/res/values-xhdpi-1920x1000/dimens.xml
index 091c72520e..b43ce52f75 100644
--- a/modules/mogo-module-v2x/src/main/res/values-xhdpi-1920x1000/dimens.xml
+++ b/modules/mogo-module-v2x/src/main/res/values-xhdpi-1920x1000/dimens.xml
@@ -80,6 +80,11 @@
26px
80px
34px
+
+
+ 100px
+ 32px
+
940px
diff --git a/modules/mogo-module-v2x/src/main/res/values-xhdpi-2560x1440/dimens.xml b/modules/mogo-module-v2x/src/main/res/values-xhdpi-2560x1440/dimens.xml
new file mode 100644
index 0000000000..bd5d9c6937
--- /dev/null
+++ b/modules/mogo-module-v2x/src/main/res/values-xhdpi-2560x1440/dimens.xml
@@ -0,0 +1,50 @@
+
+
+ 1100px
+ 227px
+ 187px
+ 30px
+ 133px
+ 133px
+ 38px
+ 42px
+ 12px
+ 40px
+
+ 778px
+ 687px
+ 200px
+ 10px
+ 487px
+ 778px
+
+ 234px
+ 1067px
+ 187px
+
+ 107px
+ 47px
+
+ 35px
+ 48px
+ 35px
+ 36px
+ 64px
+ 108px
+
+ 53px
+
+ 200px
+ 854px
+ 187px
+ 133px
+ 133px
+ 480px
+ 42px
+ 40px
+
+
+ 133px
+ 42px
+
+
\ No newline at end of file
diff --git a/modules/mogo-module-v2x/src/main/res/values-xhdpi/dimens.xml b/modules/mogo-module-v2x/src/main/res/values-xhdpi/dimens.xml
index 1882f8ea15..6fc0fe97ff 100644
--- a/modules/mogo-module-v2x/src/main/res/values-xhdpi/dimens.xml
+++ b/modules/mogo-module-v2x/src/main/res/values-xhdpi/dimens.xml
@@ -17,6 +17,8 @@
670px
526px
+ 20px
+
147px
60px
40px
@@ -95,7 +97,8 @@
80px
- 182px
+ 882px
+ 182px
64px
60px
@@ -113,6 +116,11 @@
26px
80px
34px
+
+
+ 100px
+ 32px
+
940px
@@ -128,4 +136,34 @@
46px
26px
+ 140px
+ 20px
+ 100px
+ 100px
+ 30px
+ 32px
+ 8px
+ 30px
+
+ 800px
+ 140px
+
+ 80px
+ 35px
+
+ 27px
+ 40px
+ 27px
+ 24px
+ 42px
+ 80px
+ 40px
+ 150px
+ 640px
+ 140px
+ 100px
+ 100px
+ 480px
+ 32px
+ 30px
diff --git a/settings.gradle b/settings.gradle
index 8728c8634f..108f29c378 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -13,6 +13,7 @@ include ':tts:tts-noop'
include ':test:crashreport'
include ':test:crashreport-bugly'
include ':test:crashreport-noop'
+include ':test:crashreport-upgrade'
include ':skin:skin-support'
include ':skin:skin-support-appcompat'
include ':skin:skin-support-cardview'
@@ -24,8 +25,6 @@ include ':skin:mogo-skin-support-noop'
include ':skin:mogo-skin-support'
include ':modules:mogo-module-widgets'
include ':modules:mogo-module-monitor'
-include ':foudations:mogo-base-services-apk'
-include ':foudations:mogo-base-services-sdk'
include ':modules:mogo-module-splash-noop'
include ':modules:mogo-module-splash'
include ':modules:mogo-module-left-panel-noop'
diff --git a/test/crashreport-bugly/build.gradle b/test/crashreport-bugly/build.gradle
index 2ee98887fe..9c042db3df 100644
--- a/test/crashreport-bugly/build.gradle
+++ b/test/crashreport-bugly/build.gradle
@@ -49,7 +49,7 @@ dependencies {
implementation project(":foudations:mogo-commons")
}
- implementation 'com.tencent.bugly:crashreport:latest.release'
+ implementation 'com.tencent.bugly:crashreport_upgrade:latest.release'
//其中latest.release指代最新Bugly SDK版本号,也可以指定明确的版本号,例如2.1.9
implementation 'com.tencent.bugly:nativecrashreport:latest.release'
//其中latest.release指代最新Bugly NDK版本号,也可以指定明确的版本号,例如3.0
diff --git a/test/crashreport-upgrade/.gitignore b/test/crashreport-upgrade/.gitignore
new file mode 100644
index 0000000000..42afabfd2a
--- /dev/null
+++ b/test/crashreport-upgrade/.gitignore
@@ -0,0 +1 @@
+/build
\ No newline at end of file
diff --git a/test/crashreport-upgrade/build.gradle b/test/crashreport-upgrade/build.gradle
new file mode 100644
index 0000000000..e28fb2d408
--- /dev/null
+++ b/test/crashreport-upgrade/build.gradle
@@ -0,0 +1,55 @@
+apply plugin: 'com.android.library'
+apply plugin: 'com.alibaba.arouter'
+
+android {
+ compileSdkVersion rootProject.ext.android.compileSdkVersion
+ defaultConfig {
+ minSdkVersion rootProject.ext.android.minSdkVersion
+ targetSdkVersion rootProject.ext.android.targetSdkVersion
+ versionCode Integer.valueOf(VERSION_CODE)
+ versionName getValueFromRootProperties("${project.name.replace("-", "_").toUpperCase()}_VERSION")
+
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
+ consumerProguardFiles "consumer-rules.pro"
+
+ ndk {
+ // 设置支持的SO库架构
+ abiFilters 'armeabi' //, 'x86', 'armeabi-v7a', 'x86_64', 'arm64-v8a'
+ }
+
+ javaCompileOptions {
+ annotationProcessorOptions {
+ arguments = [AROUTER_MODULE_NAME: project.getName()]
+ }
+ }
+ }
+
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
+ }
+ }
+}
+
+dependencies {
+ implementation fileTree(dir: "libs", include: ["*.jar"])
+ implementation rootProject.ext.dependencies.androidxappcompat
+ implementation rootProject.ext.dependencies.arouter
+ annotationProcessor rootProject.ext.dependencies.aroutercompiler
+
+ if (Boolean.valueOf(RELEASE)) {
+ implementation rootProject.ext.dependencies.crashreport
+ implementation rootProject.ext.dependencies.mogoutils
+ implementation rootProject.ext.dependencies.mogocommons
+ } else {
+ implementation project(":test:crashreport")
+ implementation project(":foudations:mogo-utils")
+ implementation project(":foudations:mogo-commons")
+ }
+
+ implementation 'com.tencent.bugly:crashreport_upgrade:latest.release'
+ //其中latest.release指代最新版本号,也可以指定明确的版本号,例如1.2.0
+}
+
+apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()
\ No newline at end of file
diff --git a/test/crashreport-upgrade/consumer-rules.pro b/test/crashreport-upgrade/consumer-rules.pro
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/test/crashreport-upgrade/gradle.properties b/test/crashreport-upgrade/gradle.properties
new file mode 100644
index 0000000000..bcb33e8a94
--- /dev/null
+++ b/test/crashreport-upgrade/gradle.properties
@@ -0,0 +1,3 @@
+GROUP=com.mogo.test
+POM_ARTIFACT_ID=crashreport-upgrade
+VERSION_CODE=1
diff --git a/test/crashreport-upgrade/proguard-rules.pro b/test/crashreport-upgrade/proguard-rules.pro
new file mode 100644
index 0000000000..68dec0863c
--- /dev/null
+++ b/test/crashreport-upgrade/proguard-rules.pro
@@ -0,0 +1,24 @@
+# Add project specific ProGuard rules here.
+# You can control the set of applied configuration files using the
+# proguardFiles setting in build.gradle.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# 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
+-dontwarn com.tencent.bugly.**
+-keep public class com.tencent.bugly.**{*;}
+-keep class android.support.**{*;}
diff --git a/test/crashreport-upgrade/src/main/AndroidManifest.xml b/test/crashreport-upgrade/src/main/AndroidManifest.xml
new file mode 100644
index 0000000000..765c64126e
--- /dev/null
+++ b/test/crashreport-upgrade/src/main/AndroidManifest.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/test/crashreport-upgrade/src/main/java/com/mogo/test/crashreport/upgrade/UpgradeReportConstants.java b/test/crashreport-upgrade/src/main/java/com/mogo/test/crashreport/upgrade/UpgradeReportConstants.java
new file mode 100644
index 0000000000..8e2b0380b8
--- /dev/null
+++ b/test/crashreport-upgrade/src/main/java/com/mogo/test/crashreport/upgrade/UpgradeReportConstants.java
@@ -0,0 +1,15 @@
+package com.mogo.test.crashreport.upgrade;
+
+
+/**
+ * @author donghongyu
+ * @since 2020/9/9
+ *
+ * 描述
+ */
+public class UpgradeReportConstants {
+
+ public static final String PATH = "/upgradereport/api";
+
+ public static final String NAME = "UpgradeReportApi";
+}
diff --git a/test/crashreport-upgrade/src/main/java/com/mogo/test/crashreport/upgrade/UpgradeReportProvider.java b/test/crashreport-upgrade/src/main/java/com/mogo/test/crashreport/upgrade/UpgradeReportProvider.java
new file mode 100644
index 0000000000..18eb9acfce
--- /dev/null
+++ b/test/crashreport-upgrade/src/main/java/com/mogo/test/crashreport/upgrade/UpgradeReportProvider.java
@@ -0,0 +1,74 @@
+package com.mogo.test.crashreport.upgrade;
+
+import android.content.Context;
+import android.text.TextUtils;
+
+import com.alibaba.android.arouter.facade.annotation.Route;
+import com.alibaba.android.arouter.facade.template.IProvider;
+import com.mogo.commons.network.Utils;
+import com.mogo.utils.logger.Logger;
+import com.tencent.bugly.Bugly;
+import com.tencent.bugly.crashreport.CrashReport;
+
+import java.io.BufferedReader;
+import java.io.FileReader;
+import java.io.IOException;
+
+
+/**
+ * @author donghongyu
+ * @since 2020/9/9
+ *
+ * 升级模块
+ */
+@Route(path = UpgradeReportConstants.PATH)
+public class UpgradeReportProvider implements IProvider {
+
+ private static final String TAG = "UpgradeReportProvider";
+
+ @Override
+ public void init(Context context) {
+ Logger.d(TAG, "init");
+ String packageName = context.getPackageName();
+ String processName = getProcessName(android.os.Process.myPid());
+
+ //设置Bugly 用户策略(UserStrategy)
+ CrashReport.UserStrategy strategy = new CrashReport.UserStrategy(context);
+
+ strategy.setUploadProcess(processName == null || processName.equals(packageName));
+
+ CrashReport.putUserData(context, "serial", Utils.getSn());
+
+ Bugly.init(context, "f3f8b0b2f1", true, strategy);
+ }
+
+ /**
+ * 获取进程号对应的进程名
+ *
+ * @param pid 进程号
+ * @return 进程名
+ */
+ private static String getProcessName(int pid) {
+ BufferedReader reader = null;
+ try {
+ reader = new BufferedReader(new FileReader("/proc/" + pid + "/cmdline"));
+ String processName = reader.readLine();
+ if (!TextUtils.isEmpty(processName)) {
+ processName = processName.trim();
+ }
+ return processName;
+ } catch (Throwable throwable) {
+ throwable.printStackTrace();
+ } finally {
+ try {
+ if (reader != null) {
+ reader.close();
+ }
+ } catch (IOException exception) {
+ exception.printStackTrace();
+ }
+ }
+ return null;
+ }
+}
+
diff --git a/test/crashreport-upgrade/src/main/res/xml/provider_paths.xml b/test/crashreport-upgrade/src/main/res/xml/provider_paths.xml
new file mode 100644
index 0000000000..1b4e49502c
--- /dev/null
+++ b/test/crashreport-upgrade/src/main/res/xml/provider_paths.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file