Loading core/java/com/android/internal/app/SystemUserHomeActivity.java +17 −0 Original line number Diff line number Diff line Loading @@ -17,10 +17,27 @@ package com.android.internal.app; import android.app.Activity; import android.os.Bundle; import android.util.Log; import com.android.internal.R; /** * 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 { private static final String TAG = "SystemUserHome"; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Log.i(TAG, "onCreate"); setContentView(R.layout.system_user_home); } protected void onDestroy() { super.onDestroy(); Log.i(TAG, "onDestroy"); } } core/res/res/layout/system_user_home.xml 0 → 100644 +44 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright (C) 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 --> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#80000000" android:forceHasOverlappingRendering="false"> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical" android:layout_gravity="center" android:layout_marginStart="16dp" android:layout_marginEnd="16dp"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="20sp" android:textColor="?android:attr/textColorPrimary" android:text="Framework Fallback Home"/> <ProgressBar style="@android:style/Widget.Material.ProgressBar.Horizontal" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="12.75dp" android:colorControlActivated="?android:attr/textColorPrimary" android:indeterminate="true"/> </LinearLayout> </FrameLayout> core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -1468,6 +1468,7 @@ <java-symbol type="layout" name="select_dialog" /> <java-symbol type="layout" name="simple_dropdown_hint" /> <java-symbol type="layout" name="status_bar_latest_event_content" /> <java-symbol type="layout" name="system_user_home" /> <java-symbol type="layout" name="text_edit_action_popup_text" /> <java-symbol type="layout" name="text_drag_thumbnail" /> <java-symbol type="layout" name="typing_filter" /> Loading services/core/java/com/android/server/am/ActivityManagerService.java +4 −1 Original line number Diff line number Diff line Loading @@ -465,6 +465,8 @@ public class ActivityManagerService extends IActivityManager.Stub static final String SYSTEM_DEBUGGABLE = "ro.debuggable"; static final String SYSTEM_USER_HOME_NEEDED = "ro.system_user_home_needed"; public static final String ANR_TRACE_DIR = "/data/anr"; // Maximum number of receivers an app can register. Loading Loading @@ -9592,7 +9594,8 @@ public class ActivityManagerService extends IActivityManager.Stub // to handle home activity in this case. if (UserManager.isSplitSystemUser() && Settings.Secure.getInt(mContext.getContentResolver(), Settings.Secure.USER_SETUP_COMPLETE, 0) != 0) { Settings.Secure.USER_SETUP_COMPLETE, 0) != 0 || SystemProperties.getBoolean(SYSTEM_USER_HOME_NEEDED, false)) { t.traceBegin("enableHomeActivity"); ComponentName cName = new ComponentName(mContext, SystemUserHomeActivity.class); try { Loading Loading
core/java/com/android/internal/app/SystemUserHomeActivity.java +17 −0 Original line number Diff line number Diff line Loading @@ -17,10 +17,27 @@ package com.android.internal.app; import android.app.Activity; import android.os.Bundle; import android.util.Log; import com.android.internal.R; /** * 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 { private static final String TAG = "SystemUserHome"; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Log.i(TAG, "onCreate"); setContentView(R.layout.system_user_home); } protected void onDestroy() { super.onDestroy(); Log.i(TAG, "onDestroy"); } }
core/res/res/layout/system_user_home.xml 0 → 100644 +44 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright (C) 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 --> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#80000000" android:forceHasOverlappingRendering="false"> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical" android:layout_gravity="center" android:layout_marginStart="16dp" android:layout_marginEnd="16dp"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="20sp" android:textColor="?android:attr/textColorPrimary" android:text="Framework Fallback Home"/> <ProgressBar style="@android:style/Widget.Material.ProgressBar.Horizontal" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="12.75dp" android:colorControlActivated="?android:attr/textColorPrimary" android:indeterminate="true"/> </LinearLayout> </FrameLayout>
core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -1468,6 +1468,7 @@ <java-symbol type="layout" name="select_dialog" /> <java-symbol type="layout" name="simple_dropdown_hint" /> <java-symbol type="layout" name="status_bar_latest_event_content" /> <java-symbol type="layout" name="system_user_home" /> <java-symbol type="layout" name="text_edit_action_popup_text" /> <java-symbol type="layout" name="text_drag_thumbnail" /> <java-symbol type="layout" name="typing_filter" /> Loading
services/core/java/com/android/server/am/ActivityManagerService.java +4 −1 Original line number Diff line number Diff line Loading @@ -465,6 +465,8 @@ public class ActivityManagerService extends IActivityManager.Stub static final String SYSTEM_DEBUGGABLE = "ro.debuggable"; static final String SYSTEM_USER_HOME_NEEDED = "ro.system_user_home_needed"; public static final String ANR_TRACE_DIR = "/data/anr"; // Maximum number of receivers an app can register. Loading Loading @@ -9592,7 +9594,8 @@ public class ActivityManagerService extends IActivityManager.Stub // to handle home activity in this case. if (UserManager.isSplitSystemUser() && Settings.Secure.getInt(mContext.getContentResolver(), Settings.Secure.USER_SETUP_COMPLETE, 0) != 0) { Settings.Secure.USER_SETUP_COMPLETE, 0) != 0 || SystemProperties.getBoolean(SYSTEM_USER_HOME_NEEDED, false)) { t.traceBegin("enableHomeActivity"); ComponentName cName = new ComponentName(mContext, SystemUserHomeActivity.class); try { Loading