为什么 Android 应用程序 Keyguard 不包含任何组件?
Why does the Android app Keyguard not contain any components?
以下是 Lollipop 应用 Keyguard 的 AndroidManifest.xml 的简短内容,位于:$(AOSP_Root_Dir)/frameworks/base/packages/Keyguard/
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.keyguard"
android:sharedUserId="android.uid.systemui"
coreApp="true">
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="17"/>
<application android:label="@string/app_name"
android:process="com.android.systemui"
android:persistent="true"
android:supportsRtl="true">
</application>
</manifest>
奇怪的是:在AndroidManifest.xml!
中没有个activity、服务等组件
如何开始?
我不确定您将此编辑为简化形式时打算删除什么,但查看您 link 的版本肯定包含这样的服务:
<service android:name=".KeyguardService"
android:exported="true" />
编辑:在您现在 link 的版本中,该服务已被签入删除:
https://github.com/android/platform_frameworks_base/commit/380ecb81db52a9d0197ca969951d07b91c20d2b9
它做了以下事情:
- 让 Keyguard 成为一个库,这样我们就可以在 SystemUI 中使用它了。
- 在 SystemUI 中实现一个新的 KeyguardService,并绑定该服务
来自 PhoneWindowManager.
以下是 Lollipop 应用 Keyguard 的 AndroidManifest.xml 的简短内容,位于:$(AOSP_Root_Dir)/frameworks/base/packages/Keyguard/
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.keyguard"
android:sharedUserId="android.uid.systemui"
coreApp="true">
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="17"/>
<application android:label="@string/app_name"
android:process="com.android.systemui"
android:persistent="true"
android:supportsRtl="true">
</application>
</manifest>
奇怪的是:在AndroidManifest.xml!
中没有个activity、服务等组件如何开始?
我不确定您将此编辑为简化形式时打算删除什么,但查看您 link 的版本肯定包含这样的服务:
<service android:name=".KeyguardService"
android:exported="true" />
编辑:在您现在 link 的版本中,该服务已被签入删除:
https://github.com/android/platform_frameworks_base/commit/380ecb81db52a9d0197ca969951d07b91c20d2b9
它做了以下事情:
- 让 Keyguard 成为一个库,这样我们就可以在 SystemUI 中使用它了。
- 在 SystemUI 中实现一个新的 KeyguardService,并绑定该服务 来自 PhoneWindowManager.