Isaac Chen 498e571c9c Add a test to check unusual home activities
Framework's SystemUserHome and Shell's NullHome activities have no real
Home function and should only be used in bootable CSI products. They
should not exist or be enabled on normal products.

This test can help to find if they exist in the system without needing
to find them via Settings manually.

Bug: 149307007
Bug: 149780604
Bug: 154723738
Test: # On aosp_crosshatch with Shell's NullHome activity
      $ atest NullHomeTest
      ...
      arm64-v8a NullHomeTest
      ----------------------
      com.android.test.nullhome (1 Test)
      [1/1] com.android.test.nullhome.NullHomeTest#checkNullHome: FAILED (127ms)
      # On aosp_crosshatch without Shell's NullHome activity
      $ atest NullHomeTest
      ...
      arm64-v8a NullHomeTest
      ----------------------
      com.android.test.nullhome (1 Test)
      [1/1] com.android.test.nullhome.NullHomeTest#checkNullHome: PASSED (2ms)
Change-Id: I6f190ae33fc9e724adc0e53d07107e9a1ae0291f
Merged-In: I6f190ae33fc9e724adc0e53d07107e9a1ae0291f
(cherry picked from commit c8607a3a5bf97905179388fec4533c0068209abe)
2020-05-19 10:59:30 +08:00

32 lines
1.2 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2020 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.test.nullhome"
android:sharedUserId="android.uid.system" >
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="21" />
<instrumentation
android:name="android.support.test.runner.AndroidJUnitRunner"
android:targetPackage="com.android.test.nullhome"
android:label="Check if no null Home exists/is enabled" />
<application android:label="Null Home Test">
<uses-library android:name="android.test.runner" />
</application>
</manifest>