OSDN Git Service

Merge "Let SysUI watch TileService's dialog lifecycle"
authorJason Monk <jmonk@google.com>
Mon, 1 Feb 2016 15:19:47 +0000 (15:19 +0000)
committerAndroid (Google) Code Review <android-gerrit@google.com>
Mon, 1 Feb 2016 15:19:47 +0000 (15:19 +0000)
16 files changed:
api/current.txt
api/system-current.txt
api/test-current.txt
core/java/android/app/Activity.java
core/java/android/app/ActivityManagerNative.java
core/java/android/app/ActivityThread.java
core/java/android/app/ApplicationThreadNative.java
core/java/android/app/IActivityManager.java
core/java/android/app/IApplicationThread.java
core/java/android/view/Window.java
core/java/com/android/internal/policy/PhoneWindow.java
packages/DocumentsUI/src/com/android/documentsui/FilesActivity.java
packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java
services/core/java/com/android/server/am/ActivityManagerService.java
services/core/java/com/android/server/am/ActivityStack.java
services/core/java/com/android/server/am/TaskRecord.java

index dfc561d..8e797c6 100644 (file)
@@ -3408,7 +3408,7 @@ package android.app {
     method public boolean dispatchTouchEvent(android.view.MotionEvent);
     method public boolean dispatchTrackballEvent(android.view.MotionEvent);
     method public void dump(java.lang.String, java.io.FileDescriptor, java.io.PrintWriter, java.lang.String[]);
-    method public void enterPictureInPictureMode();
+    method public void enterPictureInPicture();
     method public android.view.View findViewById(int);
     method public void finish();
     method public void finishActivity(int);
@@ -3448,8 +3448,8 @@ package android.app {
     method public android.view.Window getWindow();
     method public android.view.WindowManager getWindowManager();
     method public boolean hasWindowFocus();
-    method public boolean inMultiWindowMode();
-    method public boolean inPictureInPictureMode();
+    method public boolean inMultiWindow();
+    method public boolean inPictureInPicture();
     method public void invalidateOptionsMenu();
     method public boolean isChangingConfigurations();
     method public final boolean isChild();
@@ -3503,7 +3503,7 @@ package android.app {
     method public void onLowMemory();
     method public boolean onMenuItemSelected(int, android.view.MenuItem);
     method public boolean onMenuOpened(int, android.view.Menu);
-    method public void onMultiWindowModeChanged(boolean);
+    method public void onMultiWindowChanged(boolean);
     method public boolean onNavigateUp();
     method public boolean onNavigateUpFromChild(android.app.Activity);
     method protected void onNewIntent(android.content.Intent);
@@ -3511,7 +3511,7 @@ package android.app {
     method public void onOptionsMenuClosed(android.view.Menu);
     method public void onPanelClosed(int, android.view.Menu);
     method protected void onPause();
-    method public void onPictureInPictureModeChanged(boolean);
+    method public void onPictureInPictureChanged(boolean);
     method protected void onPostCreate(android.os.Bundle);
     method public void onPostCreate(android.os.Bundle, android.os.PersistableBundle);
     method protected void onPostResume();
index 979ef2f..6b64643 100644 (file)
@@ -3523,7 +3523,7 @@ package android.app {
     method public boolean dispatchTouchEvent(android.view.MotionEvent);
     method public boolean dispatchTrackballEvent(android.view.MotionEvent);
     method public void dump(java.lang.String, java.io.FileDescriptor, java.io.PrintWriter, java.lang.String[]);
-    method public void enterPictureInPictureMode();
+    method public void enterPictureInPicture();
     method public android.view.View findViewById(int);
     method public void finish();
     method public void finishActivity(int);
@@ -3563,8 +3563,8 @@ package android.app {
     method public android.view.Window getWindow();
     method public android.view.WindowManager getWindowManager();
     method public boolean hasWindowFocus();
-    method public boolean inMultiWindowMode();
-    method public boolean inPictureInPictureMode();
+    method public boolean inMultiWindow();
+    method public boolean inPictureInPicture();
     method public void invalidateOptionsMenu();
     method public boolean isBackgroundVisibleBehind();
     method public boolean isChangingConfigurations();
@@ -3620,7 +3620,7 @@ package android.app {
     method public void onLowMemory();
     method public boolean onMenuItemSelected(int, android.view.MenuItem);
     method public boolean onMenuOpened(int, android.view.Menu);
-    method public void onMultiWindowModeChanged(boolean);
+    method public void onMultiWindowChanged(boolean);
     method public boolean onNavigateUp();
     method public boolean onNavigateUpFromChild(android.app.Activity);
     method protected void onNewIntent(android.content.Intent);
@@ -3628,7 +3628,7 @@ package android.app {
     method public void onOptionsMenuClosed(android.view.Menu);
     method public void onPanelClosed(int, android.view.Menu);
     method protected void onPause();
-    method public void onPictureInPictureModeChanged(boolean);
+    method public void onPictureInPictureChanged(boolean);
     method protected void onPostCreate(android.os.Bundle);
     method public void onPostCreate(android.os.Bundle, android.os.PersistableBundle);
     method protected void onPostResume();
index 88ab3d8..f137102 100644 (file)
@@ -3408,7 +3408,7 @@ package android.app {
     method public boolean dispatchTouchEvent(android.view.MotionEvent);
     method public boolean dispatchTrackballEvent(android.view.MotionEvent);
     method public void dump(java.lang.String, java.io.FileDescriptor, java.io.PrintWriter, java.lang.String[]);
-    method public void enterPictureInPictureMode();
+    method public void enterPictureInPicture();
     method public android.view.View findViewById(int);
     method public void finish();
     method public void finishActivity(int);
@@ -3448,8 +3448,8 @@ package android.app {
     method public android.view.Window getWindow();
     method public android.view.WindowManager getWindowManager();
     method public boolean hasWindowFocus();
-    method public boolean inMultiWindowMode();
-    method public boolean inPictureInPictureMode();
+    method public boolean inMultiWindow();
+    method public boolean inPictureInPicture();
     method public void invalidateOptionsMenu();
     method public boolean isChangingConfigurations();
     method public final boolean isChild();
@@ -3503,7 +3503,7 @@ package android.app {
     method public void onLowMemory();
     method public boolean onMenuItemSelected(int, android.view.MenuItem);
     method public boolean onMenuOpened(int, android.view.Menu);
-    method public void onMultiWindowModeChanged(boolean);
+    method public void onMultiWindowChanged(boolean);
     method public boolean onNavigateUp();
     method public boolean onNavigateUpFromChild(android.app.Activity);
     method protected void onNewIntent(android.content.Intent);
@@ -3511,7 +3511,7 @@ package android.app {
     method public void onOptionsMenuClosed(android.view.Menu);
     method public void onPanelClosed(int, android.view.Menu);
     method protected void onPause();
-    method public void onPictureInPictureModeChanged(boolean);
+    method public void onPictureInPictureChanged(boolean);
     method protected void onPostCreate(android.os.Bundle);
     method public void onPostCreate(android.os.Bundle, android.os.PersistableBundle);
     method protected void onPostResume();
index 75a19f4..378e448 100644 (file)
@@ -62,7 +62,6 @@ import android.database.Cursor;
 import android.graphics.Bitmap;
 import android.graphics.Canvas;
 import android.graphics.drawable.Drawable;
-import android.graphics.drawable.Icon;
 import android.media.AudioManager;
 import android.media.session.MediaController;
 import android.net.Uri;
@@ -72,7 +71,6 @@ import android.os.Handler;
 import android.os.IBinder;
 import android.os.Looper;
 import android.os.Parcelable;
-import android.os.PersistableBundle;
 import android.os.RemoteException;
 import android.os.StrictMode;
 import android.os.UserHandle;
@@ -80,16 +78,12 @@ import android.text.Selection;
 import android.text.SpannableStringBuilder;
 import android.text.TextUtils;
 import android.text.method.TextKeyListener;
-import android.transition.Scene;
-import android.transition.TransitionManager;
-import android.util.ArrayMap;
 import android.util.AttributeSet;
 import android.util.EventLog;
 import android.util.Log;
 import android.util.PrintWriterPrinter;
 import android.util.Slog;
 import android.util.SparseArray;
-import android.util.SuperNotCalledException;
 import android.view.ActionMode;
 import android.view.ContextMenu;
 import android.view.ContextMenu.ContextMenuInfo;
@@ -110,16 +104,11 @@ import android.view.ViewGroup.LayoutParams;
 import android.view.ViewManager;
 import android.view.ViewRootImpl;
 import android.view.Window;
-import android.view.Window.WindowControllerCallback;
 import android.view.WindowManager;
 import android.view.WindowManagerGlobal;
 import android.view.accessibility.AccessibilityEvent;
 import android.widget.AdapterView;
-import android.widget.Toolbar;
 
-import com.android.internal.app.IVoiceInteractor;
-import com.android.internal.app.ToolbarActionBar;
-import com.android.internal.app.WindowDecorActionBar;
 import com.android.internal.policy.PhoneWindow;
 
 import java.io.FileDescriptor;
@@ -1842,14 +1831,14 @@ public class Activity extends ContextThemeWrapper
      * visa-versa.
      * @see android.R.attr#resizeableActivity
      *
-     * @param multiWindowMode True if the activity is in multi-window mode.
+     * @param inMultiWindow True if the activity is in multi-window mode.
      */
     @CallSuper
-    public void onMultiWindowModeChanged(boolean multiWindowMode) {
+    public void onMultiWindowChanged(boolean inMultiWindow) {
         if (DEBUG_LIFECYCLE) Slog.v(TAG,
-                "onMultiWindowModeChanged " + this + ": " + multiWindowMode);
+                "onMultiWindowChanged " + this + ": " + inMultiWindow);
         if (mWindow != null) {
-            mWindow.onMultiWindowModeChanged();
+            mWindow.onMultiWindowChanged();
         }
     }
 
@@ -1859,9 +1848,9 @@ public class Activity extends ContextThemeWrapper
      *
      * @return True if the activity is in multi-window mode.
      */
-    public boolean inMultiWindowMode() {
+    public boolean inMultiWindow() {
         try {
-            return ActivityManagerNative.getDefault().inMultiWindowMode(mToken);
+            return ActivityManagerNative.getDefault().inMultiWindow(mToken);
         } catch (RemoteException e) {
         }
         return false;
@@ -1871,11 +1860,11 @@ public class Activity extends ContextThemeWrapper
      * Called by the system when the activity changes to and from picture-in-picture mode.
      * @see android.R.attr#supportsPictureInPicture
      *
-     * @param pictureInPictureMode True if the activity is in picture-in-picture mode.
+     * @param inPictureInPicture True if the activity is in picture-in-picture mode.
      */
-    public void onPictureInPictureModeChanged(boolean pictureInPictureMode) {
+    public void onPictureInPictureChanged(boolean inPictureInPicture) {
         if (DEBUG_LIFECYCLE) Slog.v(TAG,
-                "onPictureInPictureModeChanged " + this + ": " + pictureInPictureMode);
+                "onPictureInPictureChanged " + this + ": " + inPictureInPicture);
     }
 
     /**
@@ -1884,9 +1873,9 @@ public class Activity extends ContextThemeWrapper
      *
      * @return True if the activity is in picture-in-picture mode.
      */
-    public boolean inPictureInPictureMode() {
+    public boolean inPictureInPicture() {
         try {
-            return ActivityManagerNative.getDefault().inPictureInPictureMode(mToken);
+            return ActivityManagerNative.getDefault().inPictureInPicture(mToken);
         } catch (RemoteException e) {
         }
         return false;
@@ -1896,9 +1885,9 @@ public class Activity extends ContextThemeWrapper
      * Puts the activity in picture-in-picture mode.
      * @see android.R.attr#supportsPictureInPicture
      */
-    public void enterPictureInPictureMode() {
+    public void enterPictureInPicture() {
         try {
-            ActivityManagerNative.getDefault().enterPictureInPictureMode(mToken);
+            ActivityManagerNative.getDefault().enterPictureInPicture(mToken);
         } catch (RemoteException e) {
         }
     }
index 138ff6d..a3160f4 100644 (file)
@@ -2842,26 +2842,26 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM
             reply.writeInt(res);
             return true;
         }
-        case IN_MULTI_WINDOW_MODE_TRANSACTION: {
+        case IN_MULTI_WINDOW_TRANSACTION: {
             data.enforceInterface(IActivityManager.descriptor);
             final IBinder token = data.readStrongBinder();
-            final boolean multiWindowMode = inMultiWindowMode(token);
+            final boolean inMultiWindow = inMultiWindow(token);
             reply.writeNoException();
-            reply.writeInt(multiWindowMode ? 1 : 0);
+            reply.writeInt(inMultiWindow ? 1 : 0);
             return true;
         }
-        case IN_PICTURE_IN_PICTURE_MODE_TRANSACTION: {
+        case IN_PICTURE_IN_PICTURE_TRANSACTION: {
             data.enforceInterface(IActivityManager.descriptor);
             final IBinder token = data.readStrongBinder();
-            final boolean pipMode = inPictureInPictureMode(token);
+            final boolean inPip = inPictureInPicture(token);
             reply.writeNoException();
-            reply.writeInt(pipMode ? 1 : 0);
+            reply.writeInt(inPip ? 1 : 0);
             return true;
         }
-        case ENTER_PICTURE_IN_PICTURE_MODE_TRANSACTION: {
+        case ENTER_PICTURE_IN_PICTURE_TRANSACTION: {
             data.enforceInterface(IActivityManager.descriptor);
             final IBinder token = data.readStrongBinder();
-            enterPictureInPictureMode(token);
+            enterPictureInPicture(token);
             reply.writeNoException();
             return true;
         }
@@ -6678,12 +6678,12 @@ class ActivityManagerProxy implements IActivityManager
     }
 
     @Override
-    public boolean inMultiWindowMode(IBinder token) throws RemoteException {
+    public boolean inMultiWindow(IBinder token) throws RemoteException {
         Parcel data = Parcel.obtain();
         Parcel reply = Parcel.obtain();
         data.writeInterfaceToken(IActivityManager.descriptor);
         data.writeStrongBinder(token);
-        mRemote.transact(IN_MULTI_WINDOW_MODE_TRANSACTION, data, reply, 0);
+        mRemote.transact(IN_MULTI_WINDOW_TRANSACTION, data, reply, 0);
         reply.readException();
         final boolean multiWindowMode = reply.readInt() == 1 ? true : false;
         data.recycle();
@@ -6692,12 +6692,12 @@ class ActivityManagerProxy implements IActivityManager
     }
 
     @Override
-    public boolean inPictureInPictureMode(IBinder token) throws RemoteException {
+    public boolean inPictureInPicture(IBinder token) throws RemoteException {
         Parcel data = Parcel.obtain();
         Parcel reply = Parcel.obtain();
         data.writeInterfaceToken(IActivityManager.descriptor);
         data.writeStrongBinder(token);
-        mRemote.transact(IN_PICTURE_IN_PICTURE_MODE_TRANSACTION, data, reply, 0);
+        mRemote.transact(IN_PICTURE_IN_PICTURE_TRANSACTION, data, reply, 0);
         reply.readException();
         final boolean pipMode = reply.readInt() == 1 ? true : false;
         data.recycle();
@@ -6706,12 +6706,12 @@ class ActivityManagerProxy implements IActivityManager
     }
 
     @Override
-    public void enterPictureInPictureMode(IBinder token) throws RemoteException {
+    public void enterPictureInPicture(IBinder token) throws RemoteException {
         Parcel data = Parcel.obtain();
         Parcel reply = Parcel.obtain();
         data.writeInterfaceToken(IActivityManager.descriptor);
         data.writeStrongBinder(token);
-        mRemote.transact(ENTER_PICTURE_IN_PICTURE_MODE_TRANSACTION, data, reply, 0);
+        mRemote.transact(ENTER_PICTURE_IN_PICTURE_TRANSACTION, data, reply, 0);
         reply.readException();
         data.recycle();
         reply.recycle();
index 99c275c..89bb01f 100644 (file)
@@ -53,7 +53,6 @@ import android.net.Network;
 import android.net.Proxy;
 import android.net.ProxyInfo;
 import android.net.Uri;
-import android.opengl.GLUtils;
 import android.os.AsyncTask;
 import android.os.Binder;
 import android.os.Build;
@@ -84,7 +83,6 @@ import android.util.AndroidRuntimeException;
 import android.util.ArrayMap;
 import android.util.DisplayMetrics;
 import android.util.EventLog;
-import android.util.LocaleList;
 import android.util.Log;
 import android.util.LogPrinter;
 import android.util.Pair;
@@ -1245,15 +1243,15 @@ public final class ActivityThread {
         }
 
         @Override
-        public void scheduleMultiWindowModeChanged(IBinder token, boolean multiWindowMode)
+        public void scheduleMultiWindowChanged(IBinder token, boolean inMultiWindow)
                 throws RemoteException {
-            sendMessage(H.MULTI_WINDOW_MODE_CHANGED, token, multiWindowMode ? 1 : 0);
+            sendMessage(H.MULTI_WINDOW_CHANGED, token, inMultiWindow ? 1 : 0);
         }
 
         @Override
-        public void schedulePictureInPictureModeChanged(IBinder token, boolean pipMode)
+        public void schedulePictureInPictureChanged(IBinder token, boolean inPip)
                 throws RemoteException {
-            sendMessage(H.PICTURE_IN_PICTURE_MODE_CHANGED, token, pipMode ? 1 : 0);
+            sendMessage(H.PICTURE_IN_PICTURE_CHANGED, token, inPip ? 1 : 0);
         }
 
         @Override
@@ -1325,8 +1323,8 @@ public final class ActivityThread {
         public static final int ENTER_ANIMATION_COMPLETE = 149;
         public static final int START_BINDER_TRACKING = 150;
         public static final int STOP_BINDER_TRACKING_AND_DUMP = 151;
-        public static final int MULTI_WINDOW_MODE_CHANGED = 152;
-        public static final int PICTURE_IN_PICTURE_MODE_CHANGED = 153;
+        public static final int MULTI_WINDOW_CHANGED = 152;
+        public static final int PICTURE_IN_PICTURE_CHANGED = 153;
         public static final int LOCAL_VOICE_INTERACTION_STARTED = 154;
 
         String codeToString(int code) {
@@ -1381,8 +1379,8 @@ public final class ActivityThread {
                     case CANCEL_VISIBLE_BEHIND: return "CANCEL_VISIBLE_BEHIND";
                     case BACKGROUND_VISIBLE_BEHIND_CHANGED: return "BACKGROUND_VISIBLE_BEHIND_CHANGED";
                     case ENTER_ANIMATION_COMPLETE: return "ENTER_ANIMATION_COMPLETE";
-                    case MULTI_WINDOW_MODE_CHANGED: return "MULTI_WINDOW_MODE_CHANGED";
-                    case PICTURE_IN_PICTURE_MODE_CHANGED: return "PICTURE_IN_PICTURE_MODE_CHANGED";
+                    case MULTI_WINDOW_CHANGED: return "MULTI_WINDOW_CHANGED";
+                    case PICTURE_IN_PICTURE_CHANGED: return "PICTURE_IN_PICTURE_CHANGED";
                     case LOCAL_VOICE_INTERACTION_STARTED: return "LOCAL_VOICE_INTERACTION_STARTED";
                 }
             }
@@ -1627,11 +1625,11 @@ public final class ActivityThread {
                 case STOP_BINDER_TRACKING_AND_DUMP:
                     handleStopBinderTrackingAndDump((ParcelFileDescriptor) msg.obj);
                     break;
-                case MULTI_WINDOW_MODE_CHANGED:
-                    handleMultiWindowModeChanged((IBinder) msg.obj, msg.arg1 == 1);
+                case MULTI_WINDOW_CHANGED:
+                    handleMultiWindowChanged((IBinder) msg.obj, msg.arg1 == 1);
                     break;
-                case PICTURE_IN_PICTURE_MODE_CHANGED:
-                    handlePictureInPictureModeChanged((IBinder) msg.obj, msg.arg1 == 1);
+                case PICTURE_IN_PICTURE_CHANGED:
+                    handlePictureInPictureChanged((IBinder) msg.obj, msg.arg1 == 1);
                     break;
                 case LOCAL_VOICE_INTERACTION_STARTED:
                     handleLocalVoiceInteractionStarted((IBinder) ((SomeArgs) msg.obj).arg1,
@@ -2880,17 +2878,17 @@ public final class ActivityThread {
         }
     }
 
-    private void handleMultiWindowModeChanged(IBinder token, boolean multiWindowMode) {
+    private void handleMultiWindowChanged(IBinder token, boolean inMultiWindow) {
         final ActivityClientRecord r = mActivities.get(token);
         if (r != null) {
-            r.activity.onMultiWindowModeChanged(multiWindowMode);
+            r.activity.onMultiWindowChanged(inMultiWindow);
         }
     }
 
-    private void handlePictureInPictureModeChanged(IBinder token, boolean pipMode) {
+    private void handlePictureInPictureChanged(IBinder token, boolean inPip) {
         final ActivityClientRecord r = mActivities.get(token);
         if (r != null) {
-            r.activity.onPictureInPictureModeChanged(pipMode);
+            r.activity.onPictureInPictureChanged(inPip);
         }
     }
 
index 9be7f23..59ecc03 100644 (file)
@@ -730,21 +730,21 @@ public abstract class ApplicationThreadNative extends Binder
             return true;
         }
 
-        case SCHEDULE_MULTI_WINDOW_MODE_CHANGED_TRANSACTION:
+        case SCHEDULE_MULTI_WINDOW_CHANGED_TRANSACTION:
         {
             data.enforceInterface(IApplicationThread.descriptor);
             final IBinder b = data.readStrongBinder();
-            final boolean multiWindowMode = data.readInt() != 0;
-            scheduleMultiWindowModeChanged(b, multiWindowMode);
+            final boolean inMultiWindow = data.readInt() != 0;
+            scheduleMultiWindowChanged(b, inMultiWindow);
             return true;
         }
 
-        case SCHEDULE_PICTURE_IN_PICTURE_MODE_CHANGED_TRANSACTION:
+        case SCHEDULE_PICTURE_IN_PICTURE_CHANGED_TRANSACTION:
         {
             data.enforceInterface(IApplicationThread.descriptor);
             final IBinder b = data.readStrongBinder();
-            final boolean pipMode = data.readInt() != 0;
-            schedulePictureInPictureModeChanged(b, pipMode);
+            final boolean inPip = data.readInt() != 0;
+            schedulePictureInPictureChanged(b, inPip);
             return true;
         }
 
@@ -1495,25 +1495,25 @@ class ApplicationThreadProxy implements IApplicationThread {
     }
 
     @Override
-    public final void scheduleMultiWindowModeChanged(
-            IBinder token, boolean multiWindowMode) throws RemoteException {
+    public final void scheduleMultiWindowChanged(
+            IBinder token, boolean inMultiWindow) throws RemoteException {
         Parcel data = Parcel.obtain();
         data.writeInterfaceToken(IApplicationThread.descriptor);
         data.writeStrongBinder(token);
-        data.writeInt(multiWindowMode ? 1 : 0);
-        mRemote.transact(SCHEDULE_MULTI_WINDOW_MODE_CHANGED_TRANSACTION, data, null,
+        data.writeInt(inMultiWindow ? 1 : 0);
+        mRemote.transact(SCHEDULE_MULTI_WINDOW_CHANGED_TRANSACTION, data, null,
                 IBinder.FLAG_ONEWAY);
         data.recycle();
     }
 
     @Override
-    public final void schedulePictureInPictureModeChanged(IBinder token, boolean pipMode)
+    public final void schedulePictureInPictureChanged(IBinder token, boolean inPip)
             throws RemoteException {
         Parcel data = Parcel.obtain();
         data.writeInterfaceToken(IApplicationThread.descriptor);
         data.writeStrongBinder(token);
-        data.writeInt(pipMode ? 1 : 0);
-        mRemote.transact(SCHEDULE_PICTURE_IN_PICTURE_MODE_CHANGED_TRANSACTION, data, null,
+        data.writeInt(inPip ? 1 : 0);
+        mRemote.transact(SCHEDULE_PICTURE_IN_PICTURE_CHANGED_TRANSACTION, data, null,
                 IBinder.FLAG_ONEWAY);
         data.recycle();
     }
index cefbb80..f5e7d78 100644 (file)
@@ -581,11 +581,11 @@ public interface IActivityManager extends IInterface {
 
     public int getAppStartMode(int uid, String packageName) throws RemoteException;
 
-    public boolean inMultiWindowMode(IBinder token) throws RemoteException;
+    public boolean inMultiWindow(IBinder token) throws RemoteException;
 
-    public boolean inPictureInPictureMode(IBinder token) throws RemoteException;
+    public boolean inPictureInPicture(IBinder token) throws RemoteException;
 
-    public void enterPictureInPictureMode(IBinder token) throws RemoteException;
+    public void enterPictureInPicture(IBinder token) throws RemoteException;
 
     public void setVrMode(IBinder token, boolean enabled) throws RemoteException;
 
@@ -958,10 +958,10 @@ public interface IActivityManager extends IInterface {
     int MOVE_TOP_ACTIVITY_TO_PINNED_STACK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 349;
     int GET_APP_START_MODE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 350;
     int UNLOCK_USER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 351;
-    int IN_MULTI_WINDOW_MODE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 352;
-    int IN_PICTURE_IN_PICTURE_MODE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 353;
+    int IN_MULTI_WINDOW_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 352;
+    int IN_PICTURE_IN_PICTURE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 353;
     int KILL_PACKAGE_DEPENDENTS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 354;
-    int ENTER_PICTURE_IN_PICTURE_MODE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 355;
+    int ENTER_PICTURE_IN_PICTURE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 355;
     int ACTIVITY_RELAUNCHED_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 356;
     int GET_URI_PERMISSION_OWNER_FOR_ACTIVITY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 357;
     int RESIZE_DOCKED_STACK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 358;
index 6d64bd0..b55da88 100644 (file)
@@ -152,8 +152,8 @@ public interface IApplicationThread extends IInterface {
     void notifyCleartextNetwork(byte[] firstPacket) throws RemoteException;
     void startBinderTracking() throws RemoteException;
     void stopBinderTrackingAndDump(FileDescriptor fd) throws RemoteException;
-    void scheduleMultiWindowModeChanged(IBinder token, boolean multiWindowMode) throws RemoteException;
-    void schedulePictureInPictureModeChanged(IBinder token, boolean multiWindowMode) throws RemoteException;
+    void scheduleMultiWindowChanged(IBinder token, boolean multiWindowMode) throws RemoteException;
+    void schedulePictureInPictureChanged(IBinder token, boolean multiWindowMode) throws RemoteException;
     void scheduleLocalVoiceInteractionStarted(IBinder token, IVoiceInteractor voiceInteractor) throws RemoteException;
 
     String descriptor = "android.app.IApplicationThread";
@@ -215,7 +215,7 @@ public interface IApplicationThread extends IInterface {
     int NOTIFY_CLEARTEXT_NETWORK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+55;
     int START_BINDER_TRACKING_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+56;
     int STOP_BINDER_TRACKING_AND_DUMP_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+57;
-    int SCHEDULE_MULTI_WINDOW_MODE_CHANGED_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+58;
-    int SCHEDULE_PICTURE_IN_PICTURE_MODE_CHANGED_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+59;
+    int SCHEDULE_MULTI_WINDOW_CHANGED_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+58;
+    int SCHEDULE_PICTURE_IN_PICTURE_CHANGED_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+59;
     int SCHEDULE_LOCAL_VOICE_INTERACTION_STARTED_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+60;
 }
index ee70891..96b63d1 100644 (file)
@@ -2154,7 +2154,7 @@ public abstract class Window {
      * Called when the activity changes from fullscreen mode to multi-window mode and visa-versa.
      * @hide
      */
-    public abstract void onMultiWindowModeChanged();
+    public abstract void onMultiWindowChanged();
 
     /**
      * Called when the activity just relaunched.
index 19ed11a..7637eec 100644 (file)
@@ -675,7 +675,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
     }
 
     @Override
-    public void onMultiWindowModeChanged() {
+    public void onMultiWindowChanged() {
         if (mDecor != null) {
             mDecor.onConfigurationChanged(getContext().getResources().getConfiguration());
         }
index 336888a..b490c00 100644 (file)
@@ -288,7 +288,7 @@ public class FilesActivity extends BaseActivity {
         // With new multi-window mode we have to pick how we are launched.
         // By default we'd be launched in-place above the existing app.
         // By setting launch-to-side ActivityManager will open us to side.
-        if (inMultiWindowMode()) {
+        if (inMultiWindow()) {
             intent.addFlags(Intent.FLAG_ACTIVITY_LAUNCH_ADJACENT);
         }
 
index c3b794d..d01a288 100644 (file)
@@ -532,9 +532,9 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD
     }
 
     @Override
-    public void onMultiWindowModeChanged(boolean multiWindowMode) {
-        super.onMultiWindowModeChanged(multiWindowMode);
-        if (!multiWindowMode) {
+    public void onMultiWindowChanged(boolean inMultiWindow) {
+        super.onMultiWindowChanged(inMultiWindow);
+        if (!inMultiWindow) {
             RecentsTaskLoader loader = Recents.getTaskLoader();
             RecentsTaskLoadPlan.Options launchOpts = new RecentsTaskLoadPlan.Options();
             launchOpts.loadIcons = false;
index 978e69c..655950e 100644 (file)
@@ -7061,7 +7061,7 @@ public final class ActivityManagerService extends ActivityManagerNative
     }
 
     @Override
-    public boolean inMultiWindowMode(IBinder token) {
+    public boolean inMultiWindow(IBinder token) {
         final long origId = Binder.clearCallingIdentity();
         try {
             synchronized(this) {
@@ -7078,7 +7078,7 @@ public final class ActivityManagerService extends ActivityManagerNative
     }
 
     @Override
-    public boolean inPictureInPictureMode(IBinder token) {
+    public boolean inPictureInPicture(IBinder token) {
         final long origId = Binder.clearCallingIdentity();
         try {
             synchronized(this) {
@@ -7094,24 +7094,24 @@ public final class ActivityManagerService extends ActivityManagerNative
     }
 
     @Override
-    public void enterPictureInPictureMode(IBinder token) {
+    public void enterPictureInPicture(IBinder token) {
         final long origId = Binder.clearCallingIdentity();
         try {
             synchronized(this) {
                 if (!mSupportsPictureInPicture) {
-                    throw new IllegalStateException("enterPictureInPictureMode: "
+                    throw new IllegalStateException("enterPictureInPicture: "
                             + "Device doesn't support picture-in-picture mode.");
                 }
 
                 final ActivityRecord r = ActivityRecord.forTokenLocked(token);
 
                 if (r == null) {
-                    throw new IllegalStateException("enterPictureInPictureMode: "
+                    throw new IllegalStateException("enterPictureInPicture: "
                             + "Can't find activity for token=" + token);
                 }
 
                 if (!r.supportsPictureInPicture()) {
-                    throw new IllegalArgumentException("enterPictureInPictureMode: "
+                    throw new IllegalArgumentException("enterPictureInPicture: "
                             + "Picture-In-Picture not supported for r=" + r);
                 }
 
@@ -7120,7 +7120,7 @@ public final class ActivityManagerService extends ActivityManagerNative
                         ? mDefaultPinnedStackBounds : null;
 
                 mStackSupervisor.moveActivityToStackLocked(
-                        r, PINNED_STACK_ID, "enterPictureInPictureMode", bounds);
+                        r, PINNED_STACK_ID, "enterPictureInPicture", bounds);
             }
         } finally {
             Binder.restoreCallingIdentity(origId);
index 7de254e..577ca48 100644 (file)
@@ -4801,7 +4801,7 @@ final class ActivityStack {
 
     private void postAddTask(TaskRecord task, ActivityStack prevStack) {
         if (prevStack != null) {
-            task.reportPictureInPictureModeChangeIfNeeded(prevStack);
+            task.reportPictureInPictureChangeIfNeeded(prevStack);
         } else if (task.voiceSession != null) {
             try {
                 task.voiceSession.taskStarted(task.intent, task.taskId);
@@ -4860,7 +4860,7 @@ final class ActivityStack {
         r.setTask(task, null);
         task.addActivityToTop(r);
         setAppTask(r, task);
-        task.reportPictureInPictureModeChangeIfNeeded(prevStack);
+        task.reportPictureInPictureChangeIfNeeded(prevStack);
         moveToFrontAndResumeStateIfNeeded(r, wasFocused, wasResumed, "moveActivityToStack");
         if (wasResumed) {
             prevStack.mResumedActivity = null;
index be97c5a..272f26f 100644 (file)
@@ -1322,7 +1322,7 @@ final class TaskRecord {
         }
 
         if (mFullscreen != oldFullscreen) {
-            reportMultiWindowModeChange();
+            reportMultiWindowChange();
         }
 
         return !mOverrideConfig.equals(oldConfig) ? mOverrideConfig : null;
@@ -1377,22 +1377,22 @@ final class TaskRecord {
         return bounds;
     }
 
-    private void reportMultiWindowModeChange() {
+    private void reportMultiWindowChange() {
         for (int i = mActivities.size() - 1; i >= 0; i--) {
             final ActivityRecord r = mActivities.get(i);
             if (r.app != null && r.app.thread != null) {
                 try {
                     // An activity is consider to be in multi-window mode if its task isn't
                     // fullscreen.
-                    r.app.thread.scheduleMultiWindowModeChanged(r.appToken, !mFullscreen);
+                    r.app.thread.scheduleMultiWindowChanged(r.appToken, !mFullscreen);
                 } catch (Exception e) {
-                    Slog.e(TAG, "TaskRecord.reportMultiWindowModeChange: ", e);
+                    Slog.e(TAG, "TaskRecord.reportMultiWindowChange: ", e);
                 }
             }
         }
     }
 
-    void reportPictureInPictureModeChangeIfNeeded(ActivityStack prevStack) {
+    void reportPictureInPictureChangeIfNeeded(ActivityStack prevStack) {
         if (prevStack == null || prevStack == stack
                 || (prevStack.mStackId != PINNED_STACK_ID && stack.mStackId != PINNED_STACK_ID)) {
             return;
@@ -1402,10 +1402,10 @@ final class TaskRecord {
             final ActivityRecord r = mActivities.get(i);
             if (r.app != null && r.app.thread != null) {
                 try {
-                    r.app.thread.schedulePictureInPictureModeChanged(
+                    r.app.thread.schedulePictureInPictureChanged(
                             r.appToken, stack.mStackId == PINNED_STACK_ID);
                 } catch (Exception e) {
-                    Slog.e(TAG, "TaskRecord.reportMultiWindowModeChange: ", e);
+                    Slog.e(TAG, "TaskRecord.reportPictureInPictureChangeIfNeeded: ", e);
                 }
             }
         }