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);
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();
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);
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();
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);
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();
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);
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();
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);
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();
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);
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();
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;
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;
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;
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;
* 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();
}
}
*
* @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;
* 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);
}
/**
*
* @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;
* 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) {
}
}
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;
}
}
@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();
}
@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();
}
@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();
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;
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;
}
@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
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) {
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";
}
}
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,
}
}
- 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);
}
}
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;
}
}
@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();
}
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;
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;
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";
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;
}
* 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.
}
@Override
- public void onMultiWindowModeChanged() {
+ public void onMultiWindowChanged() {
if (mDecor != null) {
mDecor.onConfigurationChanged(getContext().getResources().getConfiguration());
}
// 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);
}
}
@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;
}
@Override
- public boolean inMultiWindowMode(IBinder token) {
+ public boolean inMultiWindow(IBinder token) {
final long origId = Binder.clearCallingIdentity();
try {
synchronized(this) {
}
@Override
- public boolean inPictureInPictureMode(IBinder token) {
+ public boolean inPictureInPicture(IBinder token) {
final long origId = Binder.clearCallingIdentity();
try {
synchronized(this) {
}
@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);
}
? mDefaultPinnedStackBounds : null;
mStackSupervisor.moveActivityToStackLocked(
- r, PINNED_STACK_ID, "enterPictureInPictureMode", bounds);
+ r, PINNED_STACK_ID, "enterPictureInPicture", bounds);
}
} finally {
Binder.restoreCallingIdentity(origId);
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);
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;
}
if (mFullscreen != oldFullscreen) {
- reportMultiWindowModeChange();
+ reportMultiWindowChange();
}
return !mOverrideConfig.equals(oldConfig) ? mOverrideConfig : null;
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;
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);
}
}
}