Bladeren bron

Merge remote-tracking branch 'origin/sheep_develop' into sheep_develop

zengjiebin 7 jaren geleden
bovenliggende
commit
882a7788b8

+ 180 - 125
app/src/main/AndroidManifest.xml

@@ -82,8 +82,9 @@
     <!-- 访问网络,网络定位需要上网-->
     <uses-permission android:name="android.permission.INTERNET" />
     <!-- SD卡读取权限,用户写入离线定位数据-->
-    <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"
-        tools:ignore="ProtectedPermissions"/>
+    <uses-permission
+        android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"
+        tools:ignore="ProtectedPermissions" />
     <!-- 百度定位权限 end -->
     <permission
         android:name="android.permission.PACKAGE_USAGE_STATS"
@@ -95,12 +96,20 @@
         android:fullBackupContent="@xml/backup_descriptor"
         android:icon="@mipmap/icon"
         android:label="@string/app_name"
+        android:largeHeap="true"
         android:persistent="true"
         android:supportsRtl="true"
-        android:largeHeap="true"
         android:theme="@style/AppTheme">
-        <meta-data android:name="design_width_in_dp" android:value="375"/>
-        <meta-data android:name="design_height_in_dp" android:value="667"/>
+        <meta-data
+            android:name="com.sheep.jiuyan.samllsheep.utils.GlideApp"
+            android:value="GlideModule" />
+        <meta-data
+            android:name="design_width_in_dp"
+            android:value="375" />
+        <meta-data
+            android:name="design_height_in_dp"
+            android:value="667" />
+
         <activity
             android:name=".wxapi.WXEntryActivity"
             android:exported="true"
@@ -113,11 +122,11 @@
         <service
             android:name=".service.FloatService"
             android:enabled="true"
-            android:exported="true"/>
+            android:exported="true" />
         <service
             android:name=".service.FloatShotScreenService"
             android:enabled="true"
-            android:exported="true"/>
+            android:exported="true" />
 
         <provider
             android:name=".provider.SheepFileProvider"
@@ -152,8 +161,7 @@
 
         <activity
             android:name="com.sheep.gamegroup.view.activity.PersonalInfoAct"
-            android:screenOrientation="portrait">
-        </activity>
+            android:screenOrientation="portrait"></activity>
 
         <!--2.0-->
         <activity
@@ -176,54 +184,68 @@
             </intent-filter>
         </activity>
 
-        <activity android:name="com.sheep.gamegroup.view.activity.PersonalCenterAct"
-            android:screenOrientation="portrait"/>
-        <activity android:name="com.sheep.gamegroup.view.activity.WithdrawalAct"
-            android:screenOrientation="portrait"/>
-        <activity android:name="com.sheep.gamegroup.view.activity.WithdrawalResultAct"
-            android:screenOrientation="portrait"/>
-        <activity android:name="com.sheep.gamegroup.view.activity.BindOrChangeWeixinAct"
-            android:screenOrientation="portrait"/>
-        <activity android:name="com.sheep.gamegroup.view.activity.TryMakeMoneyact"
-            android:screenOrientation="portrait"/>
-        <activity android:name="com.sheep.gamegroup.view.activity.GamemakeMoneyAct"
-            android:screenOrientation="portrait"/>
-        <activity android:name="com.sheep.gamegroup.view.activity.LieMakeMoneyAct"
-            android:launchMode="singleTask"/>
-        <activity android:name="com.sheep.gamegroup.view.activity.TaskListAct"
-            android:screenOrientation="portrait"/>
-        <activity android:name="com.sheep.gamegroup.view.activity.ActAudit"
-            android:screenOrientation="portrait"/>
-        <activity android:name="com.sheep.gamegroup.view.activity.GameTaskOrderListAct"
-            android:screenOrientation="portrait"/>
-        <activity android:name="com.sheep.gamegroup.view.activity.WithdrawalListAct"
-            android:screenOrientation="portrait"/>
-        <activity android:name="com.sheep.gamegroup.view.activity.ChangeTelAct"
-            android:screenOrientation="portrait"
-            android:launchMode="singleTask"/>
-        <activity android:name="com.sheep.gamegroup.view.activity.ActBindMobileRegister"
-            android:screenOrientation="portrait"
-            android:launchMode="singleTask"/>
-        <activity android:name="com.sheep.gamegroup.view.activity.TaskDetailAct"
-            android:screenOrientation="portrait"/>
-        <activity android:name="com.sheep.gamegroup.view.activity.DialogToastAct"
-            android:theme="@style/MyDialogActivityTheme"
-            />
+        <activity
+            android:name="com.sheep.gamegroup.view.activity.PersonalCenterAct"
+            android:screenOrientation="portrait" />
+        <activity
+            android:name="com.sheep.gamegroup.view.activity.WithdrawalAct"
+            android:screenOrientation="portrait" />
+        <activity
+            android:name="com.sheep.gamegroup.view.activity.WithdrawalResultAct"
+            android:screenOrientation="portrait" />
+        <activity
+            android:name="com.sheep.gamegroup.view.activity.BindOrChangeWeixinAct"
+            android:screenOrientation="portrait" />
+        <activity
+            android:name="com.sheep.gamegroup.view.activity.TryMakeMoneyact"
+            android:screenOrientation="portrait" />
+        <activity
+            android:name="com.sheep.gamegroup.view.activity.GamemakeMoneyAct"
+            android:screenOrientation="portrait" />
+        <activity
+            android:name="com.sheep.gamegroup.view.activity.LieMakeMoneyAct"
+            android:launchMode="singleTask" />
+        <activity
+            android:name="com.sheep.gamegroup.view.activity.TaskListAct"
+            android:screenOrientation="portrait" />
+        <activity
+            android:name="com.sheep.gamegroup.view.activity.ActAudit"
+            android:screenOrientation="portrait" />
+        <activity
+            android:name="com.sheep.gamegroup.view.activity.GameTaskOrderListAct"
+            android:screenOrientation="portrait" />
+        <activity
+            android:name="com.sheep.gamegroup.view.activity.WithdrawalListAct"
+            android:screenOrientation="portrait" />
+        <activity
+            android:name="com.sheep.gamegroup.view.activity.ChangeTelAct"
+            android:launchMode="singleTask"
+            android:screenOrientation="portrait" />
+        <activity
+            android:name="com.sheep.gamegroup.view.activity.ActBindMobileRegister"
+            android:launchMode="singleTask"
+            android:screenOrientation="portrait" />
+        <activity
+            android:name="com.sheep.gamegroup.view.activity.TaskDetailAct"
+            android:screenOrientation="portrait" />
+        <activity
+            android:name="com.sheep.gamegroup.view.activity.DialogToastAct"
+            android:theme="@style/MyDialogActivityTheme" />
 
         <!--&lt;!&ndash;半袋米首页&ndash;&gt;-->
         <!--<activity-->
-            <!--android:name="com.kfzs.duanduan.ActMain"-->
-            <!--android:configChanges="keyboardHidden|screenSize|orientation"-->
-            <!--android:exported="true"-->
-            <!--android:hardwareAccelerated="true"-->
-            <!--android:launchMode="singleTask"-->
-            <!--android:screenOrientation="portrait"-->
-            <!--android:theme="@style/AppTheme"-->
-            <!--android:windowSoftInputMode="adjustPan|stateHidden">-->
-            <!--<intent-filter>-->
-                <!--<category android:name="android.intent.category.DEFAULT" />-->
-                <!--<action android:name="android.intent.action.VIEW" />-->
-            <!--</intent-filter>-->
+        <!--android:name="com.kfzs.duanduan.ActMain"-->
+        <!--android:configChanges="keyboardHidden|screenSize|orientation"-->
+        <!--android:exported="true"-->
+        <!--android:hardwareAccelerated="true"-->
+        <!--android:launchMode="singleTask"-->
+        <!--android:screenOrientation="portrait"-->
+        <!--android:theme="@style/AppTheme"-->
+        <!--android:windowSoftInputMode="adjustPan|stateHidden">-->
+        <!--<intent-filter>-->
+        <!--<category android:name="android.intent.category.DEFAULT" />-->
+        <!--<action android:name="android.intent.action.VIEW" />-->
+        <!--</intent-filter>-->
         <!--</activity>-->
         <activity
             android:name="com.sheep.gamegroup.view.activity.ActMain"
@@ -250,9 +272,9 @@
             android:screenOrientation="portrait" />
 
         <!--<provider-->
-            <!--android:name="com.kfzs.duanduan.data.graph.provider.KFZSProvider"-->
-            <!--android:authorities="com.kfzs.duanduan.data.graph.provider.${DUANDUAN_GRAPH}"-->
-            <!--android:exported="true" />-->
+        <!--android:name="com.kfzs.duanduan.data.graph.provider.KFZSProvider"-->
+        <!--android:authorities="com.kfzs.duanduan.data.graph.provider.${DUANDUAN_GRAPH}"-->
+        <!--android:exported="true" />-->
 
 
         <receiver android:name="com.sheep.gamegroup.receiver.AppAddOrDelReceiver">
@@ -381,8 +403,8 @@
             android:screenOrientation="portrait" />
         <activity
             android:name="com.sheep.gamegroup.view.activity.MiddleScreenShotAct"
-            android:theme="@style/MyDialogActivityTheme"
-            android:screenOrientation="user" />
+            android:screenOrientation="user"
+            android:theme="@style/MyDialogActivityTheme" />
 
         <!--友盟start-->
         <meta-data
@@ -544,78 +566,111 @@
         <!--  百度定位 sdk start -->
         <meta-data
             android:name="com.baidu.lbsapi.API_KEY"
-            android:value="gXD6RhE7ncVIcl1crk5SeUoVm7ceNtkL" >
-        </meta-data>
-        <service android:name="com.baidu.location.f" android:enabled="true" android:process=":remote"> </service>
+            android:value="gXD6RhE7ncVIcl1crk5SeUoVm7ceNtkL"></meta-data>
+        <service
+            android:name="com.baidu.location.f"
+            android:enabled="true"
+            android:process=":remote"></service>
         <!--  百度定位 sdk end -->
 
-        <activity android:name="com.sheep.gamegroup.view.activity.ActNotice"
-            android:screenOrientation="portrait"/>
-        <activity android:name="com.sheep.gamegroup.view.activity.ActGuide"
-            android:screenOrientation="portrait"/>
-        <activity android:name="com.sheep.gamegroup.view.activity.ActLoadH5"
-            android:screenOrientation="portrait"/>
-        <activity android:name="com.sheep.gamegroup.view.activity.ActUserLabelList"
-            android:screenOrientation="portrait"/>
-        <activity android:name="com.sheep.gamegroup.view.activity.ActNewAboutUs"
-            android:screenOrientation="portrait"/>
-        <activity android:name="com.sheep.gamegroup.view.activity.ActInstallApkList"
-            android:screenOrientation="portrait"/>
-        <activity android:name="com.sheep.gamegroup.view.activity.ActSheepApkList"
-            android:screenOrientation="portrait"/>
-        <activity android:name="com.sheep.gamegroup.view.activity.ActSheepPngList"
-            android:screenOrientation="portrait"/>
-        <activity android:name="com.sheep.gamegroup.view.activity.ActFindGame"
-            android:screenOrientation="portrait"/>
-        <activity android:name="com.sheep.gamegroup.view.activity.ActFindInformation"
-            android:hardwareAccelerated="true"
-            android:configChanges="orientation|screenSize|keyboardHidden"/>
-        <activity android:name="com.sheep.gamegroup.view.activity.ActReservation"
-            android:screenOrientation="portrait"/>
-        <activity android:name="com.sheep.gamegroup.view.activity.ActGameAgencyRecharge"
-            android:screenOrientation="portrait"/>
-        <activity android:name="com.sheep.gamegroup.view.activity.ActGameAccount"
-            android:screenOrientation="portrait"/>
-        <activity android:name="com.sheep.gamegroup.view.activity.ActSearchGame"
-            android:screenOrientation="portrait"/>
-        <activity android:name="com.sheep.gamegroup.view.activity.ActSearchApp"
-            android:screenOrientation="portrait"/>
-        <activity android:name="com.sheep.gamegroup.view.activity.ActSetting"
-            android:screenOrientation="portrait"/>
-        <activity android:name="com.sheep.gamegroup.view.activity.ActMsg"
-            android:screenOrientation="portrait"/>
-        <activity android:name="com.sheep.gamegroup.view.activity.ActGameCenter"
-            android:screenOrientation="portrait"/>
-        <activity android:name="com.sheep.gamegroup.view.activity.ActDownloadWelfareList"
-            android:screenOrientation="portrait"/>
-        <activity android:name="com.sheep.gamegroup.view.activity.ActGiftCenter"
-            android:screenOrientation="portrait"/>
-        <activity android:name="com.sheep.gamegroup.view.activity.ActGiftDetail"
-            android:screenOrientation="portrait"/>
-        <activity android:name="com.sheep.gamegroup.view.activity.ActMyWelfare"
-            android:screenOrientation="portrait"/>
-        <activity android:name="com.sheep.gamegroup.view.activity.MessageInteractionDetailActivity"
-            android:exported="true"/>
-        <activity android:name="com.sheep.gamegroup.view.activity.ActModifyThird"
-            android:screenOrientation="portrait"/>
-        <activity android:name="com.sheep.gamegroup.view.activity.ActEverydayPlayGame"
-            android:screenOrientation="portrait"/>
-        <activity android:name="com.sheep.gamegroup.view.activity.ActPlayGameDetail"
-            android:screenOrientation="portrait"/>
-        <activity android:name="com.sheep.gamegroup.view.activity.ActSysNfDetail"
-            android:exported="true"/>
-        <activity android:name="com.sheep.gamegroup.view.activity.InvitationActivity"
-            android:screenOrientation="portrait"/>
-        <activity android:name="com.sheep.gamegroup.view.activity.ActInvitation"
-            android:screenOrientation="portrait"/>
+        <activity
+            android:name="com.sheep.gamegroup.view.activity.ActNotice"
+            android:screenOrientation="portrait" />
+        <activity
+            android:name="com.sheep.gamegroup.view.activity.ActGuide"
+            android:screenOrientation="portrait" />
+        <activity
+            android:name="com.sheep.gamegroup.view.activity.ActLoadH5"
+            android:screenOrientation="portrait" />
+        <activity
+            android:name="com.sheep.gamegroup.view.activity.ActUserLabelList"
+            android:screenOrientation="portrait" />
+        <activity
+            android:name="com.sheep.gamegroup.view.activity.ActNewAboutUs"
+            android:screenOrientation="portrait" />
+        <activity
+            android:name="com.sheep.gamegroup.view.activity.ActInstallApkList"
+            android:screenOrientation="portrait" />
+        <activity
+            android:name="com.sheep.gamegroup.view.activity.ActSheepApkList"
+            android:screenOrientation="portrait" />
+        <activity
+            android:name="com.sheep.gamegroup.view.activity.ActSheepPngList"
+            android:screenOrientation="portrait" />
+        <activity
+            android:name="com.sheep.gamegroup.view.activity.ActFindGame"
+            android:screenOrientation="portrait" />
+        <activity
+            android:name="com.sheep.gamegroup.view.activity.ActFindInformation"
+            android:configChanges="orientation|screenSize|keyboardHidden"
+            android:hardwareAccelerated="true" />
+        <activity
+            android:name="com.sheep.gamegroup.view.activity.ActReservation"
+            android:screenOrientation="portrait" />
+        <activity
+            android:name="com.sheep.gamegroup.view.activity.ActGameAgencyRecharge"
+            android:screenOrientation="portrait" />
+        <activity
+            android:name="com.sheep.gamegroup.view.activity.ActGameAccount"
+            android:screenOrientation="portrait" />
+        <activity
+            android:name="com.sheep.gamegroup.view.activity.ActSearchGame"
+            android:screenOrientation="portrait" />
+        <activity
+            android:name="com.sheep.gamegroup.view.activity.ActSearchApp"
+            android:screenOrientation="portrait" />
+        <activity
+            android:name="com.sheep.gamegroup.view.activity.ActSetting"
+            android:screenOrientation="portrait" />
+        <activity
+            android:name="com.sheep.gamegroup.view.activity.ActMsg"
+            android:screenOrientation="portrait" />
+        <activity
+            android:name="com.sheep.gamegroup.view.activity.ActGameCenter"
+            android:screenOrientation="portrait" />
+        <activity
+            android:name="com.sheep.gamegroup.view.activity.ActDownloadWelfareList"
+            android:screenOrientation="portrait" />
+        <activity
+            android:name="com.sheep.gamegroup.view.activity.ActGiftCenter"
+            android:screenOrientation="portrait" />
+        <activity
+            android:name="com.sheep.gamegroup.view.activity.ActGiftDetail"
+            android:screenOrientation="portrait" />
+        <activity
+            android:name="com.sheep.gamegroup.view.activity.ActMyWelfare"
+            android:screenOrientation="portrait" />
+        <activity
+            android:name="com.sheep.gamegroup.view.activity.MessageInteractionDetailActivity"
+            android:exported="true" />
+        <activity
+            android:name="com.sheep.gamegroup.view.activity.ActModifyThird"
+            android:screenOrientation="portrait" />
+        <activity
+            android:name="com.sheep.gamegroup.view.activity.ActEverydayPlayGame"
+            android:screenOrientation="portrait" />
+        <activity
+            android:name="com.sheep.gamegroup.view.activity.ActPlayGameDetail"
+            android:screenOrientation="portrait" />
+        <activity
+            android:name="com.sheep.gamegroup.view.activity.ActSysNfDetail"
+            android:exported="true" />
+        <activity
+            android:name="com.sheep.gamegroup.view.activity.InvitationActivity"
+            android:screenOrientation="portrait" />
+        <activity
+            android:name="com.sheep.gamegroup.view.activity.ActInvitation"
+            android:screenOrientation="portrait" />
 
         <!--start幂动科技-->
 
-        <activity android:name="com.sheep.gamegroup.view.activity.ActMiDong"
-            android:screenOrientation="portrait"/>
-        <activity android:name="com.sheep.gamegroup.view.activity.GameCertificationActivity"
+        <activity
+            android:name="com.sheep.gamegroup.view.activity.ActMiDong"
+            android:screenOrientation="portrait" />
+        <activity
+            android:name="com.sheep.gamegroup.view.activity.GameCertificationActivity"
             android:exported="true"
-            android:screenOrientation="portrait"/>
+            android:screenOrientation="portrait" />
 
         <service
             android:name="com.mdad.sdk.mdsdk.monitor.MonitorService"

+ 16 - 1
app/src/main/java/com/sheep/jiuyan/samllsheep/SheepApp.java

@@ -16,7 +16,6 @@ import com.baidu.location.BDLocation;
 import com.baidu.location.LocationClient;
 import com.baidu.location.LocationClientOption;
 import com.bumptech.glide.Glide;
-import com.bumptech.glide.GlideBuilder;
 import com.sheep.gamegroup.di.components.DaggerNetComponent;
 import com.sheep.gamegroup.di.components.NetComponent;
 import com.sheep.gamegroup.di.modules.NetModule;
@@ -454,6 +453,22 @@ public class SheepApp extends MultiDexApplication {
     }
 
     @Override
+    public void onLowMemory() {
+        super.onLowMemory();
+        /* 内存不足时让Glide清空内存缓存数据 */
+        Glide.get(this).clearMemory();
+    }
+
+    @Override
+    public void onTrimMemory(int level) {
+        super.onTrimMemory(level);
+        if (level == TRIM_MEMORY_UI_HIDDEN) {
+            Glide.get(this).clearMemory();
+        }
+        Glide.get(this).onTrimMemory(level);
+    }
+
+    @Override
     protected void attachBaseContext(Context base) {
         super.attachBaseContext(base);
         MultiDex.install(this);

+ 27 - 0
app/src/main/java/com/sheep/jiuyan/samllsheep/utils/GlideApp.java

@@ -0,0 +1,27 @@
+package com.sheep.jiuyan.samllsheep.utils;
+
+import android.content.Context;
+
+import com.bumptech.glide.Glide;
+import com.bumptech.glide.GlideBuilder;
+import com.bumptech.glide.Registry;
+import com.bumptech.glide.load.DecodeFormat;
+import com.bumptech.glide.module.GlideModule;
+
+/**
+ * Created By: zhoujuncai.
+ * Created Date: 2018/9/20.
+ * Description: Glide图片加载配置
+ */
+public class GlideApp implements GlideModule {
+
+    @Override
+    public void applyOptions(Context context, GlideBuilder builder) {
+        builder.setDecodeFormat(DecodeFormat.PREFER_RGB_565);
+    }
+
+    @Override
+    public void registerComponents(Context context, Glide glide, Registry registry) {
+
+    }
+}

+ 12 - 0
app/src/main/res/values/key_strings.xml

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <string name="kfzs_duanduan_datashare_game_code">kfzs:duanduan:game:code</string>
+    <string name="kfzs_duanduan_datashare_package_name">kfzs:duanduan:game:package:name</string>
+    <string name="kfzs_duanduan_datashare_package_extras">kfzs:duanduan:game:package:extras</string>
+    <string name="kfzs_duanduan_datashare_game_key">kfzs:duanduan:game:key</string>
+    <string name="kfzs_duanduan_datashare_certification_key">kfzs:duanduan:certification:key</string>
+    <string name="kfzs_duanduan_datashare_certification_cancel">kfzs:duanduan:certification:cancel</string>
+    <string name="kfzs_duanduan_datashare_certificationed">kfzs:duanduan:certificationed</string>
+    <string name="kfzs_duanduan_datashare_certification_userid">kfzs:duanduan:certification:userid</string>
+    <string name="kfzs_duanduan_datashare_certification_token">kfzs:duanduan:certification:token</string>
+</resources>