Sfoglia il codice sorgente

将所有gradle升级至31

hy 3 anni fa
parent
commit
0e5aebc0c1

+ 5 - 4
XRefreshView/build.gradle

1
apply plugin: 'com.android.library'
1
apply plugin: 'com.android.library'
2
2
3
android {
3
android {
4
    compileSdkVersion 29
5
    buildToolsVersion '29.0.2'
4
    def android = rootProject.ext.android
5
    compileSdkVersion android["compileSdkVersion"]
6
//    buildToolsVersion '29.0.2'
6
7
7
    resourcePrefix "XRefreshView"
8
    resourcePrefix "XRefreshView"
8
    defaultConfig {
9
    defaultConfig {
9
        minSdkVersion 24
10
        targetSdkVersion 29
10
        minSdkVersion android["minSdkVersion"]
11
        targetSdkVersion android["targetSdkVersion"]
11
        versionCode 1
12
        versionCode 1
12
        versionName "1.0.1"
13
        versionName "1.0.1"
13
    }
14
    }

+ 15 - 17
app/build.gradle

3
apply plugin: 'com.mob.sdk'
3
apply plugin: 'com.mob.sdk'
4
apply plugin: 'bugly'
4
apply plugin: 'bugly'
5
5
6
6
bugly {
7
bugly {
7
    appId = '900010422' // 注册时分配的App ID
8
    appId = '900010422' // 注册时分配的App ID
8
    appKey = 'mnhwhy8jP7Fq2G6b' // 注册时分配的App Key
9
    appKey = 'mnhwhy8jP7Fq2G6b' // 注册时分配的App Key
18
            storePassword 'd1ev123'
19
            storePassword 'd1ev123'
19
        }
20
        }
20
    }
21
    }
21
    compileSdkVersion 29
22
    buildToolsVersion '29.0.2'
22
    def android = rootProject.ext.android
23
24
    compileSdkVersion android["compileSdkVersion"]
23
25
24
    aaptOptions.cruncherEnabled = false
26
    aaptOptions.cruncherEnabled = false
25
    aaptOptions.useNewCruncher = false
27
    aaptOptions.useNewCruncher = false
30
    }
32
    }
31
33
32
    defaultConfig {
34
    defaultConfig {
33
        applicationId "com.electric.chargingpile"
34
        minSdkVersion 24
35
        targetSdkVersion 29
35
        applicationId android["applicationId"]
36
        minSdkVersion android["minSdkVersion"]
37
        targetSdkVersion android["targetSdkVersion"]
36
38
37
        multiDexEnabled true
39
        multiDexEnabled true
38
40
43
        flavorDimensions "default"
45
        flavorDimensions "default"
44
        vectorDrawables.useSupportLibrary = true
46
        vectorDrawables.useSupportLibrary = true
45
        manifestPlaceholders = rootProject.ext.manifestPlaceholders
47
        manifestPlaceholders = rootProject.ext.manifestPlaceholders
46
//        jackOptions {
47
//            enabled true
48
//        }
49
    }
50
    ndkVersion '22.1.7171670'
51
48
52
    dataBinding {
53
        enabled true
49
    }
50
    buildFeatures {
51
        dataBinding = true
54
    }
52
    }
55
53
56
    sourceSets.main {
54
    sourceSets.main {
111
109
112
    productFlavors {
110
    productFlavors {
113
        yingyongbao {}
111
        yingyongbao {}
114
115
        xiaomi {}
112
        xiaomi {}
116
        huawei {}
113
        huawei {}
117
        oppo {}
114
        oppo {}
193
    implementation 'com.zhy:flowlayout-lib:1.0.3'
190
    implementation 'com.zhy:flowlayout-lib:1.0.3'
194
    //类似与Event bus
191
    //类似与Event bus
195
    implementation 'com.squareup:otto:+'
192
    implementation 'com.squareup:otto:+'
196
    implementation 'org.greenrobot:greendao:3.2.0'
193
    implementation 'org.greenrobot:greendao:3.3.0'
197
    implementation 'org.greenrobot:greendao-generator:3.2.0'
194
    implementation 'org.greenrobot:greendao-generator:3.2.0'
198
    implementation 'com.github.yuweiguocn:GreenDaoUpgradeHelper:v2.1.0'
195
    implementation 'com.github.yuweiguocn:GreenDaoUpgradeHelper:v2.1.0'
199
    implementation 'com.github.ksoichiro:android-observablescrollview:+'
196
    implementation 'com.github.ksoichiro:android-observablescrollview:+'
234
    implementation 'com.afollestad.material-dialogs:commons:0.9.6.0'
231
    implementation 'com.afollestad.material-dialogs:commons:0.9.6.0'
235
    // 库过期,下载源码修改
232
    // 库过期,下载源码修改
236
    //    implementation 'com.github.Aspsine:IRecyclerView:0.0.7'
233
    //    implementation 'com.github.Aspsine:IRecyclerView:0.0.7'
237
    implementation 'com.github.LuckSiege.PictureSelector:picture_library:v2.5.6'
234
    //选择图片,查看图片
235
    implementation 'io.github.lucksiege:pictureselector:v2.7.3-rc10'
238
//    implementation files('libs/bugly_crash_release_3.2.2.jar')
236
//    implementation files('libs/bugly_crash_release_3.2.2.jar')
239
    implementation "androidx.camera:camera-camera2:1.1.0-alpha07"
237
    implementation "androidx.camera:camera-camera2:1.1.0-alpha07"
240
    implementation "androidx.camera:camera-core:1.1.0-alpha07"
238
    implementation "androidx.camera:camera-core:1.1.0-alpha07"
245
//    implementation 'com.squareup.picasso:picasso:2.71828'
243
//    implementation 'com.squareup.picasso:picasso:2.71828'
246
    // https://github.com/khoyron/Actionsheet-android
244
    // https://github.com/khoyron/Actionsheet-android
247
    implementation 'com.github.khoyron:Actionsheet-android:4'
245
    implementation 'com.github.khoyron:Actionsheet-android:4'
248
    implementation 'cn.jiguang.sdk:jpush:4.0.6'
249
    implementation 'cn.jiguang.sdk:jcore:2.8.2'
246
    implementation 'cn.jiguang.sdk:jpush:4.6.2'
247
    implementation 'cn.jiguang.sdk:jcore:3.2.2'
250
}
248
}

+ 7 - 3
app/src/main/AndroidManifest.xml

75
        tools:ignore="LockedOrientationActivity">
75
        tools:ignore="LockedOrientationActivity">
76
        <activity
76
        <activity
77
            android:name=".activity.CarOwnerCertificateListActivity"
77
            android:name=".activity.CarOwnerCertificateListActivity"
78
            android:launchMode="singleTask"></activity>
78
            android:launchMode="singleTask"/>
79
        <activity
79
        <activity
80
            android:exported="true"
80
            android:name=".activity.PrivacyAgreementActivity"
81
            android:name=".activity.PrivacyAgreementActivity"
81
            android:screenOrientation="portrait">
82
            android:screenOrientation="portrait">
82
            <intent-filter>
83
            <intent-filter>
86
        </activity>
87
        </activity>
87
        <activity
88
        <activity
88
            android:name=".activity.PermissionAgreementActivity"
89
            android:name=".activity.PermissionAgreementActivity"
89
            android:screenOrientation="portrait"></activity>
90
            android:screenOrientation="portrait"/>
90
        <activity
91
        <activity
91
            android:name=".activity.CarModelActivity"
92
            android:name=".activity.CarModelActivity"
92
            android:launchMode="singleTop"
93
            android:launchMode="singleTop"
627
            android:name=".activity.ChargingCommentActivity"
628
            android:name=".activity.ChargingCommentActivity"
628
            android:screenOrientation="portrait" />
629
            android:screenOrientation="portrait" />
629
        <activity
630
        <activity
631
            android:exported="true"
630
            android:name=".activity.NonSecretSeettingActivity"
632
            android:name=".activity.NonSecretSeettingActivity"
631
            android:launchMode="singleTask"
633
            android:launchMode="singleTask"
632
            android:screenOrientation="portrait">
634
            android:screenOrientation="portrait">
876
878
877
        <!-- User defined.  For test only  用户自定义接收消息器,3.0.7开始支持,目前新tag/alias接口设置结果会在该广播接收器对应的方法中回调-->
879
        <!-- User defined.  For test only  用户自定义接收消息器,3.0.7开始支持,目前新tag/alias接口设置结果会在该广播接收器对应的方法中回调-->
878
        <!--since 3.3.0 接收JPush相关事件-->
880
        <!--since 3.3.0 接收JPush相关事件-->
879
        <receiver android:name="com.electric.chargingpile.jpush.PushMessageReceiver">
881
        <receiver
882
            android:exported="false"
883
            android:name="com.electric.chargingpile.jpush.PushMessageReceiver">
880
            <intent-filter>
884
            <intent-filter>
881
                <action android:name="cn.jpush.android.intent.RECEIVE_MESSAGE" />
885
                <action android:name="cn.jpush.android.intent.RECEIVE_MESSAGE" />
882
                <category android:name="${applicationId}"></category>
886
                <category android:name="${applicationId}"></category>

+ 4 - 6
app/src/main/java/com/electric/chargingpile/activity/PublishVideoTopicActivity.java

47
import com.electric.chargingpile.util.Util;
47
import com.electric.chargingpile.util.Util;
48
import com.luck.picture.lib.PictureSelector;
48
import com.luck.picture.lib.PictureSelector;
49
import com.luck.picture.lib.animators.AnimationType;
49
import com.luck.picture.lib.animators.AnimationType;
50
import com.luck.picture.lib.camera.CustomCameraView;
51
import com.luck.picture.lib.config.PictureConfig;
50
import com.luck.picture.lib.config.PictureConfig;
52
import com.luck.picture.lib.config.PictureMimeType;
51
import com.luck.picture.lib.config.PictureMimeType;
53
import com.luck.picture.lib.entity.LocalMedia;
52
import com.luck.picture.lib.entity.LocalMedia;
54
import com.luck.picture.lib.tools.SdkVersionUtils;
55
import com.luck.pictureselector.GlideEngine;
53
import com.electric.chargingpile.engine.GlideEngine;
56
import com.umeng.analytics.MobclickAgent;
54
import com.umeng.analytics.MobclickAgent;
57
import com.upyun.library.common.UploadEngine;
55
import com.upyun.library.common.UploadEngine;
58
import com.upyun.library.listener.UpCompleteListener;
56
import com.upyun.library.listener.UpCompleteListener;
249
//                        .setPictureWindowAnimationStyle(mWindowAnimationStyle)// 自定义相册启动退出动画
247
//                        .setPictureWindowAnimationStyle(mWindowAnimationStyle)// 自定义相册启动退出动画
250
                        .setRecyclerAnimationMode(AnimationType.SLIDE_IN_BOTTOM_ANIMATION)// 列表动画效果
248
                        .setRecyclerAnimationMode(AnimationType.SLIDE_IN_BOTTOM_ANIMATION)// 列表动画效果
251
                        .isMaxSelectEnabledMask(true)// 选择数到了最大阀值列表是否启用蒙层效果
249
                        .isMaxSelectEnabledMask(true)// 选择数到了最大阀值列表是否启用蒙层效果
252
                        .setButtonFeatures(CustomCameraView.BUTTON_STATE_ONLY_RECORDER)// 设置自定义相机按钮状态
250
//                        .setButtonFeatures(CustomCameraView.BUTTON_STATE_ONLY_RECORDER)// 设置自定义相机按钮状态
253
                        .maxVideoSelectNum(1) // 视频最大选择数量
251
                        .maxVideoSelectNum(1) // 视频最大选择数量
254
                        .minVideoSelectNum(1)// 视频最小选择数量
252
                        .minVideoSelectNum(1)// 视频最小选择数量
255
                        //.closeAndroidQChangeVideoWH(!SdkVersionUtils.checkedAndroid_Q())// 关闭在AndroidQ下获取图片或视频宽高相反自动转换
253
                        //.closeAndroidQChangeVideoWH(!SdkVersionUtils.checkedAndroid_Q())// 关闭在AndroidQ下获取图片或视频宽高相反自动转换
256
                        .imageSpanCount(4)// 每行显示个数
254
                        .imageSpanCount(4)// 每行显示个数
257
                        .isReturnEmpty(false)// 未选择数据时点击按钮是否可以返回
255
                        .isReturnEmpty(false)// 未选择数据时点击按钮是否可以返回
258
                        .closeAndroidQChangeWH(true)//如果图片有旋转角度则对换宽高,默认为true
259
                        .closeAndroidQChangeVideoWH(!SdkVersionUtils.checkedAndroid_Q())// 如果视频有旋转角度则对换宽高,默认为false
256
//                        .closeAndroidQChangeWH(true)//如果图片有旋转角度则对换宽高,默认为true
257
//                        .closeAndroidQChangeVideoWH(!SdkVersionUtils.checkedAndroid_Q())// 如果视频有旋转角度则对换宽高,默认为false
260
                        .setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED)// 设置相册Activity方向,不设置默认使用系统
258
                        .setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED)// 设置相册Activity方向,不设置默认使用系统
261
                        .selectionMode(PictureConfig.MULTIPLE)// 多选 or 单选
259
                        .selectionMode(PictureConfig.MULTIPLE)// 多选 or 单选
262
                        .isPreviewVideo(true)// 是否可预览视频
260
                        .isPreviewVideo(true)// 是否可预览视频

+ 2 - 0
app/src/main/java/com/electric/chargingpile/application/MainApplication.java

203

203

204
    public void initJPush() {
204
    public void initJPush() {
205
        //极光
205
        //极光
206
        JPushInterface.setSmartPushEnable(this,true);
207

206
        JPushInterface.setDebugMode(BuildConfig.DEBUG);
208
        JPushInterface.setDebugMode(BuildConfig.DEBUG);
207
        JPushInterface.init(this);
209
        JPushInterface.init(this);
208
        Log.e("TAG", "initJPush: "+ JPushInterface.getRegistrationID(this) );
210
        Log.e("TAG", "initJPush: "+ JPushInterface.getRegistrationID(this) );

+ 1 - 3
app/src/main/java/com/luck/pictureselector/GlideEngine.java

1
package com.luck.pictureselector;
1
package com.electric.chargingpile.engine;
2
2
3
import android.content.Context;
3
import android.content.Context;
4
import android.graphics.Bitmap;
4
import android.graphics.Bitmap;
118
     * @param longImageView
118
     * @param longImageView
119
     * @ 已废弃
119
     * @ 已废弃
120
     */
120
     */
121
    @Override
122
    public void loadImage(@NonNull Context context, @NonNull String url,
121
    public void loadImage(@NonNull Context context, @NonNull String url,
123
                          @NonNull ImageView imageView,
122
                          @NonNull ImageView imageView,
124
                          SubsamplingScaleImageView longImageView) {
123
                          SubsamplingScaleImageView longImageView) {
188
     * @param url       图片路径
187
     * @param url       图片路径
189
     * @param imageView 承载图片ImageView
188
     * @param imageView 承载图片ImageView
190
     */
189
     */
191
    @Override
192
    public void loadAsGifImage(@NonNull Context context, @NonNull String url,
190
    public void loadAsGifImage(@NonNull Context context, @NonNull String url,
193
                               @NonNull ImageView imageView) {
191
                               @NonNull ImageView imageView) {
194
        Glide.with(context)
192
        Glide.with(context)

+ 6 - 4
autolayout/build.gradle

1
apply plugin: 'com.android.library'
1
apply plugin: 'com.android.library'
2
2
3
android {
3
android {
4
    compileSdkVersion 29
5
    buildToolsVersion '29.0.2'
4
    def android = rootProject.ext.android
5
6
    compileSdkVersion android["compileSdkVersion"]
7
//    buildToolsVersion '29.0.2'
6
    defaultConfig {
8
    defaultConfig {
7
        minSdkVersion 24
8
        targetSdkVersion 29
9
        minSdkVersion android["minSdkVersion"]
10
        targetSdkVersion android["targetSdkVersion"]
9
        versionCode 1
11
        versionCode 1
10
        versionName "1.0"
12
        versionName "1.0"
11
    }
13
    }

+ 5 - 10
build.gradle

1
// Top-level build file where you can add configuration options common to all sub-projects/modules.
1
// Top-level build file where you can add configuration options common to all sub-projects/modules.
2
apply from: "config.gradle"
2
buildscript {
3
buildscript {
3
//    apply plugin: 'bugly'
4
//    apply plugin: 'bugly'
4
//    apply plugin: 'org.greenrobot.greendao'
5
//    apply plugin: 'org.greenrobot.greendao'
11
        maven {url 'https://maven.aliyun.com/repository/google/'}
12
        maven {url 'https://maven.aliyun.com/repository/google/'}
12
        maven {url 'https://maven.aliyun.com/repository/public/'}
13
        maven {url 'https://maven.aliyun.com/repository/public/'}
13
        maven {url 'https://maven.aliyun.com/repository/gradle-plugin/'}
14
        maven {url 'https://maven.aliyun.com/repository/gradle-plugin/'}
15
        mavenCentral()
14
    }
16
    }
15
17
16
    dependencies {
18
    dependencies {
17
        classpath 'com.android.tools.build:gradle:3.6.3'
18
        classpath 'org.greenrobot:greendao-gradle-plugin:3.2.2'
19
        classpath 'com.android.tools.build:gradle:4.2.1'
20
        classpath 'org.greenrobot:greendao-gradle-plugin:3.3.0'
19
        classpath 'com.tencent.bugly:symtabfileuploader:latest.release'
21
        classpath 'com.tencent.bugly:symtabfileuploader:latest.release'
20
22
21
        classpath "com.mob.sdk:MobSDK:+"
23
        classpath "com.mob.sdk:MobSDK:+"
31
        maven {url 'https://maven.aliyun.com/repository/gradle-plugin/'}
33
        maven {url 'https://maven.aliyun.com/repository/gradle-plugin/'}
32
        maven { url "https://www.jitpack.io" }
34
        maven { url "https://www.jitpack.io" }
33
        maven { url 'https://repo1.maven.org/maven2/' }
35
        maven { url 'https://repo1.maven.org/maven2/' }
36
        mavenCentral()
34
    }
37
    }
35
}
38
}
36
ext{
37
    manifestPlaceholders= [
38
            JPUSH_PKGNAME : "com.electric.chargingpile",
39
            JPUSH_APPKEY  : "19fde8a6fe56b6918522bfa3", //JPush 上注册的包名对应的 Appkey.
40
            JPUSH_CHANNEL : "developer-default", //暂时填写默认值即可.
41
    ]
42
43
}

+ 14 - 0
config.gradle

1
ext{
2
    android = [
3
            compileSdkVersion: 31,
4
            applicationId    : "com.electric.chargingpile",
5
            minSdkVersion    : 24,
6
            targetSdkVersion : 31,
7
    ]
8
9
    manifestPlaceholders= [
10
            JPUSH_PKGNAME : "com.electric.chargingpile",
11
            JPUSH_APPKEY  : "19fde8a6fe56b6918522bfa3", //JPush 上注册的包名对应的 Appkey.
12
            JPUSH_CHANNEL : "developer-default", //暂时填写默认值即可.
13
    ]
14
}

+ 1 - 1
gradle/wrapper/gradle-wrapper.properties

4
zipStoreBase=GRADLE_USER_HOME
4
zipStoreBase=GRADLE_USER_HOME
5
org.gradle.jvmargs=-Xmx4096m -XX\:MaxPermSize\=6144m
5
org.gradle.jvmargs=-Xmx4096m -XX\:MaxPermSize\=6144m
6
zipStorePath=wrapper/dists
6
zipStorePath=wrapper/dists
7
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
7
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip

+ 5 - 3
library/build.gradle

1
apply plugin: 'com.android.library'
1
apply plugin: 'com.android.library'
2
android {
2
android {
3
    compileSdkVersion 29
4
    buildToolsVersion '29.0.2'
3
    def android = rootProject.ext.android
4
5
    compileSdkVersion android["compileSdkVersion"]
6
//    buildToolsVersion '29.0.2'
5
7
6
    defaultConfig {
8
    defaultConfig {
7
        minSdkVersion 24
9
        minSdkVersion android["minSdkVersion"]
8
    }
10
    }
9
11
10
    buildTypes {
12
    buildTypes {

+ 7 - 4
zxing/build.gradle

1
apply plugin: 'com.android.library'
1
apply plugin: 'com.android.library'
2
2
3
android {
3
android {
4
    compileSdkVersion 29
5
    buildToolsVersion '29.0.2'
4
    def android = rootProject.ext.android
5
    compileSdkVersion android["compileSdkVersion"]
6
7
//    buildToolsVersion '29.0.2'
6
    defaultConfig {
8
    defaultConfig {
7
        minSdkVersion 24
8
        targetSdkVersion 29
9
        minSdkVersion android["minSdkVersion"]
10
11
        targetSdkVersion android["targetSdkVersion"]
9
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
12
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
10
    }
13
    }
11
    buildTypes {
14
    buildTypes {

+ 7 - 1
zxing/src/main/AndroidManifest.xml

35
    <application
35
    <application
36
        android:label="@string/app_name"
36
        android:label="@string/app_name"
37
        >
37
        >
38
        <activity android:name=".CaptureActivity"
38
        <activity
39
            android:exported="true"
40
            android:name=".CaptureActivity"
39
            android:screenOrientation="portrait"
41
            android:screenOrientation="portrait"
40
            android:clearTaskOnLaunch="true"
42
            android:clearTaskOnLaunch="true"
41
            android:stateNotNeeded="true"
43
            android:stateNotNeeded="true"
83
        </activity>
85
        </activity>
84
        <activity android:name=".PreferencesActivity"
86
        <activity android:name=".PreferencesActivity"
85
            android:label="@string/preferences_name"
87
            android:label="@string/preferences_name"
88
            android:exported="true"
86
            android:stateNotNeeded="true"/>
89
            android:stateNotNeeded="true"/>
87
        <activity android:name=".encode.EncodeActivity"
90
        <activity android:name=".encode.EncodeActivity"
91
            android:exported="true"
88
            android:stateNotNeeded="true">
92
            android:stateNotNeeded="true">
89
            <intent-filter>
93
            <intent-filter>
90
                <action android:name="com.google.zxing.client.android.ENCODE"/>
94
                <action android:name="com.google.zxing.client.android.ENCODE"/>
106
        <activity android:name=".book.SearchBookContentsActivity"
110
        <activity android:name=".book.SearchBookContentsActivity"
107
            android:label="@string/sbc_name"
111
            android:label="@string/sbc_name"
108
            android:stateNotNeeded="true"
112
            android:stateNotNeeded="true"
113
            android:exported="true"
109
            android:screenOrientation="sensorLandscape">
114
            android:screenOrientation="sensorLandscape">
110
            <intent-filter>
115
            <intent-filter>
111
                <action android:name="com.google.zxing.client.android.SEARCH_BOOK_CONTENTS"/>
116
                <action android:name="com.google.zxing.client.android.SEARCH_BOOK_CONTENTS"/>
114
        </activity>
119
        </activity>
115
        <activity android:name=".share.ShareActivity"
120
        <activity android:name=".share.ShareActivity"
116
            android:stateNotNeeded="true"
121
            android:stateNotNeeded="true"
122
            android:exported="true"
117
            android:screenOrientation="user">
123
            android:screenOrientation="user">
118
            <intent-filter>
124
            <intent-filter>
119
                <action android:name="com.google.zxing.client.android.SHARE"/>
125
                <action android:name="com.google.zxing.client.android.SHARE"/>

+ 3 - 2
zxing/src/main/java/com/google/zxing/client/android/SystemTypeUtil.java

30
    private static final String KEY_MIUI_VERSION_CODE = "ro.miui.ui.version.code";
30
    private static final String KEY_MIUI_VERSION_CODE = "ro.miui.ui.version.code";
31
    private static final String KEY_MIUI_VERSION_NAME = "ro.miui.ui.version.name";
31
    private static final String KEY_MIUI_VERSION_NAME = "ro.miui.ui.version.name";
32
    private static final String KEY_MIUI_INTERNAL_STORAGE = "ro.miui.internal.storage";
32
    private static final String KEY_MIUI_INTERNAL_STORAGE = "ro.miui.internal.storage";
33
    private static final String APPLICATION_ID = "com.electric.chargingpile";
33
34
34
35
35
    /**
36
    /**
85
//            ToastUtil.show("我是魅族");
86
//            ToastUtil.show("我是魅族");
86
            Intent intent = new Intent("com.meizu.safe.security.SHOW_APPSEC");
87
            Intent intent = new Intent("com.meizu.safe.security.SHOW_APPSEC");
87
            intent.addCategory(Intent.CATEGORY_DEFAULT);
88
            intent.addCategory(Intent.CATEGORY_DEFAULT);
88
            intent.putExtra("packageName", BuildConfig.APPLICATION_ID);
89
            intent.putExtra("packageName", APPLICATION_ID);
89
            try {
90
            try {
90
                context.startActivity(intent);
91
                context.startActivity(intent);
91
            } catch (Exception e) {
92
            } catch (Exception e) {
97
            Intent intent = new Intent("miui.intent.action.APP_PERM_EDITOR");
98
            Intent intent = new Intent("miui.intent.action.APP_PERM_EDITOR");
98
            ComponentName componentName = new ComponentName("com.miui.securitycenter", "com.miui.permcenter.permissions.AppPermissionsEditorActivity");
99
            ComponentName componentName = new ComponentName("com.miui.securitycenter", "com.miui.permcenter.permissions.AppPermissionsEditorActivity");
99
            intent.setComponent(componentName);
100
            intent.setComponent(componentName);
100
            intent.putExtra("extra_pkgname", BuildConfig.APPLICATION_ID);
101
            intent.putExtra("extra_pkgname", APPLICATION_ID);
101
            try {
102
            try {
102
                context.startActivity(intent);
103
                context.startActivity(intent);
103
            } catch (Exception e) {
104
            } catch (Exception e) {