Merge "Dismiss docked stack when opening non-resizable activity" into nyc-dev
This commit is contained in:
@@ -40,4 +40,9 @@ oneway interface ITaskStackListener {
|
||||
* Called when we launched an activity that we forced to be resizable.
|
||||
*/
|
||||
void onActivityForcedResizable(String packageName, int taskId);
|
||||
|
||||
/**
|
||||
* Callen when we launched an activity that is dismissed the docked stack.
|
||||
*/
|
||||
void onActivityDismissingDockedStack();
|
||||
}
|
||||
|
||||
@@ -4018,12 +4018,6 @@
|
||||
<!-- Lock-to-app unlock password string -->
|
||||
<string name="lock_to_app_unlock_password">Ask for password before unpinning</string>
|
||||
|
||||
<!-- Multi-Window strings -->
|
||||
<!-- Warning message when an app that got forced to be resizable gets shown in split-screen -->
|
||||
<string name="dock_forced_resizable">App may not work with split-screen.</string>
|
||||
<!-- Warning message when we try to dock a non-resizeble tasks and launch it in fullscreen instead. -->
|
||||
<string name="dock_non_resizeble_failed_to_dock_text">App does not support split-screen.</string>
|
||||
|
||||
<!-- Notification shown when device owner silently installs a package [CHAR LIMIT=NONE] -->
|
||||
<string name="package_installed_device_owner">Installed by your administrator</string>
|
||||
<!-- Notification shown when device owner silently updates a package [CHAR LIMIT=NONE] -->
|
||||
|
||||
@@ -613,8 +613,6 @@
|
||||
<java-symbol type="string" name="display_manager_overlay_display_name" />
|
||||
<java-symbol type="string" name="display_manager_overlay_display_secure_suffix" />
|
||||
<java-symbol type="string" name="display_manager_overlay_display_title" />
|
||||
<java-symbol type="string" name="dock_forced_resizable" />
|
||||
<java-symbol type="string" name="dock_non_resizeble_failed_to_dock_text" />
|
||||
<java-symbol type="string" name="double_tap_toast" />
|
||||
<java-symbol type="string" name="durationDays" />
|
||||
<java-symbol type="string" name="durationDayHours" />
|
||||
|
||||
@@ -22,6 +22,6 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/forced_resizable_info_text"
|
||||
android:text="@string/dock_forced_resizable"
|
||||
android:textColor="#ffffff"/>
|
||||
</FrameLayout>
|
||||
@@ -1557,9 +1557,6 @@
|
||||
<!-- Accessibility action for moving down the docked stack divider [CHAR LIMIT=NONE] -->
|
||||
<string name="accessibility_action_divider_move_right">Move right</string>
|
||||
|
||||
<!-- Text that gets shown on top of current activity to inform the user that the system force-resized the current activity and that things might crash/not work properly [CHAR LIMIT=NONE] -->
|
||||
<string name="forced_resizable_info_text">App may not work with multi-window</string>
|
||||
|
||||
<!-- Accessibility description of a QS tile while editing positions [CHAR LIMIT=NONE] -->
|
||||
<string name="accessibility_qs_edit_tile_label">Position <xliff:g id="position" example="2">%1$d</xliff:g>, <xliff:g id="tile_name" example="Wi-Fi">%2$s</xliff:g>. Double tap to edit.</string>
|
||||
|
||||
@@ -1587,4 +1584,10 @@
|
||||
<!-- Accessibility label for window when QS editing is happening [CHAR LIMIT=NONE] -->
|
||||
<string name="accessibility_desc_quick_settings_edit">Quick settings editor.</string>
|
||||
|
||||
<!-- Multi-Window strings -->
|
||||
<!-- Text that gets shown on top of current activity to inform the user that the system force-resized the current activity and that things might crash/not work properly [CHAR LIMIT=NONE] -->
|
||||
<string name="dock_forced_resizable">App may not work with split-screen.</string>
|
||||
<!-- Warning message when we try to dock a non-resizeble tasks and launch it in fullscreen instead. -->
|
||||
<string name="dock_non_resizeble_failed_to_dock_text">App does not support split-screen.</string>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -45,7 +45,6 @@ import com.android.systemui.SystemUIApplication;
|
||||
import com.android.systemui.recents.events.EventBus;
|
||||
import com.android.systemui.recents.events.activity.DockedTopTaskEvent;
|
||||
import com.android.systemui.recents.events.activity.EnterRecentsWindowLastAnimationFrameEvent;
|
||||
import com.android.systemui.recents.events.activity.ForcedResizableEvent;
|
||||
import com.android.systemui.recents.events.activity.HideRecentsEvent;
|
||||
import com.android.systemui.recents.events.activity.IterateRecentsEvent;
|
||||
import com.android.systemui.recents.events.activity.LaunchNextTaskRequestEvent;
|
||||
@@ -125,13 +124,6 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener
|
||||
loader.loadTasks(mContext, plan, launchOpts);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityForcedResizable(String packageName, int taskId) {
|
||||
EventBus.getDefault().sendOntoMainThread(
|
||||
new ForcedResizableEvent(packageName, taskId));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
protected static RecentsTaskLoadPlan sInstanceLoadPlan;
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2016 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
|
||||
*/
|
||||
|
||||
package com.android.systemui.recents.events.activity;
|
||||
|
||||
import com.android.systemui.recents.events.EventBus;
|
||||
|
||||
/**
|
||||
* Sent when recents received the information that an activity got forced resizable, and we need
|
||||
* to inform the user about that.
|
||||
*/
|
||||
public class ForcedResizableEvent extends EventBus.Event {
|
||||
|
||||
public final String packageName;
|
||||
public final int taskId;
|
||||
|
||||
public ForcedResizableEvent(String packageName, int taskId) {
|
||||
this.packageName = packageName;
|
||||
this.taskId = taskId;
|
||||
}
|
||||
}
|
||||
@@ -144,6 +144,7 @@ public class SystemServicesProxy {
|
||||
public void onPinnedActivityRestartAttempt() { }
|
||||
public void onPinnedStackAnimationEnded() { }
|
||||
public void onActivityForcedResizable(String packageName, int taskId) { }
|
||||
public void onActivityDismissingDockedStack() { }
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -182,6 +183,11 @@ public class SystemServicesProxy {
|
||||
mHandler.obtainMessage(H.ON_ACTIVITY_FORCED_RESIZABLE, taskId, 0, packageName)
|
||||
.sendToTarget();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityDismissingDockedStack() throws RemoteException {
|
||||
mHandler.sendEmptyMessage(H.ON_ACTIVITY_DISMISSING_DOCKED_STACK);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -1091,6 +1097,7 @@ public class SystemServicesProxy {
|
||||
private static final int ON_PINNED_ACTIVITY_RESTART_ATTEMPT = 3;
|
||||
private static final int ON_PINNED_STACK_ANIMATION_ENDED = 4;
|
||||
private static final int ON_ACTIVITY_FORCED_RESIZABLE = 5;
|
||||
private static final int ON_ACTIVITY_DISMISSING_DOCKED_STACK = 6;
|
||||
|
||||
@Override
|
||||
public void handleMessage(Message msg) {
|
||||
@@ -1126,6 +1133,12 @@ public class SystemServicesProxy {
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ON_ACTIVITY_DISMISSING_DOCKED_STACK: {
|
||||
for (int i = mTaskStackListeners.size() - 1; i >= 0; i--) {
|
||||
mTaskStackListeners.get(i).onActivityDismissingDockedStack();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,12 +20,14 @@ import android.app.ActivityOptions;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Handler;
|
||||
import android.util.ArrayMap;
|
||||
import android.util.ArraySet;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.android.systemui.R;
|
||||
import com.android.systemui.recents.events.EventBus;
|
||||
import com.android.systemui.recents.events.activity.AppTransitionFinishedEvent;
|
||||
import com.android.systemui.recents.events.activity.ForcedResizableEvent;
|
||||
import com.android.systemui.recents.misc.SystemServicesProxy;
|
||||
import com.android.systemui.recents.misc.SystemServicesProxy.TaskStackListener;
|
||||
import com.android.systemui.stackdivider.events.StartedDragingEvent;
|
||||
import com.android.systemui.stackdivider.events.StoppedDragingEvent;
|
||||
|
||||
@@ -53,6 +55,18 @@ public class ForcedResizableInfoActivityController {
|
||||
public ForcedResizableInfoActivityController(Context context) {
|
||||
mContext = context;
|
||||
EventBus.getDefault().register(this);
|
||||
SystemServicesProxy.getInstance(context).registerTaskStackListener(
|
||||
new TaskStackListener() {
|
||||
@Override
|
||||
public void onActivityForcedResizable(String packageName, int taskId) {
|
||||
activityForcedResizable(packageName, taskId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityDismissingDockedStack() {
|
||||
activityDismissingDockedStack();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void notifyDockedStackExistsChanged(boolean exists) {
|
||||
@@ -61,14 +75,6 @@ public class ForcedResizableInfoActivityController {
|
||||
}
|
||||
}
|
||||
|
||||
public final void onBusEvent(ForcedResizableEvent forcedResizableEvent) {
|
||||
if (debounce(forcedResizableEvent.packageName)) {
|
||||
return;
|
||||
}
|
||||
mPendingTaskIds.add(forcedResizableEvent.taskId);
|
||||
postTimeout();
|
||||
}
|
||||
|
||||
public final void onBusEvent(AppTransitionFinishedEvent event) {
|
||||
if (!mDividerDraging) {
|
||||
showPending();
|
||||
@@ -85,6 +91,20 @@ public class ForcedResizableInfoActivityController {
|
||||
showPending();
|
||||
}
|
||||
|
||||
private void activityForcedResizable(String packageName, int taskId) {
|
||||
if (debounce(packageName)) {
|
||||
return;
|
||||
}
|
||||
mPendingTaskIds.add(taskId);
|
||||
postTimeout();
|
||||
}
|
||||
|
||||
private void activityDismissingDockedStack() {
|
||||
Toast toast = Toast.makeText(mContext, R.string.dock_non_resizeble_failed_to_dock_text,
|
||||
Toast.LENGTH_SHORT);
|
||||
toast.show();
|
||||
}
|
||||
|
||||
private void showPending() {
|
||||
mHandler.removeCallbacks(mTimeoutRunnable);
|
||||
for (int i = mPendingTaskIds.size() - 1; i >= 0; i--) {
|
||||
|
||||
@@ -1467,6 +1467,7 @@ public final class ActivityManagerService extends ActivityManagerNative
|
||||
static final int NOTIFY_PINNED_ACTIVITY_RESTART_ATTEMPT_LISTENERS_MSG = 65;
|
||||
static final int NOTIFY_PINNED_STACK_ANIMATION_ENDED_LISTENERS_MSG = 66;
|
||||
static final int NOTIFY_FORCED_RESIZABLE_MSG = 67;
|
||||
static final int NOTIFY_ACTIVITY_DISMISSING_DOCKED_STACK_MSG = 68;
|
||||
|
||||
static final int FIRST_ACTIVITY_STACK_MSG = 100;
|
||||
static final int FIRST_BROADCAST_QUEUE_MSG = 200;
|
||||
@@ -2056,6 +2057,21 @@ public final class ActivityManagerService extends ActivityManagerNative
|
||||
}
|
||||
break;
|
||||
}
|
||||
case NOTIFY_ACTIVITY_DISMISSING_DOCKED_STACK_MSG: {
|
||||
synchronized (ActivityManagerService.this) {
|
||||
for (int i = mTaskStackListeners.beginBroadcast() - 1; i >= 0; i--) {
|
||||
try {
|
||||
// Make a one-way callback to the listener
|
||||
mTaskStackListeners.getBroadcastItem(i)
|
||||
.onActivityDismissingDockedStack();
|
||||
} catch (RemoteException e){
|
||||
// Handled by the RemoteCallbackList
|
||||
}
|
||||
}
|
||||
mTaskStackListeners.finishBroadcast();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case NOTIFY_CLEARTEXT_NETWORK_MSG: {
|
||||
final int uid = msg.arg1;
|
||||
final byte[] firstPacket = (byte[]) msg.obj;
|
||||
|
||||
@@ -152,6 +152,7 @@ import static com.android.server.am.ActivityManagerDebugConfig.TAG_AM;
|
||||
import static com.android.server.am.ActivityManagerDebugConfig.TAG_WITH_CLASS_NAME;
|
||||
import static com.android.server.am.ActivityManagerService.ANIMATE;
|
||||
import static com.android.server.am.ActivityManagerService.FIRST_SUPERVISOR_STACK_MSG;
|
||||
import static com.android.server.am.ActivityManagerService.NOTIFY_ACTIVITY_DISMISSING_DOCKED_STACK_MSG;
|
||||
import static com.android.server.am.ActivityManagerService.NOTIFY_FORCED_RESIZABLE_MSG;
|
||||
import static com.android.server.am.ActivityRecord.APPLICATION_ACTIVITY_TYPE;
|
||||
import static com.android.server.am.ActivityRecord.HOME_ACTIVITY_TYPE;
|
||||
@@ -1810,7 +1811,7 @@ public final class ActivityStackSupervisor implements DisplayListener {
|
||||
if (DEBUG_STACK) Slog.d(TAG_STACK,
|
||||
"findTaskToMoveToFront: moved to front of stack=" + task.stack);
|
||||
|
||||
showNonResizeableDockToastIfNeeded(task, INVALID_STACK_ID, task.stack.mStackId);
|
||||
handleNonResizableTaskIfNeeded(task, INVALID_STACK_ID, task.stack.mStackId);
|
||||
}
|
||||
|
||||
boolean canUseActivityOptionsLaunchBounds(ActivityOptions options, int launchStackId) {
|
||||
@@ -2392,7 +2393,7 @@ public final class ActivityStackSupervisor implements DisplayListener {
|
||||
resumeFocusedStackTopActivityLocked();
|
||||
}
|
||||
|
||||
showNonResizeableDockToastIfNeeded(task, preferredLaunchStackId, stackId);
|
||||
handleNonResizableTaskIfNeeded(task, preferredLaunchStackId, stackId);
|
||||
|
||||
return (preferredLaunchStackId == stackId);
|
||||
}
|
||||
@@ -3363,15 +3364,19 @@ public final class ActivityStackSupervisor implements DisplayListener {
|
||||
}
|
||||
}
|
||||
|
||||
void showNonResizeableDockToastIfNeeded(
|
||||
void handleNonResizableTaskIfNeeded(
|
||||
TaskRecord task, int preferredStackId, int actualStackId) {
|
||||
if (!isStackDockedInEffect(actualStackId) && preferredStackId != DOCKED_STACK_ID) {
|
||||
if ((!isStackDockedInEffect(actualStackId) && preferredStackId != DOCKED_STACK_ID)
|
||||
|| task.isHomeTask()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!task.canGoInDockedStack()) {
|
||||
// Display a warning toast that we tried to put a non-dockable task in the docked stack.
|
||||
mWindowManager.scheduleShowNonResizeableDockToast(task.taskId);
|
||||
mService.mHandler.sendEmptyMessage(NOTIFY_ACTIVITY_DISMISSING_DOCKED_STACK_MSG);
|
||||
|
||||
// Dismiss docked stack.
|
||||
mService.moveTasksToFullscreenStack(DOCKED_STACK_ID, false);
|
||||
} else if (task.mResizeMode == RESIZE_MODE_FORCE_RESIZEABLE) {
|
||||
String packageName = task.getTopActivity() != null
|
||||
? task.getTopActivity().appInfo.packageName : null;
|
||||
|
||||
@@ -986,7 +986,7 @@ class ActivityStarter {
|
||||
}
|
||||
top.deliverNewIntentLocked(
|
||||
mCallingUid, mStartActivity.intent, mStartActivity.launchedFromPackage);
|
||||
mSupervisor.showNonResizeableDockToastIfNeeded(mStartActivity.task,
|
||||
mSupervisor.handleNonResizableTaskIfNeeded(mStartActivity.task,
|
||||
preferredLaunchStackId, topStack.mStackId);
|
||||
return START_DELIVERED_TO_TOP;
|
||||
}
|
||||
@@ -1074,7 +1074,7 @@ class ActivityStarter {
|
||||
}
|
||||
mSupervisor.updateUserStackLocked(mStartActivity.userId, mTargetStack);
|
||||
|
||||
mSupervisor.showNonResizeableDockToastIfNeeded(
|
||||
mSupervisor.handleNonResizableTaskIfNeeded(
|
||||
mStartActivity.task, preferredLaunchStackId, mTargetStack.mStackId);
|
||||
|
||||
return START_SUCCESS;
|
||||
@@ -1382,6 +1382,9 @@ class ActivityStarter {
|
||||
mTargetStack.moveToFront("intentActivityFound");
|
||||
}
|
||||
|
||||
mSupervisor.handleNonResizableTaskIfNeeded(intentActivity.task, INVALID_STACK_ID,
|
||||
mTargetStack.mStackId);
|
||||
|
||||
// If the caller has requested that the target task be reset, then do so.
|
||||
if ((mLaunchFlags & FLAG_ACTIVITY_RESET_TASK_IF_NEEDED) != 0) {
|
||||
return mTargetStack.resetTaskIfNeededLocked(intentActivity, mStartActivity);
|
||||
|
||||
@@ -16,24 +16,17 @@
|
||||
|
||||
package com.android.server.wm;
|
||||
|
||||
import static android.app.ActivityManager.RESIZE_MODE_SYSTEM_SCREEN_ROTATION;
|
||||
import static android.app.ActivityManager.StackId.DOCKED_STACK_ID;
|
||||
import static android.app.ActivityManager.StackId.FREEFORM_WORKSPACE_STACK_ID;
|
||||
import static android.app.ActivityManager.StackId.HOME_STACK_ID;
|
||||
import static android.content.pm.ActivityInfo.RESIZE_MODE_FORCE_RESIZEABLE;
|
||||
import static android.content.pm.ActivityInfo.RESIZE_MODE_UNRESIZEABLE;
|
||||
import static android.content.res.Configuration.ORIENTATION_LANDSCAPE;
|
||||
import static android.app.ActivityManager.RESIZE_MODE_SYSTEM_SCREEN_ROTATION;
|
||||
import static android.content.pm.ActivityInfo.RESIZE_MODE_CROP_WINDOWS;
|
||||
import static com.android.server.wm.WindowManagerDebugConfig.TAG_WITH_CLASS_NAME;
|
||||
import static com.android.server.wm.WindowManagerDebugConfig.TAG_WM;
|
||||
import static android.content.res.Configuration.ORIENTATION_LANDSCAPE;
|
||||
import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_RESIZE;
|
||||
import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_STACK;
|
||||
import static com.android.server.wm.WindowManagerDebugConfig.TAG_WITH_CLASS_NAME;
|
||||
import static com.android.server.wm.WindowManagerDebugConfig.TAG_WM;
|
||||
import static com.android.server.wm.WindowManagerService.H.RESIZE_TASK;
|
||||
import static com.android.server.wm.WindowManagerService.H.SHOW_NON_RESIZEABLE_DOCK_TOAST;
|
||||
import static android.view.WindowManager.DOCKED_INVALID;
|
||||
import static android.view.WindowManager.DOCKED_LEFT;
|
||||
import static android.view.WindowManager.DOCKED_RIGHT;
|
||||
import static android.view.WindowManager.DOCKED_TOP;
|
||||
|
||||
import android.app.ActivityManager.StackId;
|
||||
import android.content.pm.ActivityInfo;
|
||||
@@ -44,7 +37,6 @@ import android.util.Slog;
|
||||
import android.view.DisplayInfo;
|
||||
import android.view.Surface;
|
||||
|
||||
import com.android.internal.R;
|
||||
import com.android.server.EventLogTags;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
@@ -94,11 +86,6 @@ class Task implements DimLayer.DimLayerUser {
|
||||
// Resize mode of the task. See {@link ActivityInfo#resizeMode}
|
||||
private int mResizeMode;
|
||||
|
||||
// Whether we need to show toast about the app being non-resizeable when it becomes visible.
|
||||
// This flag is set when a non-resizeable task is docked (or side-by-side). It's cleared
|
||||
// after we show the toast.
|
||||
private boolean mShowNonResizeableDockToast;
|
||||
|
||||
// Whether the task is currently being drag-resized
|
||||
private boolean mDragResizing;
|
||||
private int mDragResizeMode;
|
||||
@@ -118,30 +105,6 @@ class Task implements DimLayer.DimLayerUser {
|
||||
return mStack.getDisplayContent();
|
||||
}
|
||||
|
||||
void setShowNonResizeableDockToast() {
|
||||
mShowNonResizeableDockToast = true;
|
||||
}
|
||||
|
||||
void scheduleShowNonResizeableDockToastIfNeeded() {
|
||||
if (!mShowNonResizeableDockToast) {
|
||||
return;
|
||||
}
|
||||
final DisplayContent displayContent = mStack.getDisplayContent();
|
||||
// If docked stack is not yet visible, we don't want to show the toast yet,
|
||||
// since we need the visible rect of the docked task to position the toast.
|
||||
if (displayContent == null || displayContent.getDockedStackLocked() == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
mShowNonResizeableDockToast = false;
|
||||
|
||||
if (mResizeMode == RESIZE_MODE_UNRESIZEABLE) {
|
||||
final String text =
|
||||
mService.mContext.getString(R.string.dock_non_resizeble_failed_to_dock_text);
|
||||
mService.mH.obtainMessage(SHOW_NON_RESIZEABLE_DOCK_TOAST, 0, 0, text).sendToTarget();
|
||||
}
|
||||
}
|
||||
|
||||
void addAppToken(int addPos, AppWindowToken wtoken, int resizeMode, boolean homeTask) {
|
||||
final int lastPos = mAppTokens.size();
|
||||
if (addPos >= lastPos) {
|
||||
|
||||
@@ -4940,17 +4940,6 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
}
|
||||
}
|
||||
|
||||
public void scheduleShowNonResizeableDockToast(int taskId) {
|
||||
synchronized (mWindowMap) {
|
||||
Task task = mTaskIdToTask.get(taskId);
|
||||
if (task == null) {
|
||||
if (DEBUG_STACK) Slog.i(TAG_WM, "scheduleShowToast: could not find taskId=" + taskId);
|
||||
return;
|
||||
}
|
||||
task.setShowNonResizeableDockToast();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getStackBounds(int stackId, Rect bounds) {
|
||||
synchronized (mWindowMap) {
|
||||
@@ -7770,7 +7759,6 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
public static final int RESIZE_TASK = 43;
|
||||
|
||||
public static final int TWO_FINGER_SCROLL_START = 44;
|
||||
public static final int SHOW_NON_RESIZEABLE_DOCK_TOAST = 45;
|
||||
|
||||
public static final int WINDOW_REPLACEMENT_TIMEOUT = 46;
|
||||
|
||||
@@ -8338,16 +8326,6 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SHOW_NON_RESIZEABLE_DOCK_TOAST: {
|
||||
final Toast toast = Toast.makeText(
|
||||
mContext, (String) msg.obj, Toast.LENGTH_SHORT);
|
||||
final int gravity = toast.getGravity();
|
||||
final int xOffset = toast.getXOffset() + msg.arg1;
|
||||
final int yOffset = toast.getYOffset() + msg.arg2;
|
||||
toast.setGravity(gravity, xOffset, yOffset);
|
||||
toast.show();
|
||||
}
|
||||
break;
|
||||
case WINDOW_REPLACEMENT_TIMEOUT: {
|
||||
final AppWindowToken token = (AppWindowToken) msg.obj;
|
||||
synchronized (mWindowMap) {
|
||||
|
||||
@@ -1483,11 +1483,6 @@ class WindowStateAnimator {
|
||||
}
|
||||
}
|
||||
w.mToken.hasVisible = true;
|
||||
|
||||
final Task task = w.getTask();
|
||||
if (task != null) {
|
||||
task.scheduleShowNonResizeableDockToastIfNeeded();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user