Loading core/java/android/app/ActivityManagerNative.java +20 −0 Original line number Diff line number Diff line Loading @@ -766,6 +766,14 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM return true; } case GET_FOCUSED_STACK_ID_TRANSACTION: { data.enforceInterface(IActivityManager.descriptor); int focusedStackId = getFocusedStackId(); reply.writeNoException(); reply.writeInt(focusedStackId); return true; } case REGISTER_TASK_STACK_LISTENER_TRANSACTION: { data.enforceInterface(IActivityManager.descriptor); IBinder token = data.readStrongBinder(); Loading Loading @@ -3290,6 +3298,18 @@ class ActivityManagerProxy implements IActivityManager reply.recycle(); } @Override public int getFocusedStackId() throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); data.writeInterfaceToken(IActivityManager.descriptor); mRemote.transact(GET_FOCUSED_STACK_ID_TRANSACTION, data, reply, 0); reply.readException(); int focusedStackId = reply.readInt(); data.recycle(); reply.recycle(); return focusedStackId; } @Override public void registerTaskStackListener(ITaskStackListener listener) throws RemoteException { Parcel data = Parcel.obtain(); Loading core/java/android/app/IActivityContainer.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ interface IActivityContainer { void checkEmbeddedAllowed(in Intent intent); void checkEmbeddedAllowedIntentSender(in IIntentSender intentSender); int getDisplayId(); int getStackId(); boolean injectEvent(in InputEvent event); void release(); } core/java/android/app/IActivityManager.java +2 −0 Original line number Diff line number Diff line Loading @@ -139,6 +139,7 @@ public interface IActivityManager extends IInterface { public StackInfo getStackInfo(int stackId) throws RemoteException; public boolean isInHomeStack(int taskId) throws RemoteException; public void setFocusedStack(int stackId) throws RemoteException; public int getFocusedStackId() throws RemoteException; public void registerTaskStackListener(ITaskStackListener listener) throws RemoteException; public int getTaskForActivity(IBinder token, boolean onlyRoot) throws RemoteException; public ContentProviderHolder getContentProvider(IApplicationThread caller, Loading Loading @@ -800,4 +801,5 @@ public interface IActivityManager extends IInterface { // Start of M transactions int NOTIFY_CLEARTEXT_NETWORK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+280; int CREATE_STACK_ON_DISPLAY = IBinder.FIRST_CALL_TRANSACTION+281; int GET_FOCUSED_STACK_ID_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+282; } packages/SystemUI/res/layout/recents.xml +10 −3 Original line number Diff line number Diff line Loading @@ -31,7 +31,14 @@ android:id="@+id/recents_view" android:layout_width="match_parent" android:layout_height="match_parent" android:focusable="true" /> android:focusable="true"> <!-- MultiStack Debug View --> <ViewStub android:id="@+id/multistack_debug_view_stub" android:layout="@layout/recents_multistack_debug" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="left|bottom" /> </com.android.systemui.recents.views.RecentsView> <!-- Empty View --> <ViewStub android:id="@+id/empty_view_stub" Loading packages/SystemUI/res/layout/recents_multistack_debug.xml 0 → 100644 +46 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2014 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. --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="left|bottom" android:orientation="vertical"> <Button android:id="@+id/add_stack" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" android:padding="8dp" android:textSize="20sp" android:textColor="#ffffffff" android:text="@string/recents_multistack_add_stack" android:fontFamily="sans-serif" android:background="#000000" android:alpha="0.5" /> <Button android:id="@+id/resize_stack" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" android:padding="8dp" android:textSize="20sp" android:textColor="#ffffffff" android:text="@string/recents_multistack_resize_stack" android:fontFamily="sans-serif" android:background="#000000" android:alpha="0.5" /> </LinearLayout> No newline at end of file Loading
core/java/android/app/ActivityManagerNative.java +20 −0 Original line number Diff line number Diff line Loading @@ -766,6 +766,14 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM return true; } case GET_FOCUSED_STACK_ID_TRANSACTION: { data.enforceInterface(IActivityManager.descriptor); int focusedStackId = getFocusedStackId(); reply.writeNoException(); reply.writeInt(focusedStackId); return true; } case REGISTER_TASK_STACK_LISTENER_TRANSACTION: { data.enforceInterface(IActivityManager.descriptor); IBinder token = data.readStrongBinder(); Loading Loading @@ -3290,6 +3298,18 @@ class ActivityManagerProxy implements IActivityManager reply.recycle(); } @Override public int getFocusedStackId() throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); data.writeInterfaceToken(IActivityManager.descriptor); mRemote.transact(GET_FOCUSED_STACK_ID_TRANSACTION, data, reply, 0); reply.readException(); int focusedStackId = reply.readInt(); data.recycle(); reply.recycle(); return focusedStackId; } @Override public void registerTaskStackListener(ITaskStackListener listener) throws RemoteException { Parcel data = Parcel.obtain(); Loading
core/java/android/app/IActivityContainer.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ interface IActivityContainer { void checkEmbeddedAllowed(in Intent intent); void checkEmbeddedAllowedIntentSender(in IIntentSender intentSender); int getDisplayId(); int getStackId(); boolean injectEvent(in InputEvent event); void release(); }
core/java/android/app/IActivityManager.java +2 −0 Original line number Diff line number Diff line Loading @@ -139,6 +139,7 @@ public interface IActivityManager extends IInterface { public StackInfo getStackInfo(int stackId) throws RemoteException; public boolean isInHomeStack(int taskId) throws RemoteException; public void setFocusedStack(int stackId) throws RemoteException; public int getFocusedStackId() throws RemoteException; public void registerTaskStackListener(ITaskStackListener listener) throws RemoteException; public int getTaskForActivity(IBinder token, boolean onlyRoot) throws RemoteException; public ContentProviderHolder getContentProvider(IApplicationThread caller, Loading Loading @@ -800,4 +801,5 @@ public interface IActivityManager extends IInterface { // Start of M transactions int NOTIFY_CLEARTEXT_NETWORK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+280; int CREATE_STACK_ON_DISPLAY = IBinder.FIRST_CALL_TRANSACTION+281; int GET_FOCUSED_STACK_ID_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+282; }
packages/SystemUI/res/layout/recents.xml +10 −3 Original line number Diff line number Diff line Loading @@ -31,7 +31,14 @@ android:id="@+id/recents_view" android:layout_width="match_parent" android:layout_height="match_parent" android:focusable="true" /> android:focusable="true"> <!-- MultiStack Debug View --> <ViewStub android:id="@+id/multistack_debug_view_stub" android:layout="@layout/recents_multistack_debug" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="left|bottom" /> </com.android.systemui.recents.views.RecentsView> <!-- Empty View --> <ViewStub android:id="@+id/empty_view_stub" Loading
packages/SystemUI/res/layout/recents_multistack_debug.xml 0 → 100644 +46 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2014 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. --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="left|bottom" android:orientation="vertical"> <Button android:id="@+id/add_stack" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" android:padding="8dp" android:textSize="20sp" android:textColor="#ffffffff" android:text="@string/recents_multistack_add_stack" android:fontFamily="sans-serif" android:background="#000000" android:alpha="0.5" /> <Button android:id="@+id/resize_stack" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" android:padding="8dp" android:textSize="20sp" android:textColor="#ffffffff" android:text="@string/recents_multistack_resize_stack" android:fontFamily="sans-serif" android:background="#000000" android:alpha="0.5" /> </LinearLayout> No newline at end of file