merge
This commit is contained in:
2
.idea/gradle.xml
generated
2
.idea/gradle.xml
generated
@@ -13,8 +13,8 @@
|
||||
<option value="$PROJECT_DIR$" />
|
||||
<option value="$PROJECT_DIR$/app" />
|
||||
<option value="$PROJECT_DIR$/foudations" />
|
||||
<option value="$PROJECT_DIR$/foudations/mogo-commons" />
|
||||
<option value="$PROJECT_DIR$/foudations/mogo-httpdns" />
|
||||
<option value="$PROJECT_DIR$/foudations/mogo-network" />
|
||||
<option value="$PROJECT_DIR$/foudations/mogo-passport" />
|
||||
<option value="$PROJECT_DIR$/foudations/mogo-socket" />
|
||||
<option value="$PROJECT_DIR$/modules" />
|
||||
|
||||
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
@@ -13,7 +13,7 @@
|
||||
<option name="HEAP_SIZE" value="1024" />
|
||||
<option name="LOCALE" value="zh_CN" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="12" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
|
||||
@@ -1,135 +0,0 @@
|
||||
Index: build.gradle
|
||||
IDEA additional info:
|
||||
Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
|
||||
<+>// Top-level build file where you can add configuration options common to all sub-projects/modules.\napply from: \"config.gradle\"\n\nbuildscript {\n repositories {\n maven {\n url 'http://maven.aliyun.com/nexus/content/groups/public/'\n }\n maven {\n url 'http://nexus.zhidaoauto.com/repository/maven-releases/'\n }\n maven {\n url 'http://nexus.zhidaoauto.com/repository/maven-public/'\n }\n google()\n jcenter()\n }\n dependencies {\n classpath \"com.android.tools.build:gradle:4.0.2\"\n\n // NOTE: Do not place your application dependencies here; they belong\n // in the individual module build.gradle files\n }\n}\n\nallprojects {\n repositories {\n maven {\n url 'http://maven.aliyun.com/nexus/content/groups/public/'\n }\n maven {\n url 'http://nexus.zhidaoauto.com/repository/maven-releases/'\n }\n maven {\n url 'http://nexus.zhidaoauto.com/repository/maven-public/'\n }\n google()\n jcenter()\n }\n}\n\ntask clean(type: Delete) {\n delete rootProject.buildDir\n}
|
||||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
||||
<+>UTF-8
|
||||
===================================================================
|
||||
--- build.gradle (revision 398e43b09b74ac1319d2bdb60e1bac0c018ce1ff)
|
||||
+++ build.gradle (date 1611052524000)
|
||||
@@ -2,6 +2,7 @@
|
||||
apply from: "config.gradle"
|
||||
|
||||
buildscript {
|
||||
+ ext.kotlin_version = "1.3.72"
|
||||
repositories {
|
||||
maven {
|
||||
url 'http://maven.aliyun.com/nexus/content/groups/public/'
|
||||
@@ -17,6 +18,7 @@
|
||||
}
|
||||
dependencies {
|
||||
classpath "com.android.tools.build:gradle:4.0.2"
|
||||
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
Index: .idea/inspectionProfiles/Project_Default.xml
|
||||
IDEA additional info:
|
||||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
||||
<+>UTF-8
|
||||
===================================================================
|
||||
--- .idea/inspectionProfiles/Project_Default.xml (date 1611044633000)
|
||||
+++ .idea/inspectionProfiles/Project_Default.xml (date 1611044633000)
|
||||
@@ -0,0 +1,36 @@
|
||||
+<component name="InspectionProjectProfileManager">
|
||||
+ <profile version="1.0">
|
||||
+ <option name="myName" value="Project Default" />
|
||||
+ <inspection_tool class="JavaDoc" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
+ <option name="TOP_LEVEL_CLASS_OPTIONS">
|
||||
+ <value>
|
||||
+ <option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
|
||||
+ <option name="REQUIRED_TAGS" value="" />
|
||||
+ </value>
|
||||
+ </option>
|
||||
+ <option name="INNER_CLASS_OPTIONS">
|
||||
+ <value>
|
||||
+ <option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
|
||||
+ <option name="REQUIRED_TAGS" value="" />
|
||||
+ </value>
|
||||
+ </option>
|
||||
+ <option name="METHOD_OPTIONS">
|
||||
+ <value>
|
||||
+ <option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
|
||||
+ <option name="REQUIRED_TAGS" value="@return@param@throws or @exception" />
|
||||
+ </value>
|
||||
+ </option>
|
||||
+ <option name="FIELD_OPTIONS">
|
||||
+ <value>
|
||||
+ <option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
|
||||
+ <option name="REQUIRED_TAGS" value="" />
|
||||
+ </value>
|
||||
+ </option>
|
||||
+ <option name="IGNORE_DEPRECATED" value="false" />
|
||||
+ <option name="IGNORE_JAVADOC_PERIOD" value="true" />
|
||||
+ <option name="IGNORE_DUPLICATED_THROWS" value="false" />
|
||||
+ <option name="IGNORE_POINT_TO_ITSELF" value="false" />
|
||||
+ <option name="myAdditionalJavadocTags" value="date" />
|
||||
+ </inspection_tool>
|
||||
+ </profile>
|
||||
+</component>
|
||||
\ No newline at end of file
|
||||
Index: .idea/misc.xml
|
||||
IDEA additional info:
|
||||
Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
|
||||
<+><?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"ASMPluginConfiguration\">\n <asm skipDebug=\"false\" skipFrames=\"false\" skipCode=\"false\" expandFrames=\"false\" />\n <groovy codeStyle=\"LEGACY\" />\n </component>\n <component name=\"ProjectRootManager\" version=\"2\" languageLevel=\"JDK_1_7\" project-jdk-name=\"1.8\" project-jdk-type=\"JavaSDK\">\n <output url=\"file://$PROJECT_DIR$/build/classes\" />\n </component>\n <component name=\"ProjectType\">\n <option name=\"id\" value=\"Android\" />\n </component>\n</project>
|
||||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
||||
<+>UTF-8
|
||||
===================================================================
|
||||
--- .idea/misc.xml (revision 398e43b09b74ac1319d2bdb60e1bac0c018ce1ff)
|
||||
+++ .idea/misc.xml (date 1611045041000)
|
||||
@@ -4,7 +4,7 @@
|
||||
<asm skipDebug="false" skipFrames="false" skipCode="false" expandFrames="false" />
|
||||
<groovy codeStyle="LEGACY" />
|
||||
</component>
|
||||
- <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
+ <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
Index: .idea/vcs.xml
|
||||
IDEA additional info:
|
||||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
||||
<+>UTF-8
|
||||
===================================================================
|
||||
--- .idea/vcs.xml (date 1611044633000)
|
||||
+++ .idea/vcs.xml (date 1611044633000)
|
||||
@@ -0,0 +1,6 @@
|
||||
+<?xml version="1.0" encoding="UTF-8"?>
|
||||
+<project version="4">
|
||||
+ <component name="VcsDirectoryMappings">
|
||||
+ <mapping directory="" vcs="Git" />
|
||||
+ </component>
|
||||
+</project>
|
||||
\ No newline at end of file
|
||||
Index: .idea/compiler.xml
|
||||
IDEA additional info:
|
||||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
||||
<+>UTF-8
|
||||
===================================================================
|
||||
--- .idea/compiler.xml (date 1611045041000)
|
||||
+++ .idea/compiler.xml (date 1611045041000)
|
||||
@@ -0,0 +1,6 @@
|
||||
+<?xml version="1.0" encoding="UTF-8"?>
|
||||
+<project version="4">
|
||||
+ <component name="CompilerConfiguration">
|
||||
+ <bytecodeTargetLevel target="1.8" />
|
||||
+ </component>
|
||||
+</project>
|
||||
\ No newline at end of file
|
||||
Index: .idea/gradle.xml
|
||||
IDEA additional info:
|
||||
Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
|
||||
<+><?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"GradleMigrationSettings\" migrationVersion=\"1\" />\n <component name=\"GradleSettings\">\n <option name=\"linkedExternalProjectsSettings\">\n <GradleProjectSettings>\n <option name=\"testRunner\" value=\"PLATFORM\" />\n <option name=\"distributionType\" value=\"DEFAULT_WRAPPED\" />\n <option name=\"externalProjectPath\" value=\"$PROJECT_DIR$\" />\n <option name=\"gradleJvm\" value=\"1.8\" />\n <option name=\"modules\">\n <set>\n <option value=\"$PROJECT_DIR$\" />\n <option value=\"$PROJECT_DIR$/app\" />\n <option value=\"$PROJECT_DIR$/foudations\" />\n <option value=\"$PROJECT_DIR$/foudations/mogo-passport\" />\n </set>\n </option>\n <option name=\"resolveModulePerSourceSet\" value=\"false\" />\n </GradleProjectSettings>\n </option>\n </component>\n</project>
|
||||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
||||
<+>UTF-8
|
||||
===================================================================
|
||||
--- .idea/gradle.xml (revision 398e43b09b74ac1319d2bdb60e1bac0c018ce1ff)
|
||||
+++ .idea/gradle.xml (date 1611044633000)
|
||||
@@ -17,6 +17,7 @@
|
||||
</set>
|
||||
</option>
|
||||
<option name="resolveModulePerSourceSet" value="false" />
|
||||
+ <option name="useQualifiedModuleNames" value="true" />
|
||||
</GradleProjectSettings>
|
||||
</option>
|
||||
</component>
|
||||
@@ -1,4 +0,0 @@
|
||||
<changelist name="Uncommitted_changes_before_Update_at_1_19_21_6_39_PM_[Default_Changelist]" date="1611052761316" recycled="true" deleted="true">
|
||||
<option name="PATH" value="$PROJECT_DIR$/.idea/shelf/Uncommitted_changes_before_Update_at_1_19_21_6_39_PM_[Default_Changelist]/shelved.patch" />
|
||||
<option name="DESCRIPTION" value="Uncommitted changes before Update at 1/19/21 6:39 PM [Default Changelist]" />
|
||||
</changelist>
|
||||
@@ -6,7 +6,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>NetConstants.Companion</title>
|
||||
<meta name="date" content="2021-01-21">
|
||||
<meta name="keywords" content="com.mogo.cloud.commons.network.NetConstants.Companion class">
|
||||
<meta name="keywords" content="com.mogo.cloud.network.NetConstants.Companion class">
|
||||
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../../../script.js"></script>
|
||||
</head>
|
||||
@@ -92,7 +92,7 @@
|
||||
</div>
|
||||
<div class="contentContainer">
|
||||
<ul class="inheritance">
|
||||
<li>com.mogo.cloud.commons.network.NetConstants.Companion</li>
|
||||
<li>com.mogo.cloud.network.NetConstants.Companion</li>
|
||||
</ul>
|
||||
<div class="description">
|
||||
<ul class="blockList">
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>NetConstants</title>
|
||||
<meta name="date" content="2021-01-21">
|
||||
<meta name="keywords" content="com.mogo.cloud.commons.network.NetConstants class">
|
||||
<meta name="keywords" content="com.mogo.cloud.network.NetConstants class">
|
||||
<meta name="keywords" content="NO_DATA">
|
||||
<meta name="keywords" content="OK">
|
||||
<meta name="keywords" content="READ_TIMEOUT">
|
||||
@@ -101,7 +101,7 @@
|
||||
</div>
|
||||
<div class="contentContainer">
|
||||
<ul class="inheritance">
|
||||
<li>com.mogo.cloud.commons.network.NetConstants</li>
|
||||
<li>com.mogo.cloud.network.NetConstants</li>
|
||||
</ul>
|
||||
<div class="description">
|
||||
<ul class="blockList">
|
||||
@@ -133,7 +133,7 @@ describe:</p></p></div>
|
||||
<div class="block"><p><p>无数据</p></p></div>
|
||||
<dl>
|
||||
<dt><span class="seeLabel">另请参阅:</span></dt>
|
||||
<dd><a href="../../../../../constant-values.html#com.mogo.cloud.commons.network.NetConstants.NO_DATA">常量字段值</a></dd>
|
||||
<dd><a href="../../../../../constant-values.html#com.mogo.cloud.network.NetConstants.NO_DATA">常量字段值</a></dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -147,7 +147,7 @@ describe:</p></p></div>
|
||||
<div class="block"><p><p>数据返回正常</p></p></div>
|
||||
<dl>
|
||||
<dt><span class="seeLabel">另请参阅:</span></dt>
|
||||
<dd><a href="../../../../../constant-values.html#com.mogo.cloud.commons.network.NetConstants.OK">常量字段值</a></dd>
|
||||
<dd><a href="../../../../../constant-values.html#com.mogo.cloud.network.NetConstants.OK">常量字段值</a></dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -160,7 +160,7 @@ describe:</p></p></div>
|
||||
<pre>public static long READ_TIMEOUT</pre>
|
||||
<dl>
|
||||
<dt><span class="seeLabel">另请参阅:</span></dt>
|
||||
<dd><a href="../../../../../constant-values.html#com.mogo.cloud.commons.network.NetConstants.READ_TIMEOUT">常量字段值</a></dd>
|
||||
<dd><a href="../../../../../constant-values.html#com.mogo.cloud.network.NetConstants.READ_TIMEOUT">常量字段值</a></dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -173,7 +173,7 @@ describe:</p></p></div>
|
||||
<pre>public static long WRITE_TIMEOUT</pre>
|
||||
<dl>
|
||||
<dt><span class="seeLabel">另请参阅:</span></dt>
|
||||
<dd><a href="../../../../../constant-values.html#com.mogo.cloud.commons.network.NetConstants.WRITE_TIMEOUT">常量字段值</a></dd>
|
||||
<dd><a href="../../../../../constant-values.html#com.mogo.cloud.network.NetConstants.WRITE_TIMEOUT">常量字段值</a></dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -186,7 +186,7 @@ describe:</p></p></div>
|
||||
<pre>public static long CONNECT_TIMEOUT</pre>
|
||||
<dl>
|
||||
<dt><span class="seeLabel">另请参阅:</span></dt>
|
||||
<dd><a href="../../../../../constant-values.html#com.mogo.cloud.commons.network.NetConstants.CONNECT_TIMEOUT">常量字段值</a></dd>
|
||||
<dd><a href="../../../../../constant-values.html#com.mogo.cloud.network.NetConstants.CONNECT_TIMEOUT">常量字段值</a></dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -199,7 +199,7 @@ describe:</p></p></div>
|
||||
<pre>public static int HTTP_DNS_ADDRESS_TYPE_HTTP</pre>
|
||||
<dl>
|
||||
<dt><span class="seeLabel">另请参阅:</span></dt>
|
||||
<dd><a href="../../../../../constant-values.html#com.mogo.cloud.commons.network.NetConstants.HTTP_DNS_ADDRESS_TYPE_HTTP">常量字段值</a></dd>
|
||||
<dd><a href="../../../../../constant-values.html#com.mogo.cloud.network.NetConstants.HTTP_DNS_ADDRESS_TYPE_HTTP">常量字段值</a></dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -212,7 +212,7 @@ describe:</p></p></div>
|
||||
<pre>public static int HTTP_DNS_ADDRESS_TYPE_WS</pre>
|
||||
<dl>
|
||||
<dt><span class="seeLabel">另请参阅:</span></dt>
|
||||
<dd><a href="../../../../../constant-values.html#com.mogo.cloud.commons.network.NetConstants.HTTP_DNS_ADDRESS_TYPE_WS">常量字段值</a></dd>
|
||||
<dd><a href="../../../../../constant-values.html#com.mogo.cloud.network.NetConstants.HTTP_DNS_ADDRESS_TYPE_WS">常量字段值</a></dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -225,7 +225,7 @@ describe:</p></p></div>
|
||||
<pre>public static int HTTP_DNS_ADDRESS_TYPE_IM</pre>
|
||||
<dl>
|
||||
<dt><span class="seeLabel">另请参阅:</span></dt>
|
||||
<dd><a href="../../../../../constant-values.html#com.mogo.cloud.commons.network.NetConstants.HTTP_DNS_ADDRESS_TYPE_IM">常量字段值</a></dd>
|
||||
<dd><a href="../../../../../constant-values.html#com.mogo.cloud.network.NetConstants.HTTP_DNS_ADDRESS_TYPE_IM">常量字段值</a></dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -235,7 +235,7 @@ describe:</p></p></div>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>Companion</h4>
|
||||
<pre>public static com.mogo.cloud.commons.network.NetConstants.Companion Companion</pre>
|
||||
<pre>public static com.mogo.cloud.network.NetConstants.Companion Companion</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>OkHttpFactory.Companion</title>
|
||||
<meta name="date" content="2021-01-21">
|
||||
<meta name="keywords" content="com.mogo.cloud.commons.network.OkHttpFactory.Companion class">
|
||||
<meta name="keywords" content="com.mogo.cloud.network.OkHttpFactory.Companion class">
|
||||
<meta name="keywords" content="getOkHttpClient()">
|
||||
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../../../script.js"></script>
|
||||
@@ -93,7 +93,7 @@
|
||||
</div>
|
||||
<div class="contentContainer">
|
||||
<ul class="inheritance">
|
||||
<li>com.mogo.cloud.commons.network.OkHttpFactory.Companion</li>
|
||||
<li>com.mogo.cloud.network.OkHttpFactory.Companion</li>
|
||||
</ul>
|
||||
<div class="description">
|
||||
<ul class="blockList">
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>OkHttpFactory</title>
|
||||
<meta name="date" content="2021-01-21">
|
||||
<meta name="keywords" content="com.mogo.cloud.commons.network.OkHttpFactory class">
|
||||
<meta name="keywords" content="com.mogo.cloud.network.OkHttpFactory class">
|
||||
<meta name="keywords" content="Companion">
|
||||
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../../../script.js"></script>
|
||||
@@ -93,7 +93,7 @@
|
||||
</div>
|
||||
<div class="contentContainer">
|
||||
<ul class="inheritance">
|
||||
<li>com.mogo.cloud.commons.network.OkHttpFactory</li>
|
||||
<li>com.mogo.cloud.network.OkHttpFactory</li>
|
||||
</ul>
|
||||
<div class="description">
|
||||
<ul class="blockList">
|
||||
@@ -119,7 +119,7 @@
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>Companion</h4>
|
||||
<pre>public static com.mogo.cloud.commons.network.OkHttpFactory.Companion Companion</pre>
|
||||
<pre>public static com.mogo.cloud.network.OkHttpFactory.Companion Companion</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>RetrofitFactory</title>
|
||||
<meta name="date" content="2021-01-21">
|
||||
<meta name="keywords" content="com.mogo.cloud.commons.network.RetrofitFactory class">
|
||||
<meta name="keywords" content="com.mogo.cloud.network.RetrofitFactory class">
|
||||
<meta name="keywords" content="INSTANCE">
|
||||
<meta name="keywords" content="getInstance()">
|
||||
<meta name="keywords" content="getInstanceNoCallAdapter()">
|
||||
@@ -95,7 +95,7 @@
|
||||
</div>
|
||||
<div class="contentContainer">
|
||||
<ul class="inheritance">
|
||||
<li>com.mogo.cloud.commons.network.RetrofitFactory</li>
|
||||
<li>com.mogo.cloud.network.RetrofitFactory</li>
|
||||
</ul>
|
||||
<div class="description">
|
||||
<ul class="blockList">
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>HeaderNetworkInterceptor</title>
|
||||
<meta name="date" content="2021-01-21">
|
||||
<meta name="keywords" content="com.mogo.cloud.commons.network.interceptor.HeaderNetworkInterceptor class">
|
||||
<meta name="keywords" content="com.mogo.cloud.network.interceptor.HeaderNetworkInterceptor class">
|
||||
<meta name="keywords" content="intercept()">
|
||||
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../../../../script.js"></script>
|
||||
@@ -88,12 +88,12 @@
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<div class="header">
|
||||
<div class="subTitle">com.mogo.cloud.commons.network.interceptor</div>
|
||||
<div class="subTitle">com.mogo.cloud.network.interceptor</div>
|
||||
<h2 title="类 HeaderNetworkInterceptor" class="title">类 HeaderNetworkInterceptor</h2>
|
||||
</div>
|
||||
<div class="contentContainer">
|
||||
<ul class="inheritance">
|
||||
<li>com.mogo.cloud.commons.network.interceptor.HeaderNetworkInterceptor</li>
|
||||
<li>com.mogo.cloud.network.interceptor.HeaderNetworkInterceptor</li>
|
||||
</ul>
|
||||
<div class="description">
|
||||
<ul class="blockList">
|
||||
|
||||
@@ -4,14 +4,14 @@
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_242-release) on Thu Jan 21 15:56:54 CST 2021 -->
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>com.mogo.cloud.commons.network.interceptor</title>
|
||||
<title>com.mogo.cloud.network.interceptor</title>
|
||||
<meta name="date" content="2021-01-21">
|
||||
<meta name="keywords" content="com.mogo.cloud.commons.network.interceptor package">
|
||||
<meta name="keywords" content="com.mogo.cloud.network.interceptor package">
|
||||
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../../../../script.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1 class="bar"><a href="../../../../../../com/mogo/cloud/commons/network/interceptor/package-summary.html" target="classFrame">com.mogo.cloud.commons.network.interceptor</a></h1>
|
||||
<h1 class="bar"><a href="../../../../../../com/mogo/cloud/commons/network/interceptor/package-summary.html" target="classFrame">com.mogo.cloud.network.interceptor</a></h1>
|
||||
<div class="indexContainer">
|
||||
<h2 title="类">类</h2>
|
||||
<ul title="类">
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_242-release) on Thu Jan 21 15:56:54 CST 2021 -->
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>com.mogo.cloud.commons.network.interceptor</title>
|
||||
<title>com.mogo.cloud.network.interceptor</title>
|
||||
<meta name="date" content="2021-01-21">
|
||||
<meta name="keywords" content="com.mogo.cloud.commons.network.interceptor package">
|
||||
<meta name="keywords" content="com.mogo.cloud.network.interceptor package">
|
||||
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../../../../script.js"></script>
|
||||
</head>
|
||||
@@ -14,7 +14,7 @@
|
||||
<script type="text/javascript"><!--
|
||||
try {
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="com.mogo.cloud.commons.network.interceptor";
|
||||
parent.document.title="com.mogo.cloud.network.interceptor";
|
||||
}
|
||||
}
|
||||
catch(err) {
|
||||
@@ -71,7 +71,7 @@
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<div class="header">
|
||||
<h1 title="程序包" class="title">程序包 com.mogo.cloud.commons.network.interceptor</h1>
|
||||
<h1 title="程序包" class="title">程序包 com.mogo.cloud.network.interceptor</h1>
|
||||
</div>
|
||||
<div class="contentContainer">
|
||||
<ul class="blockList">
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_242-release) on Thu Jan 21 15:56:54 CST 2021 -->
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>com.mogo.cloud.commons.network.interceptor 类分层结构</title>
|
||||
<title>com.mogo.cloud.network.interceptor 类分层结构</title>
|
||||
<meta name="date" content="2021-01-21">
|
||||
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../../../../script.js"></script>
|
||||
@@ -13,7 +13,7 @@
|
||||
<script type="text/javascript"><!--
|
||||
try {
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="com.mogo.cloud.commons.network.interceptor \u7C7B\u5206\u5C42\u7ED3\u6784";
|
||||
parent.document.title="com.mogo.cloud.network.interceptor \u7C7B\u5206\u5C42\u7ED3\u6784";
|
||||
}
|
||||
}
|
||||
catch(err) {
|
||||
@@ -79,7 +79,7 @@
|
||||
<div class="contentContainer">
|
||||
<h2 title="类分层结构">类分层结构</h2>
|
||||
<ul>
|
||||
<li type="circle">com.mogo.cloud.commons.network.interceptor.<a href="../../../../../../com/mogo/cloud/commons/network/interceptor/HeaderNetworkInterceptor.html" title="com.mogo.cloud.commons.network.interceptor中的类"><span class="typeNameLink">HeaderNetworkInterceptor</span></a></li>
|
||||
<li type="circle">com.mogo.cloud.network.interceptor.<a href="../../../../../../com/mogo/cloud/commons/network/interceptor/HeaderNetworkInterceptor.html" title="com.mogo.cloud.commons.network.interceptor中的类"><span class="typeNameLink">HeaderNetworkInterceptor</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
|
||||
@@ -91,56 +91,56 @@
|
||||
</tr>
|
||||
<tbody>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a name="com.mogo.cloud.commons.network.NetConstants.CONNECT_TIMEOUT">
|
||||
<td class="colFirst"><a name="com.mogo.cloud.network.NetConstants.CONNECT_TIMEOUT">
|
||||
<!-- -->
|
||||
</a><code>public static long</code></td>
|
||||
<td><code><a href="com/mogo/cloud/commons/network/NetConstants.html#CONNECT_TIMEOUT">CONNECT_TIMEOUT</a></code></td>
|
||||
<td class="colLast"><code>15000</code></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a name="com.mogo.cloud.commons.network.NetConstants.HTTP_DNS_ADDRESS_TYPE_HTTP">
|
||||
<td class="colFirst"><a name="com.mogo.cloud.network.NetConstants.HTTP_DNS_ADDRESS_TYPE_HTTP">
|
||||
<!-- -->
|
||||
</a><code>public static int</code></td>
|
||||
<td><code><a href="com/mogo/cloud/commons/network/NetConstants.html#HTTP_DNS_ADDRESS_TYPE_HTTP">HTTP_DNS_ADDRESS_TYPE_HTTP</a></code></td>
|
||||
<td class="colLast"><code>0</code></td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a name="com.mogo.cloud.commons.network.NetConstants.HTTP_DNS_ADDRESS_TYPE_IM">
|
||||
<td class="colFirst"><a name="com.mogo.cloud.network.NetConstants.HTTP_DNS_ADDRESS_TYPE_IM">
|
||||
<!-- -->
|
||||
</a><code>public static int</code></td>
|
||||
<td><code><a href="com/mogo/cloud/commons/network/NetConstants.html#HTTP_DNS_ADDRESS_TYPE_IM">HTTP_DNS_ADDRESS_TYPE_IM</a></code></td>
|
||||
<td class="colLast"><code>2</code></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a name="com.mogo.cloud.commons.network.NetConstants.HTTP_DNS_ADDRESS_TYPE_WS">
|
||||
<td class="colFirst"><a name="com.mogo.cloud.network.NetConstants.HTTP_DNS_ADDRESS_TYPE_WS">
|
||||
<!-- -->
|
||||
</a><code>public static int</code></td>
|
||||
<td><code><a href="com/mogo/cloud/commons/network/NetConstants.html#HTTP_DNS_ADDRESS_TYPE_WS">HTTP_DNS_ADDRESS_TYPE_WS</a></code></td>
|
||||
<td class="colLast"><code>1</code></td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a name="com.mogo.cloud.commons.network.NetConstants.NO_DATA">
|
||||
<td class="colFirst"><a name="com.mogo.cloud.network.NetConstants.NO_DATA">
|
||||
<!-- -->
|
||||
</a><code>public static int</code></td>
|
||||
<td><code><a href="com/mogo/cloud/commons/network/NetConstants.html#NO_DATA">NO_DATA</a></code></td>
|
||||
<td class="colLast"><code>-800</code></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a name="com.mogo.cloud.commons.network.NetConstants.OK">
|
||||
<td class="colFirst"><a name="com.mogo.cloud.network.NetConstants.OK">
|
||||
<!-- -->
|
||||
</a><code>public static int</code></td>
|
||||
<td><code><a href="com/mogo/cloud/commons/network/NetConstants.html#OK">OK</a></code></td>
|
||||
<td class="colLast"><code>0</code></td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a name="com.mogo.cloud.commons.network.NetConstants.READ_TIMEOUT">
|
||||
<td class="colFirst"><a name="com.mogo.cloud.network.NetConstants.READ_TIMEOUT">
|
||||
<!-- -->
|
||||
</a><code>public static long</code></td>
|
||||
<td><code><a href="com/mogo/cloud/commons/network/NetConstants.html#READ_TIMEOUT">READ_TIMEOUT</a></code></td>
|
||||
<td class="colLast"><code>20000</code></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a name="com.mogo.cloud.commons.network.NetConstants.WRITE_TIMEOUT">
|
||||
<td class="colFirst"><a name="com.mogo.cloud.network.NetConstants.WRITE_TIMEOUT">
|
||||
<!-- -->
|
||||
</a><code>public static long</code></td>
|
||||
<td><code><a href="com/mogo/cloud/commons/network/NetConstants.html#WRITE_TIMEOUT">WRITE_TIMEOUT</a></code></td>
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
<dd> </dd>
|
||||
<dt><a href="com/mogo/cloud/commons/network/package-summary.html">com.mogo.cloud.commons.network</a> - 程序包 com.mogo.cloud.commons.network</dt>
|
||||
<dd> </dd>
|
||||
<dt><a href="com/mogo/cloud/commons/network/interceptor/package-summary.html">com.mogo.cloud.commons.network.interceptor</a> - 程序包 com.mogo.cloud.commons.network.interceptor</dt>
|
||||
<dt><a href="com/mogo/cloud/commons/network/interceptor/package-summary.html">com.mogo.cloud.network.interceptor</a> - 程序包 com.mogo.cloud.network.interceptor</dt>
|
||||
<dd> </dd>
|
||||
<dt><a href="com/mogo/cloud/commons/utils/package-summary.html">com.mogo.cloud.commons.utils</a> - 程序包 com.mogo.cloud.commons.utils</dt>
|
||||
<dd> </dd>
|
||||
@@ -112,7 +112,7 @@
|
||||
</a>
|
||||
<h2 class="title">H</h2>
|
||||
<dl>
|
||||
<dt><a href="com/mogo/cloud/commons/network/interceptor/HeaderNetworkInterceptor.html" title="com.mogo.cloud.commons.network.interceptor中的类"><span class="typeNameLink">HeaderNetworkInterceptor</span></a> - <a href="com/mogo/cloud/commons/network/interceptor/package-summary.html">com.mogo.cloud.commons.network.interceptor</a>中的类</dt>
|
||||
<dt><a href="com/mogo/cloud/commons/network/interceptor/HeaderNetworkInterceptor.html" title="com.mogo.cloud.commons.network.interceptor中的类"><span class="typeNameLink">HeaderNetworkInterceptor</span></a> - <a href="com/mogo/cloud/commons/network/interceptor/package-summary.html">com.mogo.cloud.network.interceptor</a>中的类</dt>
|
||||
<dd>
|
||||
<div class="block">created by wujifei on 2021/1/20 15:18
|
||||
describe:</div>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<ul title="程序包">
|
||||
<li><a href="com/mogo/cloud/commons/package-frame.html" target="packageFrame">com.mogo.cloud.commons</a></li>
|
||||
<li><a href="com/mogo/cloud/commons/network/package-frame.html" target="packageFrame">com.mogo.cloud.commons.network</a></li>
|
||||
<li><a href="com/mogo/cloud/commons/network/interceptor/package-frame.html" target="packageFrame">com.mogo.cloud.commons.network.interceptor</a></li>
|
||||
<li><a href="com/mogo/cloud/commons/network/interceptor/package-frame.html" target="packageFrame">com.mogo.cloud.network.interceptor</a></li>
|
||||
<li><a href="com/mogo/cloud/commons/utils/package-frame.html" target="packageFrame">com.mogo.cloud.commons.utils</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
<td class="colLast"> </td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a href="com/mogo/cloud/commons/network/interceptor/package-summary.html">com.mogo.cloud.commons.network.interceptor</a></td>
|
||||
<td class="colFirst"><a href="com/mogo/cloud/commons/network/interceptor/package-summary.html">com.mogo.cloud.network.interceptor</a></td>
|
||||
<td class="colLast"> </td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
<ul class="horizontal">
|
||||
<li><a href="com/mogo/cloud/commons/package-tree.html">com.mogo.cloud.commons</a>, </li>
|
||||
<li><a href="com/mogo/cloud/commons/network/package-tree.html">com.mogo.cloud.commons.network</a>, </li>
|
||||
<li><a href="com/mogo/cloud/commons/network/interceptor/package-tree.html">com.mogo.cloud.commons.network.interceptor</a>, </li>
|
||||
<li><a href="com/mogo/cloud/commons/network/interceptor/package-tree.html">com.mogo.cloud.network.interceptor</a>, </li>
|
||||
<li><a href="com/mogo/cloud/commons/utils/package-tree.html">com.mogo.cloud.commons.utils</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -88,7 +88,7 @@
|
||||
<li type="circle">com.mogo.cloud.commons.utils.<a href="com/mogo/cloud/commons/utils/NetworkUtilsKt.html" title="com.mogo.cloud.commons.utils中的类"><span class="typeNameLink">NetworkUtilsKt</span></a></li>
|
||||
<li type="circle">com.mogo.cloud.commons.network.<a href="com/mogo/cloud/commons/network/RetrofitFactory.html" title="com.mogo.cloud.commons.network中的类"><span class="typeNameLink">RetrofitFactory</span></a></li>
|
||||
<li type="circle">com.mogo.cloud.commons.utils.<a href="com/mogo/cloud/commons/utils/CoordinateUtils.html" title="com.mogo.cloud.commons.utils中的类"><span class="typeNameLink">CoordinateUtils</span></a></li>
|
||||
<li type="circle">com.mogo.cloud.commons.network.interceptor.<a href="com/mogo/cloud/commons/network/interceptor/HeaderNetworkInterceptor.html" title="com.mogo.cloud.commons.network.interceptor中的类"><span class="typeNameLink">HeaderNetworkInterceptor</span></a></li>
|
||||
<li type="circle">com.mogo.cloud.network.interceptor.<a href="com/mogo/cloud/commons/network/interceptor/HeaderNetworkInterceptor.html" title="com.mogo.cloud.commons.network.interceptor中的类"><span class="typeNameLink">HeaderNetworkInterceptor</span></a></li>
|
||||
<li type="circle">com.mogo.cloud.commons.<a href="com/mogo/cloud/commons/Sample.html" title="com.mogo.cloud.commons中的类"><span class="typeNameLink">Sample</span></a></li>
|
||||
<li type="circle">com.mogo.cloud.commons.network.<a href="com/mogo/cloud/commons/network/OkHttpFactory.html" title="com.mogo.cloud.commons.network中的类"><span class="typeNameLink">OkHttpFactory</span></a></li>
|
||||
</ul>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
com.mogo.cloud.commons
|
||||
com.mogo.cloud.commons.network
|
||||
com.mogo.cloud.commons.network.interceptor
|
||||
com.mogo.cloud.network.interceptor
|
||||
com.mogo.cloud.commons.utils
|
||||
|
||||
@@ -38,12 +38,12 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.androidxconstraintlayout
|
||||
|
||||
if (Boolean.valueOf(RELEASE)) {
|
||||
implementation "com.mogo.cloud:commons:${MOGO_COMMONS_VERSION}"
|
||||
implementation "com.mogo.cloud:network:${MOGO_NETWORK_VERSION}"
|
||||
implementation "com.mogo.cloud:socket:${MOGO_SOCKET_VERSION}"
|
||||
implementation "com.mogo.cloud:tanlu:${MOGO_TANLU_VERSION}"
|
||||
} else {
|
||||
implementation project(":foudations:mogo-socket")
|
||||
implementation project(":foudations:mogo-commons")
|
||||
implementation project(":foudations:mogo-network")
|
||||
implementation project(path: ':modules:mogo-tanlu')
|
||||
}
|
||||
|
||||
|
||||
@@ -2,11 +2,15 @@ package com.mogo.cloud;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import com.mogo.cloud.network.NetworkActivity;
|
||||
import com.mogo.cloud.passport.IMoGoTokenCallback;
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClient;
|
||||
|
||||
public class MainActivity extends AppCompatActivity {
|
||||
|
||||
@@ -14,15 +18,32 @@ public class MainActivity extends AppCompatActivity {
|
||||
private Button btnJumpNetWorkPort;
|
||||
private Button btnJumpRealTime;
|
||||
|
||||
private TextView tvSn;
|
||||
private TextView tvToken;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_main);
|
||||
|
||||
tvSn = findViewById(R.id.tvSn);
|
||||
tvToken = findViewById(R.id.tvToken);
|
||||
|
||||
initPassportInfo();
|
||||
|
||||
btnJumpPassPort = findViewById(R.id.btnJumpPassPort);
|
||||
btnJumpPassPort.setOnClickListener(v -> {
|
||||
Intent intent = new Intent(MainActivity.this, PassPortActivity.class);
|
||||
startActivity(intent);
|
||||
MoGoAiCloudClient.getInstance().refreshToken(new IMoGoTokenCallback() {
|
||||
@Override
|
||||
public void onTokenGot(String token, String sn) {
|
||||
initPassportInfo();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
btnJumpNetWorkPort = findViewById(R.id.btnJumpNetWorkPort);
|
||||
@@ -37,4 +58,21 @@ public class MainActivity extends AppCompatActivity {
|
||||
startActivity(intent);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化令牌信息
|
||||
*/
|
||||
private void initPassportInfo() {
|
||||
String sn = MoGoAiCloudClient.getInstance().getAiCloudClientConfig().getSn();
|
||||
String token = MoGoAiCloudClient.getInstance().getAiCloudClientConfig().getToken();
|
||||
|
||||
if (TextUtils.isEmpty(sn)) {
|
||||
sn = "获取失败,请重试";
|
||||
}
|
||||
if (TextUtils.isEmpty(token)) {
|
||||
token = "获取失败,请重试";
|
||||
}
|
||||
tvSn.setText("SN:" + sn);
|
||||
tvToken.setText("Token:" + token);
|
||||
}
|
||||
}
|
||||
@@ -20,23 +20,31 @@ public class MoGoApplication extends MultiDexApplication {
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
|
||||
// TODO 这里是模拟数据,真实情况需要传入真实的经纬度信息
|
||||
Random random = new Random();
|
||||
double randomLat = random.nextDouble();
|
||||
double randomLon = random.nextDouble();
|
||||
|
||||
/**
|
||||
/*
|
||||
* 注:thridPartyKey 自有App :wbvpzgar
|
||||
* BYD:bydauto
|
||||
*
|
||||
*/
|
||||
// 配置云服务API
|
||||
MoGoAiCloudClientConfig clientConfig = new MoGoAiCloudClientConfig();
|
||||
// 设置网络环境:HTTP_DNS_ENV_QA、HTTP_DNS_ENV_RELEASE、HTTP_DNS_ENV_DEV
|
||||
clientConfig.setNetMode(MogoHttpDnsConfig.HTTP_DNS_ENV_QA);
|
||||
// 设置是否是第三APP登录
|
||||
clientConfig.setThirdLogin(true);
|
||||
// 设置是否输出日志
|
||||
clientConfig.setShowDebugLog(true);
|
||||
// 设置从蘑菇AI开放平台获取的APPKey
|
||||
clientConfig.setThirdPartyAppKey("bydauto");
|
||||
// 设置车机设备的唯一标识(这些表识必须是通过后台录入的设备)
|
||||
clientConfig.setThirdPartyDeviceId("bydauto");
|
||||
// 设置循环检测间隔时间
|
||||
clientConfig.setLoopCheckDelay(15 * 1000);
|
||||
|
||||
// 设置DNS经纬度位置
|
||||
clientConfig.setIHttpDnsCurrentLocation(new IHttpDnsCurrentLocation() {
|
||||
@Nullable
|
||||
@Override
|
||||
@@ -45,6 +53,7 @@ public class MoGoApplication extends MultiDexApplication {
|
||||
}
|
||||
});
|
||||
|
||||
// 初始化SDK,可以设置状态回调来监听
|
||||
MoGoAiCloudClient.getInstance().init(this, clientConfig, null);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
package com.mogo.cloud;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import com.mogo.cloud.network.NetworkActivity;
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClient;
|
||||
|
||||
/**
|
||||
* 鉴权sdk测试页面
|
||||
*/
|
||||
public class PassPortActivity extends AppCompatActivity {
|
||||
|
||||
private Button btnRefreshToken;
|
||||
private TextView tvSn;
|
||||
private TextView tvToken;
|
||||
|
||||
private Button btnJumpToNet;
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_pass_port_actvity);
|
||||
|
||||
btnRefreshToken = findViewById(R.id.btnRefreshToken);
|
||||
tvSn = findViewById(R.id.tvSn);
|
||||
tvToken = findViewById(R.id.tvToken);
|
||||
btnJumpToNet = findViewById(R.id.btnJumpToNet);
|
||||
|
||||
btnRefreshToken.setOnClickListener(v -> {
|
||||
tvSn.setText("SN:" + MoGoAiCloudClient.getInstance().getAiCloudClientConfig().getSn());
|
||||
tvToken.setText("Token:" + MoGoAiCloudClient.getInstance().getAiCloudClientConfig().getToken());
|
||||
});
|
||||
|
||||
btnJumpToNet.setOnClickListener(v -> {
|
||||
Intent intent = new Intent(this, NetworkActivity.class);
|
||||
startActivity(intent);
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,5 @@
|
||||
package com.mogo.cloud.network;
|
||||
|
||||
import com.mogo.cloud.commons.network.BaseData;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import io.reactivex.Observable;
|
||||
|
||||
@@ -10,8 +10,6 @@ import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.mogo.cloud.R;
|
||||
import com.mogo.cloud.commons.network.BaseData;
|
||||
import com.mogo.cloud.commons.network.RetrofitFactory;
|
||||
import com.mogo.cloud.tanlu.MogoRoadSearchManager;
|
||||
import com.mogo.cloud.tanlu.MogoUploadManager;
|
||||
import com.mogo.cloud.tanlu.api.IRoadInfoSearchCallback;
|
||||
@@ -28,8 +26,7 @@ import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.disposables.Disposable;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
|
||||
import static com.mogo.cloud.commons.network.NetConstants.GEOFENCE_HOST;
|
||||
import static com.mogo.cloud.commons.network.NetConstants.REALTIME_LOCATION_HOST;
|
||||
import static com.mogo.cloud.network.NetConstants.GEOFENCE_HOST;
|
||||
|
||||
/**
|
||||
* created by wujifei on 2021/1/21 12:26
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
package com.mogo.cloud.network;
|
||||
|
||||
|
||||
import com.mogo.cloud.commons.network.BaseData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
package com.mogo.cloud.network;
|
||||
|
||||
import com.mogo.cloud.commons.network.BaseData;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* author : donghongyu
|
||||
* e-mail : 1358506549@qq.com
|
||||
|
||||
@@ -10,11 +10,27 @@
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSn"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
android:text="SN:"
|
||||
android:textSize="20dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvToken"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
android:text="Token:"
|
||||
android:textSize="20dp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnJumpPassPort"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="跳转PassPort测试" />
|
||||
android:text="刷新令牌" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnJumpNetWorkPort"
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context=".PassPortActivity">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnRefreshToken"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:text="刷新令牌" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSn"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:text="SN:"
|
||||
android:textSize="20dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvToken"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:text="Token:"
|
||||
android:textSize="20dp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnJumpToNet"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:text="跳转到网络测试" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -1,2 +0,0 @@
|
||||
-keep class com.mogo.cloud.commons.network.BaseData{*;}
|
||||
-keep class com.mogo.cloud.commons.network.NetConstants{*;}
|
||||
0
foudations/mogo-network/consumer-rules.pro
Normal file
0
foudations/mogo-network/consumer-rules.pro
Normal file
@@ -1,4 +1,4 @@
|
||||
GROUP=com.mogo.cloud
|
||||
POM_ARTIFACT_ID=commons
|
||||
POM_ARTIFACT_ID=network
|
||||
VERSION_CODE=1
|
||||
VERSION_NAME=1.0.2-SNAPSHOT
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.cloud.commons.network
|
||||
package com.mogo.cloud.network
|
||||
|
||||
import java.io.Serializable
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.cloud.commons.network
|
||||
package com.mogo.cloud.network
|
||||
|
||||
/**
|
||||
* created by wujifei on 2021/1/20 10:46
|
||||
@@ -1,13 +1,13 @@
|
||||
package com.mogo.cloud.commons.network
|
||||
package com.mogo.cloud.network
|
||||
|
||||
import com.mogo.cloud.commons.network.NetConstants.Companion.CONNECT_TIMEOUT
|
||||
import com.mogo.cloud.commons.network.NetConstants.Companion.READ_TIMEOUT
|
||||
import com.mogo.cloud.commons.network.NetConstants.Companion.WRITE_TIMEOUT
|
||||
import com.mogo.cloud.commons.network.SSLSocketFactoryUtils.createSSLSocketFactory
|
||||
import com.mogo.cloud.commons.network.SSLSocketFactoryUtils.createTrustAllManager
|
||||
import com.mogo.cloud.commons.network.interceptor.HttpHeaderInterceptor
|
||||
import com.mogo.cloud.commons.network.interceptor.HttpDnsInterceptor
|
||||
import com.mogo.cloud.commons.network.interceptor.HttpLoggingInterceptor
|
||||
import com.mogo.cloud.network.NetConstants.Companion.CONNECT_TIMEOUT
|
||||
import com.mogo.cloud.network.NetConstants.Companion.READ_TIMEOUT
|
||||
import com.mogo.cloud.network.NetConstants.Companion.WRITE_TIMEOUT
|
||||
import com.mogo.cloud.network.SSLSocketFactoryUtils.createSSLSocketFactory
|
||||
import com.mogo.cloud.network.SSLSocketFactoryUtils.createTrustAllManager
|
||||
import com.mogo.cloud.network.interceptor.HttpHeaderInterceptor
|
||||
import com.mogo.cloud.network.interceptor.HttpDnsInterceptor
|
||||
import com.mogo.cloud.network.interceptor.HttpLoggingInterceptor
|
||||
import okhttp3.OkHttpClient
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.cloud.commons.network
|
||||
package com.mogo.cloud.network
|
||||
|
||||
import androidx.collection.ArrayMap
|
||||
import retrofit2.Retrofit
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.cloud.commons.network
|
||||
package com.mogo.cloud.network
|
||||
|
||||
import java.security.SecureRandom
|
||||
import java.security.cert.CertificateException
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.cloud.commons.network.interceptor
|
||||
package com.mogo.cloud.network.interceptor
|
||||
|
||||
import com.mogo.cloud.httpdns.MogoHttpDnsClient
|
||||
import com.mogo.utils.logger.Logger
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.cloud.commons.network.interceptor
|
||||
package com.mogo.cloud.network.interceptor
|
||||
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClient
|
||||
import okhttp3.Interceptor
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.mogo.cloud.commons.network.interceptor
|
||||
package com.mogo.cloud.network.interceptor
|
||||
|
||||
import com.mogo.cloud.commons.network.NetConstants.Companion.TAG
|
||||
import com.mogo.cloud.network.NetConstants.Companion.TAG
|
||||
import com.mogo.utils.logger.Logger
|
||||
import okhttp3.*
|
||||
import okio.Buffer
|
||||
@@ -86,6 +86,11 @@ public class MoGoAiCloudClient {
|
||||
Log.i(TAG, "║ SN:" + result.sn);
|
||||
Log.i(TAG, "║ Token:" + result.token);
|
||||
Log.i(TAG, "═════════════════════════════════════");
|
||||
|
||||
// 本地存储
|
||||
SpStorage.setSn(result.sn);
|
||||
SpStorage.setToken(result.token);
|
||||
|
||||
if (tokenCallback != null) {
|
||||
tokenCallback.onTokenGot(result.token, result.sn);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.mogo.cloud.passport;
|
||||
|
||||
import com.mogo.utils.storage.SharedPrefsMgr;
|
||||
|
||||
/**
|
||||
* @author donghongyu
|
||||
* @since 2021-01-28
|
||||
* <p>
|
||||
* sp 公共缓存区域
|
||||
*/
|
||||
public class SpStorage {
|
||||
|
||||
public static String getToken() {
|
||||
return SharedPrefsMgr.getInstance(MoGoAiCloudClient.getInstance().getContext()).getString("token");
|
||||
}
|
||||
|
||||
public static void setToken(String token) {
|
||||
SharedPrefsMgr.getInstance(MoGoAiCloudClient.getInstance().getContext()).putString("token", token);
|
||||
}
|
||||
|
||||
public static String getSn() {
|
||||
return SharedPrefsMgr.getInstance(MoGoAiCloudClient.getInstance().getContext()).getString("sn");
|
||||
}
|
||||
|
||||
public static void setSn(String sn) {
|
||||
SharedPrefsMgr.getInstance(MoGoAiCloudClient.getInstance().getContext()).putString("sn", sn);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -25,9 +25,9 @@ PASSWORD=xintai2018
|
||||
# 编译模式: false - 依赖本地版本, true - 依赖 maven 版本
|
||||
RELEASE=false
|
||||
# AI CLOUD 云平台
|
||||
MOGO_COMMONS_VERSION=1.0.6-SNAPSHOT
|
||||
MOGO_HTTPDNS_VERSION=1.0.6-SNAPSHOT
|
||||
MOGO_PASSPORT_VERSION=1.0.6-SNAPSHOT
|
||||
MOGO_SOCKET_VERSION=1.0.6-SNAPSHOT
|
||||
MOGO_REALTIME_VERSION=1.0.6-SNAPSHOT
|
||||
MOGO_TANLU_VERSION=1.0.6-SNAPSHOT
|
||||
MOGO_NETWORK_VERSION=1.0.7-SNAPSHOT
|
||||
MOGO_HTTPDNS_VERSION=1.0.7-SNAPSHOT
|
||||
MOGO_PASSPORT_VERSION=1.0.7-SNAPSHOT
|
||||
MOGO_SOCKET_VERSION=1.0.7-SNAPSHOT
|
||||
MOGO_REALTIME_VERSION=1.0.7-SNAPSHOT
|
||||
MOGO_TANLU_VERSION=1.0.7-SNAPSHOT
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
:foudations:mogo-httpdns
|
||||
:foudations:mogo-passport
|
||||
:foudations:mogo-commons
|
||||
:foudations:mogo-network
|
||||
:foudations:mogo-socket
|
||||
:modules:mogo-realtime
|
||||
:modules:mogo-tanlu
|
||||
@@ -32,11 +32,11 @@ dependencies {
|
||||
api rootProject.ext.dependencies.spi
|
||||
|
||||
if (Boolean.valueOf(RELEASE)) {
|
||||
implementation "com.mogo.cloud:commons:${MOGO_COMMONS_VERSION}"
|
||||
implementation "com.mogo.cloud:network:${MOGO_NETWORK_VERSION}"
|
||||
implementation "com.mogo.cloud:socket:${MOGO_SOCKET_VERSION}"
|
||||
} else {
|
||||
implementation project(":foudations:mogo-socket")
|
||||
implementation project(":foudations:mogo-commons")
|
||||
implementation project(":foudations:mogo-network")
|
||||
}
|
||||
|
||||
}
|
||||
@@ -38,9 +38,9 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.videoprocessor
|
||||
|
||||
if (Boolean.valueOf(RELEASE)) {
|
||||
implementation "com.mogo.cloud:commons:${MOGO_COMMONS_VERSION}"
|
||||
implementation "com.mogo.cloud:network:${MOGO_NETWORK_VERSION}"
|
||||
} else {
|
||||
implementation project(path: ':foudations:mogo-commons')
|
||||
implementation project(path: ':foudations:mogo-network')
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import android.util.Log;
|
||||
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.mogo.cloud.commons.network.BaseData;
|
||||
import com.mogo.cloud.network.BaseData;
|
||||
import com.mogo.cloud.tanlu.api.ITanluUploadCallback;
|
||||
import com.mogo.cloud.tanlu.bean.InformationBody;
|
||||
import com.mogo.cloud.tanlu.bean.UploadInfo;
|
||||
|
||||
@@ -3,9 +3,9 @@ package com.mogo.cloud.tanlu;
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
import com.mogo.cloud.commons.network.BaseData;
|
||||
import com.mogo.cloud.commons.network.NetConstants;
|
||||
import com.mogo.cloud.commons.network.RetrofitFactory;
|
||||
import com.mogo.cloud.network.BaseData;
|
||||
import com.mogo.cloud.network.NetConstants;
|
||||
import com.mogo.cloud.network.RetrofitFactory;
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClient;
|
||||
import com.mogo.cloud.tanlu.api.IRoadInfoSearchCallback;
|
||||
import com.mogo.cloud.tanlu.bean.RoadInfoRequest;
|
||||
|
||||
@@ -4,9 +4,9 @@ import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.mogo.cloud.commons.network.BaseData;
|
||||
import com.mogo.cloud.commons.network.NetConstants;
|
||||
import com.mogo.cloud.commons.network.RetrofitFactory;
|
||||
import com.mogo.cloud.network.BaseData;
|
||||
import com.mogo.cloud.network.NetConstants;
|
||||
import com.mogo.cloud.network.RetrofitFactory;
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClient;
|
||||
import com.mogo.cloud.tanlu.api.ITanluUploadCallback;
|
||||
import com.mogo.cloud.tanlu.bean.InformationBody;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.mogo.cloud.tanlu.api;
|
||||
|
||||
import com.mogo.cloud.commons.network.BaseData;
|
||||
import com.mogo.cloud.network.BaseData;
|
||||
import com.mogo.cloud.tanlu.bean.RoadInfos;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.mogo.cloud.tanlu.api;
|
||||
|
||||
import com.mogo.cloud.commons.network.BaseData;
|
||||
import com.mogo.cloud.network.BaseData;
|
||||
import com.mogo.cloud.tanlu.bean.UploadResult;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.mogo.cloud.tanlu.net;
|
||||
|
||||
import com.mogo.cloud.commons.network.BaseData;
|
||||
import com.mogo.cloud.network.BaseData;
|
||||
import com.mogo.cloud.tanlu.bean.RoadInfos;
|
||||
import com.mogo.cloud.tanlu.bean.UploadResult;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
include ':foudations:mogo-socket'
|
||||
include ':modules:mogo-realtime'
|
||||
include ':modules:mogo-tanlu'
|
||||
include ':foudations:mogo-commons'
|
||||
include ':foudations:mogo-network'
|
||||
include ':foudations:mogo-httpdns'
|
||||
include ':foudations:mogo-passport'
|
||||
include ':app'
|
||||
|
||||
Reference in New Issue
Block a user