Foreground service must use attribute foregroundServiceType to specify its foreground service type in <sevice> element of manifest file, otherwise a warning message is printed when startForeground() method is called. (We will replace the warning message with a security exception when the feature is formally activiated.) The manifest attribute is: android:foregroundServiceType="<type>" Allowed types are: "sync", "mediaPlay", "phoneCall", "location", "deviceCompanion", "ongoingProcess". Bug: 111453223 Test: atest frameworks/base/tests/FrameworkPerf Change-Id: I5d2ab203d400f3c549cd153480b6252a2f9adb3c
32 lines
1.3 KiB
XML
32 lines
1.3 KiB
XML
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
package="com.android.frameworkperf">
|
|
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
|
|
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
|
<uses-sdk android:minSdkVersion="5" />
|
|
|
|
<application android:hardwareAccelerated="false">
|
|
<uses-library android:name="android.test.runner" />
|
|
<activity android:name="FrameworkPerfActivity" android:label="Framework Perf">
|
|
<intent-filter>
|
|
<action android:name="android.intent.action.MAIN" />
|
|
<category android:name="android.intent.category.DEFAULT" />
|
|
<category android:name="android.intent.category.LAUNCHER" />
|
|
</intent-filter>
|
|
</activity>
|
|
<service android:name="SchedulerService"
|
|
android:foregroundServiceType="sync">
|
|
</service>
|
|
<service android:name="TestService" android:process=":test">
|
|
</service>
|
|
<service android:name="LocalTestService">
|
|
</service>
|
|
<receiver android:name="Receiver" android:exported="true">
|
|
</receiver>
|
|
</application>
|
|
|
|
<instrumentation android:name="android.test.InstrumentationTestRunner"
|
|
android:targetPackage="com.android.frameworkperf"
|
|
android:label="Framework Perf Runner"
|
|
/>
|
|
</manifest>
|