Skip to content

Commit 6a32df9

Browse files
committed
feat: 适配Android 12,修改版本号 3.7.2
1 parent a67d23c commit 6a32df9

File tree

4 files changed

+13
-11
lines changed

4 files changed

+13
-11
lines changed

Android/app/src/main/AndroidManifest.xml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@
3535

3636
<activity
3737
android:name=".MainDoKitActivity"
38-
android:theme="@style/NoTitleTheme">
38+
android:theme="@style/NoTitleTheme"
39+
android:exported="true">
3940
<intent-filter>
4041
<action android:name="android.intent.action.MAIN" />
4142

@@ -76,13 +77,8 @@
7677
android:name="com.baidu.location.f"
7778
android:enabled="true"
7879
android:process=":remote" />
79-
<!-- Dokit targetApi为 29 Android Q时截屏的前台服务 -->
80-
<service
81-
android:name="com.didichuxing.doraemonkit.kit.colorpick.ScreenRecorderService"
82-
android:enabled="true"
83-
android:foregroundServiceType="mediaProjection"
84-
tools:targetApi="q" />
8580

81+
<!-- Dokit targetApi为 29 Android Q时截屏的前台服务 -->
8682
<service
8783
android:name=".test.ScreenRecordingService"
8884
android:enabled="true"

Android/config.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ ext {
1313
//是否使用本地仓库,需要使用绝对路径,仓库地址在 local.properties 中添加 LOCAL_REPOSITORY_URL
1414
use_local : true,
1515
group_id : 'io.github.didi.dokit',
16-
version : '3.7.1'
16+
version : '3.7.2'
1717
]
1818

1919
android = [compileSdkVersion : 29,
2020
applicationId : "com.didichuxing.doraemondemo",
2121
minSdkVersion_16 : 16,
2222
minSdkVersion_21 : 21,
23-
targetSdkVersion : 30,
23+
targetSdkVersion : 31,
2424
//app版本号
2525
versionCode : 1,
2626
versionName : "1.0.0",
@@ -31,7 +31,7 @@ ext {
3131
kotlinx_coroutines_version_v13: "1.3.7",
3232
kotlinx_coroutines_version_v14: "1.4.3",
3333
booster_version : "4.0.0",
34-
agp_module_verson : "4.2.2",
34+
agp_module_verson : "7.0.0",
3535
agp_plugin_verson : "4.2.2",
3636
ktor : "1.5.4",
3737
okhttp_v2 : "2.7.5",

Android/dokit/src/main/AndroidManifest.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,12 @@
6464
android:resource="@xml/dokit_debug_provider_paths" />
6565
</provider>
6666

67+
<!-- Dokit targetApi为 29 Android Q时截屏的前台服务 -->
68+
<service
69+
android:name="com.didichuxing.doraemonkit.kit.colorpick.ScreenRecorderService"
70+
android:enabled="true"
71+
android:foregroundServiceType="mediaProjection" />
72+
6773
<!--<service-->
6874
<!--android:name=".kit.viewcheck.DebugAccessibilityService"-->
6975
<!--android:permission="android.permission.BIND_ACCESSIBILITY_SERVICE">-->

Android/dokit/src/main/java/com/didichuxing/doraemonkit/kit/core/NormalDoKitViewManager.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ internal class NormalDoKitViewManager : AbsDoKitViewManager() {
326326
//操作DecorRootView
327327
doKitView.dealDecorRootView(getDoKitRootContentView(doKitIntent.activity))
328328
}, MC_DELAY.toLong())
329-
DokitViewManager.INSTANCE.notifyDokitViewAdd(doKitView)
329+
// DoKitViewManager.INSTANCE.notifyDokitViewAdd(doKitView)
330330
}
331331
currentActivityDoKitViews[doKitView.tag] = doKitView
332332
} catch (e: Exception) {

0 commit comments

Comments
 (0)