Merge "Enable System User Home for CSI" into rvc-dev am: 10e9c219a1
Change-Id: I73786c7bfa2ee00e0dea3d7ef198816438d54a8b
This commit is contained in:
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
44
core/res/res/layout/system_user_home.xml
Normal file
44
core/res/res/layout/system_user_home.xml
Normal file
@@ -0,0 +1,44 @@
|
||||
<?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>
|
||||
@@ -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" />
|
||||
|
||||
@@ -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.
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user