Winson Chung | 5589333 | 2017-02-17 17:13:10 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2017 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package com.android.server.am; |
| 18 | |
| 19 | import android.app.RemoteAction; |
| 20 | import android.graphics.Rect; |
| 21 | |
| 22 | import com.android.server.am.ActivityStackSupervisor.ActivityContainer; |
| 23 | import com.android.server.wm.PinnedStackWindowController; |
| 24 | import com.android.server.wm.StackWindowController; |
| 25 | |
| 26 | import java.util.List; |
| 27 | |
| 28 | /** |
| 29 | * State and management of the pinned stack of activities. |
| 30 | */ |
| 31 | class PinnedActivityStack extends ActivityStack<PinnedStackWindowController> { |
| 32 | |
| 33 | PinnedActivityStack(ActivityContainer activityContainer, |
| 34 | RecentTasks recentTasks, boolean onTop) { |
| 35 | super(activityContainer, recentTasks, onTop); |
| 36 | } |
| 37 | |
| 38 | @Override |
| 39 | PinnedStackWindowController createStackWindowController(int displayId, boolean onTop, |
| 40 | Rect outBounds) { |
| 41 | return new PinnedStackWindowController(mStackId, this, displayId, onTop, outBounds); |
| 42 | } |
| 43 | |
| 44 | void animateResizePinnedStack(Rect bounds, int animationDuration) { |
| 45 | getWindowContainerController().animateResizePinnedStack(bounds, animationDuration); |
| 46 | } |
| 47 | |
| 48 | void setPictureInPictureAspectRatio(float aspectRatio) { |
| 49 | getWindowContainerController().setPictureInPictureAspectRatio(aspectRatio); |
| 50 | } |
| 51 | |
| 52 | void setPictureInPictureActions(List<RemoteAction> actions) { |
| 53 | getWindowContainerController().setPictureInPictureActions(actions); |
| 54 | } |
Winson Chung | 02e7193 | 2017-03-10 10:08:17 -0800 | [diff] [blame^] | 55 | |
| 56 | boolean isBoundsAnimatingToFullscreen() { |
| 57 | return getWindowContainerController().isBoundsAnimatingToFullscreen(); |
| 58 | } |
Winson Chung | 5589333 | 2017-02-17 17:13:10 -0800 | [diff] [blame] | 59 | } |