feat: dev-5.1 分支基线(v1.3.35 发版后代码 + 5.1 声道改造文档)
- 以 main(ccc65af) 为基线提交当前工作区代码
- 新增 5.1 声道改造文档两份
- .gitignore 补充 .vscode/、.screenshots/
This commit is contained in:
96
app/src/main/AndroidManifest.xml
Executable file → Normal file
96
app/src/main/AndroidManifest.xml
Executable file → Normal file
@@ -4,10 +4,6 @@
|
||||
package="com.pukka.jiecheng"
|
||||
tools:ignore="MissingLeanbackLauncher">
|
||||
|
||||
<!-- Android 4.2 兼容(minSdk 17):覆盖 minSdk>17 的依赖库声明,运行时兼容性靠
|
||||
降级依赖版本 + 不触碰高版本 API 路径保证。清单随探测编译逐步补充。 -->
|
||||
<uses-sdk tools:overrideLibrary="com.github.gzuliyujiang.oaid" />
|
||||
|
||||
<uses-feature
|
||||
android:name="android.hardware.telephony"
|
||||
android:required="false" />
|
||||
@@ -41,6 +37,23 @@
|
||||
<uses-permission android:name="android.permission.REPLACE_EXISTING_PACKAGE" />
|
||||
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
|
||||
|
||||
<!-- ===== 语音协议(文档 §6.2):自定义 signature-level permission ===== -->
|
||||
<!-- debug flavor 通过 voiceProtectionLevel=normal 临时放开(联调期 adb shell 可投递);
|
||||
release 走 signature 严格白名单。 -->
|
||||
<permission
|
||||
android:name="com.pukka.jiecheng.permission.VOICE_COMMAND"
|
||||
android:protectionLevel="${voiceProtectionLevel}" />
|
||||
<uses-permission android:name="com.pukka.jiecheng.permission.VOICE_COMMAND" />
|
||||
|
||||
<!-- ===== 语音冷启动保活(文档 2026-08-28-语音冷启动链路设计方案) ===== -->
|
||||
<!-- BOOT_COMPLETED 启 FGS 必须先声明权限;FOREGROUND_SERVICE 是 Android 9+ 启前台服务的前置 -->
|
||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||||
<!-- 语音冷启动绕过 Background Activity Start 限制::voice 进程挂 1px 悬浮窗,
|
||||
AMS 视为有 visible window,后续 startActivity 走豁免路径。
|
||||
标准权限,部分 OEM ROM 自动授予;无需运行时申请。 -->
|
||||
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
|
||||
|
||||
<application
|
||||
android:name=".MyApplication"
|
||||
android:allowBackup="false"
|
||||
@@ -71,6 +84,10 @@
|
||||
android:name=".device.DeviceActivity"
|
||||
android:exported="false"
|
||||
android:screenOrientation="landscape" />
|
||||
<activity
|
||||
android:name=".setting.SettingActivity"
|
||||
android:exported="false"
|
||||
android:screenOrientation="landscape" />
|
||||
<activity
|
||||
android:name=".order.OrderActivity"
|
||||
android:exported="false"
|
||||
@@ -85,6 +102,11 @@
|
||||
android:exported="false"
|
||||
android:screenOrientation="landscape"
|
||||
android:windowSoftInputMode="stateHidden|adjustResize" />
|
||||
<!-- 家用版微信扫码登录 Activity(第一阶段占位),仅应用内启动 -->
|
||||
<activity
|
||||
android:name=".login.WxMpLoginActivity"
|
||||
android:exported="false"
|
||||
android:screenOrientation="landscape" />
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:exported="true"
|
||||
@@ -98,17 +120,6 @@
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<activity
|
||||
android:name=".ThirdPartyEntryActivity"
|
||||
android:exported="true"
|
||||
android:screenOrientation="landscape"
|
||||
android:theme="@style/whiteTheme">
|
||||
<intent-filter>
|
||||
<action android:name="com.pukka.jiecheng.action.THIRD_PARTY_PLAY" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<activity
|
||||
android:name=".TestActivity"
|
||||
android:exported="true"
|
||||
@@ -156,6 +167,61 @@
|
||||
android:name="android.support.FILE_PROVIDER_PATHS"
|
||||
android:resource="@xml/file_paths" />
|
||||
</provider>
|
||||
|
||||
<!-- 语音命令接收器(文档 §5.2) -->
|
||||
<receiver
|
||||
android:name=".voice.receiver.VoiceCommandReceiver"
|
||||
android:exported="true"
|
||||
android:permission="com.pukka.jiecheng.permission.VOICE_COMMAND">
|
||||
<intent-filter>
|
||||
<action android:name="com.pukka.jiecheng.action.VOICE_COMMAND" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<!-- 语音冷启动链路:开机拉起 :voice 进程 FGS(文档 2026-08-28-语音冷启动链路设计方案) -->
|
||||
<receiver
|
||||
android:name=".voice.receiver.BootCompletedReceiver"
|
||||
android:enabled="true"
|
||||
android:exported="true"
|
||||
android:directBootAware="true"
|
||||
android:process=":voice"
|
||||
android:permission="android.permission.RECEIVE_BOOT_COMPLETED">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.BOOT_COMPLETED" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<!-- 自广播兜底接收器:处理 KEEPALIVE_BOOT 自定义 action。
|
||||
解决 BOOT_COMPLETED 因 STOPPED / OEM 拦截失败时 :voice 进程无法自启的问题。
|
||||
同包 explicit broadcast(Intent.setPackage)不受 STOPPED 状态限制。
|
||||
exported=false 不暴露给外部,仅接收应用自身 AlarmManager 派发的 PendingIntent。 -->
|
||||
<receiver
|
||||
android:name=".voice.receiver.KeepAlivePingReceiver"
|
||||
android:enabled="true"
|
||||
android:exported="false"
|
||||
android:process=":voice">
|
||||
<intent-filter>
|
||||
<action android:name="com.pukka.jiecheng.action.KEEPALIVE_BOOT" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<!-- 语音冷启动保活服务:保持 :voice 进程隔离。
|
||||
设计意图:主进程被 LMK 杀掉后 receiver 仍能存活,持续监听 OEM 创维广播。
|
||||
cold-launch 受 Android 12+ Background Activity Start 限制的问题,由
|
||||
VoiceOverlayHelper 在 :voice 进程挂 1px TYPE_APPLICATION_OVERLAY 悬浮窗
|
||||
提供 visible window 豁免(AMS 视为前台可见窗口),配合
|
||||
SkyworthVoiceAdapter.coldLaunchMainActivity 优先路径
|
||||
showOverlay → ctx.startActivity(cold) → hideOverlay 绕过。
|
||||
FullScreenIntent 通知作为 OEM ROM 拦截悬浮窗场景下的次选兜底保留。
|
||||
当前设备 Android 11 不需要 USE_FULL_SCREEN_INTENT 权限;如后续适配
|
||||
Android 14 设备需在 manifest 声明该权限。 -->
|
||||
<service
|
||||
android:name=".voice.service.VoiceKeepAliveService"
|
||||
android:exported="false"
|
||||
android:foregroundServiceType="specialUse"
|
||||
android:process=":voice" />
|
||||
|
||||
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
|
||||
Reference in New Issue
Block a user