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
This commit is contained in:
Dianne Hackborn
2015-01-05 14:40:24 -08:00
parent 4ae97d3632
commit b182955a1e
2 changed files with 3 additions and 2 deletions

View File

@@ -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;

View File

@@ -3028,8 +3028,9 @@
android:process=":ui">
</activity>
<activity android:name="com.android.server.ShutdownActivity"
<activity android:name="com.android.internal.app.ShutdownActivity"
android:permission="android.permission.SHUTDOWN"
android:theme="@style/Theme.NoDisplay"
android:excludeFromRecents="true">
<intent-filter>
<action android:name="android.intent.action.ACTION_REQUEST_SHUTDOWN" />