Revert "Only allow 1 Stack on Leanback-only devices"
This is making a HH device (and probably others) in a reboot loop This reverts commit 0cac71e9bdee1e9e6b2faafec0f9f894effbcb67. === See: W/dalvikvm( 2320): threadid=1: thread exiting with uncaught exception (group=0x952d3f28) E/AndroidRuntime( 2320): *** FATAL EXCEPTION IN SYSTEM PROCESS: main E/AndroidRuntime( 2320): java.lang.RuntimeException: Failed to create service com.android.server.am.ActivityManagerService$Lifecycle: service constructor threw an exception E/AndroidRuntime( 2320): at com.android.server.SystemServiceManager.startService(SystemServiceManager.java:89) E/AndroidRuntime( 2320): at com.android.server.SystemServer.startBootstrapServices(SystemServer.java:304) E/AndroidRuntime( 2320): at com.android.server.SystemServer.run(SystemServer.java:244) E/AndroidRuntime( 2320): at com.android.server.SystemServer.main(SystemServer.java:161) E/AndroidRuntime( 2320): at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime( 2320): at java.lang.reflect.Method.invoke(Method.java:515) E/AndroidRuntime( 2320): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:836) E/AndroidRuntime( 2320): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:631) E/AndroidRuntime( 2320): at dalvik.system.NativeStart.main(Native Method) E/AndroidRuntime( 2320): Caused by: java.lang.reflect.InvocationTargetException E/AndroidRuntime( 2320): at java.lang.reflect.Constructor.constructNative(Native Method) E/AndroidRuntime( 2320): at java.lang.reflect.Constructor.newInstance(Constructor.java:423) E/AndroidRuntime( 2320): at com.android.server.SystemServiceManager.startService(SystemServiceManager.java:78) E/AndroidRuntime( 2320): ... 8 more E/AndroidRuntime( 2320): Caused by: java.lang.NullPointerException E/AndroidRuntime( 2320): at com.android.server.am.ActivityStackSupervisor.isLeanbackOnlyDevice(ActivityStackSupervisor.java:3508) E/AndroidRuntime( 2320): at com.android.server.am.ActivityStackSupervisor.<init>(ActivityStackSupervisor.java:220) E/AndroidRuntime( 2320): at com.android.server.am.ActivityManagerService.<init>(ActivityManagerService.java:2145) E/AndroidRuntime( 2320): at com.android.server.am.ActivityManagerService$Lifecycle.<init>(ActivityManagerService.java:2073) E/AndroidRuntime( 2320): ... 11 more E/AndroidRuntime( 2320): Error reporting crash E/AndroidRuntime( 2320): java.lang.NullPointerException E/AndroidRuntime( 2320): at com.android.internal.os.RuntimeInit$UncaughtHandler.uncaughtException(RuntimeInit.java:89) E/AndroidRuntime( 2320): at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:693) E/AndroidRuntime( 2320): at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:690) E/AndroidRuntime( 2320): at dalvik.system.NativeStart.main(Native Method) I/Process ( 2320): Sending signal. PID: 2320 SIG: 9 I/ServiceManager( 174): service 'power' died I/ServiceManager( 174): service 'sensorservice' died Change-Id: Ib90ae4dff6542d67f5827b100a3ab6158ce88ae2
This commit is contained in:
@@ -207,8 +207,6 @@ public final class ActivityStackSupervisor implements DisplayListener {
|
||||
/** Set when we have taken too long waiting to go to sleep. */
|
||||
boolean mSleepTimeout = false;
|
||||
|
||||
private final boolean mLeanbackOnlyDevice = isLeanbackOnlyDevice();
|
||||
|
||||
/**
|
||||
* We don't want to allow the device to go to sleep while in the process
|
||||
* of launching an activity. This is primarily to allow alarm intent
|
||||
@@ -1389,10 +1387,7 @@ public final class ActivityStackSupervisor implements DisplayListener {
|
||||
|
||||
ActivityStack adjustStackFocus(ActivityRecord r, boolean newTask) {
|
||||
final TaskRecord task = r.task;
|
||||
|
||||
// On leanback only devices we should keep all activities in the same stack.
|
||||
if (!mLeanbackOnlyDevice &&
|
||||
(r.isApplicationActivity() || (task != null && task.isApplicationTask()))) {
|
||||
if (r.isApplicationActivity() || (task != null && task.isApplicationTask())) {
|
||||
if (task != null) {
|
||||
final ActivityStack taskStack = task.stack;
|
||||
if (taskStack.isOnHomeDisplay()) {
|
||||
@@ -3445,16 +3440,4 @@ public final class ActivityStackSupervisor implements DisplayListener {
|
||||
return "VirtualActivityDisplay={" + mDisplayId + "}";
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isLeanbackOnlyDevice() {
|
||||
boolean onLeanbackOnly = false;
|
||||
try {
|
||||
onLeanbackOnly = AppGlobals.getPackageManager().hasSystemFeature(
|
||||
PackageManager.FEATURE_LEANBACK_ONLY);
|
||||
} catch (RemoteException e) {
|
||||
// noop
|
||||
}
|
||||
|
||||
return onLeanbackOnly;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user