From b182955a1eabc30d3cf70856f838b46a91c34569 Mon Sep 17 00:00:00 2001 From: Dianne Hackborn Date: Mon, 5 Jan 2015 14:40:24 -0800 Subject: [PATCH] Fix issue #18901214: APR: Frequent crash in android The ShutdownActivity was implemented in the system server code, which is no longer part of the boot class path. This would work fine when requesting a shutdown from the primary user, since in that case the activity would be loaded in to the main system process which also has the system service code loaded. However, when executed from a secondary user, we need to spin up a new system process for it; that system process is just a regular app process, without the system service code, so *boom*. To fix this, move ShutdownActivity to the framework jar. Change-Id: Icb831cd6ed619da5feede5605c45ef177a892fbc --- .../java/com/android/internal/app}/ShutdownActivity.java | 2 +- core/res/AndroidManifest.xml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) rename {services/core/java/com/android/server => core/java/com/android/internal/app}/ShutdownActivity.java (98%) diff --git a/services/core/java/com/android/server/ShutdownActivity.java b/core/java/com/android/internal/app/ShutdownActivity.java similarity index 98% rename from services/core/java/com/android/server/ShutdownActivity.java rename to core/java/com/android/internal/app/ShutdownActivity.java index 56172ed05f1d8..97521cf68dd45 100644 --- a/services/core/java/com/android/server/ShutdownActivity.java +++ b/core/java/com/android/internal/app/ShutdownActivity.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.server; +package com.android.internal.app; import android.app.Activity; import android.content.Context; diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml index 87b99712633e6..ccdb5db3d6475 100644 --- a/core/res/AndroidManifest.xml +++ b/core/res/AndroidManifest.xml @@ -3028,8 +3028,9 @@ android:process=":ui"> -