Loading core/java/com/android/internal/app/SystemUserHomeActivity.java 0 → 100644 +26 −0 Original line number Diff line number Diff line /* * Copyright (C) 2015 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 */ package com.android.internal.app; import android.app.Activity; /** * Placeholder home activity, which is always installed on the system user. At least one home * activity must be present and enabled in order for the system to boot. */ public class SystemUserHomeActivity extends Activity { } core/res/AndroidManifest.xml +11 −0 Original line number Diff line number Diff line Loading @@ -2841,6 +2841,17 @@ android:process=":ui"> </activity> <activity android:name="com.android.internal.app.SystemUserHomeActivity" android:enabled="false" android:process=":ui" android:systemUserOnly="true" android:theme="@style/Theme.Translucent.NoTitleBar"> <intent-filter android:priority="-100"> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.HOME" /> </intent-filter> </activity> <receiver android:name="com.android.server.BootReceiver" android:systemUserOnly="true"> <intent-filter android:priority="1000"> Loading services/core/java/com/android/server/am/ActivityManagerService.java +12 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import com.android.internal.app.IAppOpsService; import com.android.internal.app.IVoiceInteractor; import com.android.internal.app.ProcessMap; import com.android.internal.app.ProcessStats; import com.android.internal.app.SystemUserHomeActivity; import com.android.internal.os.BackgroundThread; import com.android.internal.os.BatteryStatsImpl; import com.android.internal.os.IResultReceiver; Loading Loading @@ -12269,6 +12270,17 @@ public final class ActivityManagerService extends ActivityManagerNative // Start up initial activity. mBooting = true; // Enable home activity for system user, so that the system can always boot if (UserManager.isSplitSystemUser()) { ComponentName cName = new ComponentName(mContext, SystemUserHomeActivity.class); try { AppGlobals.getPackageManager().setComponentEnabledSetting(cName, PackageManager.COMPONENT_ENABLED_STATE_ENABLED, 0, UserHandle.USER_SYSTEM); } catch (RemoteException e) { e.rethrowAsRuntimeException(); } } startHomeActivityLocked(currentUserId, "systemReady"); try { Loading Loading
core/java/com/android/internal/app/SystemUserHomeActivity.java 0 → 100644 +26 −0 Original line number Diff line number Diff line /* * Copyright (C) 2015 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 */ package com.android.internal.app; import android.app.Activity; /** * Placeholder home activity, which is always installed on the system user. At least one home * activity must be present and enabled in order for the system to boot. */ public class SystemUserHomeActivity extends Activity { }
core/res/AndroidManifest.xml +11 −0 Original line number Diff line number Diff line Loading @@ -2841,6 +2841,17 @@ android:process=":ui"> </activity> <activity android:name="com.android.internal.app.SystemUserHomeActivity" android:enabled="false" android:process=":ui" android:systemUserOnly="true" android:theme="@style/Theme.Translucent.NoTitleBar"> <intent-filter android:priority="-100"> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.HOME" /> </intent-filter> </activity> <receiver android:name="com.android.server.BootReceiver" android:systemUserOnly="true"> <intent-filter android:priority="1000"> Loading
services/core/java/com/android/server/am/ActivityManagerService.java +12 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import com.android.internal.app.IAppOpsService; import com.android.internal.app.IVoiceInteractor; import com.android.internal.app.ProcessMap; import com.android.internal.app.ProcessStats; import com.android.internal.app.SystemUserHomeActivity; import com.android.internal.os.BackgroundThread; import com.android.internal.os.BatteryStatsImpl; import com.android.internal.os.IResultReceiver; Loading Loading @@ -12269,6 +12270,17 @@ public final class ActivityManagerService extends ActivityManagerNative // Start up initial activity. mBooting = true; // Enable home activity for system user, so that the system can always boot if (UserManager.isSplitSystemUser()) { ComponentName cName = new ComponentName(mContext, SystemUserHomeActivity.class); try { AppGlobals.getPackageManager().setComponentEnabledSetting(cName, PackageManager.COMPONENT_ENABLED_STATE_ENABLED, 0, UserHandle.USER_SYSTEM); } catch (RemoteException e) { e.rethrowAsRuntimeException(); } } startHomeActivityLocked(currentUserId, "systemReady"); try { Loading