frameworks/base
Revision | be685189915ea5083884c4a3902c7cf0ae98448b (tree) |
---|---|
Time | 2020-04-14 23:46:56 |
Author | Jon West <electrikjesus@gmai...> |
Commiter | Chih-Wei Huang |
Add minimize & pip buttons to freeform windows
Thanks to @farmerbb for assistance and @rogerdott for the graphics
Change-Id: I8ddad6eab27f52574ee1c10e8006612fb46a83c5
@@ -98210,6 +98210,10 @@ Lcom/android/internal/R$drawable;->decor_close_button_dark:I | ||
98210 | 98210 | Lcom/android/internal/R$drawable;->decor_close_button_light:I |
98211 | 98211 | Lcom/android/internal/R$drawable;->decor_maximize_button_dark:I |
98212 | 98212 | Lcom/android/internal/R$drawable;->decor_maximize_button_light:I |
98213 | +Lcom/android/internal/R$drawable;->decor_minimize_button_dark:I | |
98214 | +Lcom/android/internal/R$drawable;->decor_minimize_button_light:I | |
98215 | +Lcom/android/internal/R$drawable;->decor_pip_button_dark:I | |
98216 | +Lcom/android/internal/R$drawable;->decor_pip_button_light:I | |
98213 | 98217 | Lcom/android/internal/R$drawable;->default_lock_wallpaper:I |
98214 | 98218 | Lcom/android/internal/R$drawable;->default_wallpaper:I |
98215 | 98219 | Lcom/android/internal/R$drawable;->dialog_frame:I |
@@ -636,6 +636,8 @@ public abstract class Window { | ||
636 | 636 | |
637 | 637 | /** Returns whether the window belongs to the task root. */ |
638 | 638 | boolean isTaskRoot(); |
639 | + | |
640 | + boolean moveTaskToBack(boolean nonRoot); | |
639 | 641 | } |
640 | 642 | |
641 | 643 | /** |
@@ -2195,6 +2195,10 @@ public class DecorView extends FrameLayout implements RootViewSurfaceTaker, Wind | ||
2195 | 2195 | } |
2196 | 2196 | |
2197 | 2197 | private void setLightDecorCaptionShade(DecorCaptionView view) { |
2198 | + view.findViewById(R.id.pip_window).setBackgroundResource( | |
2199 | + R.drawable.decor_pip_button_light); | |
2200 | + view.findViewById(R.id.minimize_window).setBackgroundResource( | |
2201 | + R.drawable.decor_minimize_button_light); | |
2198 | 2202 | view.findViewById(R.id.maximize_window).setBackgroundResource( |
2199 | 2203 | R.drawable.decor_maximize_button_light); |
2200 | 2204 | view.findViewById(R.id.close_window).setBackgroundResource( |
@@ -2202,6 +2206,10 @@ public class DecorView extends FrameLayout implements RootViewSurfaceTaker, Wind | ||
2202 | 2206 | } |
2203 | 2207 | |
2204 | 2208 | private void setDarkDecorCaptionShade(DecorCaptionView view) { |
2209 | + view.findViewById(R.id.pip_window).setBackgroundResource( | |
2210 | + R.drawable.decor_pip_button_dark); | |
2211 | + view.findViewById(R.id.minimize_window).setBackgroundResource( | |
2212 | + R.drawable.decor_minimize_button_dark); | |
2205 | 2213 | view.findViewById(R.id.maximize_window).setBackgroundResource( |
2206 | 2214 | R.drawable.decor_maximize_button_dark); |
2207 | 2215 | view.findViewById(R.id.close_window).setBackgroundResource( |
@@ -86,6 +86,8 @@ public class DecorCaptionView extends ViewGroup implements View.OnTouchListener, | ||
86 | 86 | |
87 | 87 | private View mCaption; |
88 | 88 | private View mContent; |
89 | + private View mPip; | |
90 | + private View mMinimize; | |
89 | 91 | private View mMaximize; |
90 | 92 | private View mClose; |
91 | 93 |
@@ -102,6 +104,8 @@ public class DecorCaptionView extends ViewGroup implements View.OnTouchListener, | ||
102 | 104 | private GestureDetector mGestureDetector; |
103 | 105 | private final Rect mCloseRect = new Rect(); |
104 | 106 | private final Rect mMaximizeRect = new Rect(); |
107 | + private final Rect mMinimizeRect = new Rect(); | |
108 | + private final Rect mPipRect = new Rect(); | |
105 | 109 | private View mClickTarget; |
106 | 110 | private int mRootScrollY; |
107 | 111 |
@@ -144,6 +148,8 @@ public class DecorCaptionView extends ViewGroup implements View.OnTouchListener, | ||
144 | 148 | // By changing the outline provider to BOUNDS, the window can remove its |
145 | 149 | // background without removing the shadow. |
146 | 150 | mOwner.getDecorView().setOutlineProvider(ViewOutlineProvider.BOUNDS); |
151 | + mPip = findViewById(R.id.pip_window); | |
152 | + mMinimize = findViewById(R.id.minimize_window); | |
147 | 153 | mMaximize = findViewById(R.id.maximize_window); |
148 | 154 | mClose = findViewById(R.id.close_window); |
149 | 155 | } |
@@ -156,6 +162,12 @@ public class DecorCaptionView extends ViewGroup implements View.OnTouchListener, | ||
156 | 162 | final int x = (int) ev.getX(); |
157 | 163 | final int y = (int) ev.getY(); |
158 | 164 | // Only offset y for containment tests because the actual views are already translated. |
165 | + if (mPipRect.contains(x, y - mRootScrollY)) { | |
166 | + mClickTarget = mPip; | |
167 | + } | |
168 | + if (mMinimizeRect.contains(x, y - mRootScrollY)) { | |
169 | + mClickTarget = mMinimize; | |
170 | + } | |
159 | 171 | if (mMaximizeRect.contains(x, y - mRootScrollY)) { |
160 | 172 | mClickTarget = mMaximize; |
161 | 173 | } |
@@ -307,10 +319,14 @@ public class DecorCaptionView extends ViewGroup implements View.OnTouchListener, | ||
307 | 319 | if (mCaption.getVisibility() != View.GONE) { |
308 | 320 | mCaption.layout(0, 0, mCaption.getMeasuredWidth(), mCaption.getMeasuredHeight()); |
309 | 321 | captionHeight = mCaption.getBottom() - mCaption.getTop(); |
322 | + mPip.getHitRect(mPipRect); | |
323 | + mMinimize.getHitRect(mMinimizeRect); | |
310 | 324 | mMaximize.getHitRect(mMaximizeRect); |
311 | 325 | mClose.getHitRect(mCloseRect); |
312 | 326 | } else { |
313 | 327 | captionHeight = 0; |
328 | + mPipRect.setEmpty(); | |
329 | + mMinimizeRect.setEmpty(); | |
314 | 330 | mMaximizeRect.setEmpty(); |
315 | 331 | mCloseRect.setEmpty(); |
316 | 332 | } |
@@ -325,7 +341,7 @@ public class DecorCaptionView extends ViewGroup implements View.OnTouchListener, | ||
325 | 341 | } |
326 | 342 | |
327 | 343 | // This assumes that the caption bar is at the top. |
328 | - mOwner.notifyRestrictedCaptionAreaCallback(mMaximize.getLeft(), mMaximize.getTop(), | |
344 | + mOwner.notifyRestrictedCaptionAreaCallback(mPip.getLeft(), mMaximize.getTop(), | |
329 | 345 | mClose.getRight(), mClose.getBottom()); |
330 | 346 | } |
331 | 347 |
@@ -351,6 +367,20 @@ public class DecorCaptionView extends ViewGroup implements View.OnTouchListener, | ||
351 | 367 | } |
352 | 368 | } |
353 | 369 | |
370 | + private void minimizeWindow() { | |
371 | + Window.WindowControllerCallback callback = mOwner.getWindowControllerCallback(); | |
372 | + if (callback != null) { | |
373 | + callback.moveTaskToBack(true); | |
374 | + } | |
375 | + } | |
376 | + | |
377 | + private void pipWindow() { | |
378 | + Window.WindowControllerCallback callback = mOwner.getWindowControllerCallback(); | |
379 | + if (callback != null) { | |
380 | + callback.enterPictureInPictureModeIfPossible(); /* Send the task to PIP mode if the task supports it. */ | |
381 | + } | |
382 | + } | |
383 | + | |
354 | 384 | public boolean isCaptionShowing() { |
355 | 385 | return mShow; |
356 | 386 | } |
@@ -403,7 +433,11 @@ public class DecorCaptionView extends ViewGroup implements View.OnTouchListener, | ||
403 | 433 | |
404 | 434 | @Override |
405 | 435 | public boolean onSingleTapUp(MotionEvent e) { |
406 | - if (mClickTarget == mMaximize) { | |
436 | + if (mClickTarget == mMinimize) { | |
437 | + minimizeWindow(); | |
438 | + } else if (mClickTarget == mPip) { | |
439 | + pipWindow(); | |
440 | + } else if (mClickTarget == mMaximize) { | |
407 | 441 | toggleFreeformWindowingMode(); |
408 | 442 | } else if (mClickTarget == mClose) { |
409 | 443 | mOwner.dispatchOnWindowDismissed( |
@@ -0,0 +1,30 @@ | ||
1 | +<?xml version="1.0" encoding="utf-8"?> | |
2 | +<!-- Copyright (C) 2015 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 | +<vector | |
18 | + xmlns:android="http://schemas.android.com/apk/res/android" | |
19 | + android:name="vector" | |
20 | + android:width="32dp" | |
21 | + android:height="32dp" | |
22 | + android:viewportWidth="32" | |
23 | + android:viewportHeight="32" | |
24 | + android:tint="@color/decor_button_dark_color"> | |
25 | + <path | |
26 | + android:name="path" | |
27 | + android:pathData="M 9.484 21.193 C 9.591 21.14 9.732 21.171 9.809 21.263 C 9.852 21.321 9.866 21.394 9.897 21.458 C 9.964 21.52 10.065 21.552 10.1 21.644 C 10.174 21.795 10.073 21.997 9.907 22.026 C 9.788 22.043 9.667 22.042 9.549 22.028 C 9.407 22.009 9.311 21.867 9.32 21.729 C 9.322 21.546 9.276 21.286 9.484 21.193 Z M 14.253 21.491 C 14.47 21.465 14.692 21.478 14.911 21.482 C 15.122 21.487 15.244 21.764 15.107 21.925 C 14.995 22.077 14.786 22.028 14.624 22.036 C 14.457 22.024 14.25 22.083 14.122 21.942 C 13.982 21.803 14.06 21.534 14.253 21.491 Z M 10.893 21.491 C 11.11 21.465 11.332 21.478 11.551 21.482 C 11.761 21.488 11.883 21.764 11.747 21.924 C 11.627 22.086 11.404 22.024 11.232 22.036 C 11.075 22.027 10.88 22.076 10.762 21.943 C 10.622 21.804 10.699 21.532 10.893 21.491 Z M 15.948 21.487 C 16.165 21.469 16.385 21.475 16.603 21.484 C 16.803 21.497 16.916 21.758 16.794 21.916 C 16.681 22.082 16.458 22.027 16.288 22.036 C 16.124 22.026 15.916 22.08 15.795 21.935 C 15.661 21.788 15.75 21.519 15.948 21.487 Z M 12.588 21.487 C 12.805 21.469 13.025 21.475 13.243 21.484 C 13.443 21.497 13.556 21.758 13.434 21.916 C 13.321 22.082 13.098 22.027 12.928 22.036 C 12.763 22.026 12.556 22.08 12.434 21.935 C 12.3 21.787 12.389 21.519 12.588 21.487 Z M 17.708 21.067 C 17.865 20.99 18.075 21.104 18.092 21.28 C 18.103 21.449 18.097 21.621 18.084 21.791 C 18.075 21.914 17.969 22.015 17.849 22.03 C 17.724 22.045 17.572 22.047 17.483 21.942 C 17.386 21.844 17.39 21.68 17.48 21.579 C 17.556 21.498 17.531 21.384 17.547 21.285 C 17.554 21.189 17.62 21.103 17.708 21.067 Z M 9.517 19.502 C 9.681 19.441 9.878 19.568 9.882 19.745 C 9.889 19.947 9.89 20.149 9.88 20.351 C 9.87 20.5 9.723 20.621 9.575 20.6 C 9.435 20.589 9.323 20.457 9.327 20.318 C 9.325 20.129 9.323 19.94 9.331 19.751 C 9.335 19.64 9.412 19.537 9.517 19.502 Z M 17.774 19.374 C 17.922 19.326 18.097 19.431 18.122 19.585 C 18.139 19.723 18.124 19.861 18.125 19.999 C 18.119 20.141 18.142 20.317 18.015 20.416 C 17.866 20.548 17.597 20.454 17.57 20.254 C 17.553 20.052 17.57 19.849 17.573 19.646 C 17.572 19.524 17.654 19.406 17.774 19.374 Z M 11.437 10.112 C 11.442 10.075 11.423 9.991 11.488 10.002 C 15.061 10 18.635 10.001 22.208 10.001 C 22.472 10.003 22.737 9.996 23.001 10.005 C 22.999 13.11 23.001 16.215 23 19.32 C 19.146 19.321 15.292 19.322 11.437 19.32 C 11.439 16.251 11.439 13.181 11.437 10.112 Z M 9.487 17.839 C 9.647 17.747 9.875 17.864 9.887 18.049 C 9.899 18.261 9.897 18.475 9.883 18.687 C 9.866 18.895 9.582 18.998 9.433 18.855 C 9.29 18.735 9.342 18.531 9.333 18.368 C 9.34 18.188 9.289 17.936 9.487 17.839 Z M 13.09 11.554 C 13.089 13.624 13.089 15.695 13.09 17.766 C 15.842 17.768 18.595 17.769 21.347 17.766 C 21.349 15.695 21.349 13.625 21.347 11.554 C 18.595 11.552 15.842 11.553 13.09 11.554 Z M 9.547 16.137 C 9.686 16.098 9.851 16.182 9.885 16.325 C 9.915 16.471 9.895 16.62 9.9 16.768 C 9.895 16.897 9.919 17.049 9.823 17.152 C 9.719 17.272 9.513 17.27 9.411 17.148 C 9.332 17.064 9.34 16.94 9.339 16.833 C 9.344 16.683 9.337 16.533 9.347 16.384 C 9.35 16.269 9.436 16.165 9.547 16.137 Z M 9.515 14.471 C 9.653 14.404 9.835 14.48 9.886 14.624 C 9.927 14.769 9.9 14.923 9.907 15.072 C 9.903 15.217 9.931 15.396 9.803 15.499 C 9.656 15.628 9.392 15.544 9.357 15.349 C 9.334 15.151 9.349 14.95 9.349 14.75 C 9.345 14.635 9.405 14.516 9.515 14.471 Z M 10.51 14.263 C 10.665 14.246 10.821 14.26 10.977 14.255 C 11.088 14.257 11.215 14.247 11.301 14.33 C 11.447 14.45 11.411 14.714 11.235 14.787 C 11.091 14.837 10.934 14.807 10.784 14.815 C 10.629 14.812 10.43 14.844 10.331 14.694 C 10.211 14.539 10.314 14.285 10.51 14.263 Z" | |
28 | + android:fillColor="@color/white" | |
29 | + android:strokeWidth="1"/> | |
30 | +</vector> |
@@ -0,0 +1,30 @@ | ||
1 | +<!-- | |
2 | +Copyright (C) 2015 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 | +<vector | |
18 | + xmlns:android="http://schemas.android.com/apk/res/android" | |
19 | + android:name="vector" | |
20 | + android:width="32dp" | |
21 | + android:height="32dp" | |
22 | + android:viewportWidth="32" | |
23 | + android:viewportHeight="32" | |
24 | + android:tint="@color/decor_button_light_color"> | |
25 | + <path | |
26 | + android:name="path" | |
27 | + android:pathData="M 9.484 21.193 C 9.591 21.14 9.732 21.171 9.809 21.263 C 9.852 21.321 9.866 21.394 9.897 21.458 C 9.964 21.52 10.065 21.552 10.1 21.644 C 10.174 21.795 10.073 21.997 9.907 22.026 C 9.788 22.043 9.667 22.042 9.549 22.028 C 9.407 22.009 9.311 21.867 9.32 21.729 C 9.322 21.546 9.276 21.286 9.484 21.193 Z M 14.253 21.491 C 14.47 21.465 14.692 21.478 14.911 21.482 C 15.122 21.487 15.244 21.764 15.107 21.925 C 14.995 22.077 14.786 22.028 14.624 22.036 C 14.457 22.024 14.25 22.083 14.122 21.942 C 13.982 21.803 14.06 21.534 14.253 21.491 Z M 10.893 21.491 C 11.11 21.465 11.332 21.478 11.551 21.482 C 11.761 21.488 11.883 21.764 11.747 21.924 C 11.627 22.086 11.404 22.024 11.232 22.036 C 11.075 22.027 10.88 22.076 10.762 21.943 C 10.622 21.804 10.699 21.532 10.893 21.491 Z M 15.948 21.487 C 16.165 21.469 16.385 21.475 16.603 21.484 C 16.803 21.497 16.916 21.758 16.794 21.916 C 16.681 22.082 16.458 22.027 16.288 22.036 C 16.124 22.026 15.916 22.08 15.795 21.935 C 15.661 21.788 15.75 21.519 15.948 21.487 Z M 12.588 21.487 C 12.805 21.469 13.025 21.475 13.243 21.484 C 13.443 21.497 13.556 21.758 13.434 21.916 C 13.321 22.082 13.098 22.027 12.928 22.036 C 12.763 22.026 12.556 22.08 12.434 21.935 C 12.3 21.787 12.389 21.519 12.588 21.487 Z M 17.708 21.067 C 17.865 20.99 18.075 21.104 18.092 21.28 C 18.103 21.449 18.097 21.621 18.084 21.791 C 18.075 21.914 17.969 22.015 17.849 22.03 C 17.724 22.045 17.572 22.047 17.483 21.942 C 17.386 21.844 17.39 21.68 17.48 21.579 C 17.556 21.498 17.531 21.384 17.547 21.285 C 17.554 21.189 17.62 21.103 17.708 21.067 Z M 9.517 19.502 C 9.681 19.441 9.878 19.568 9.882 19.745 C 9.889 19.947 9.89 20.149 9.88 20.351 C 9.87 20.5 9.723 20.621 9.575 20.6 C 9.435 20.589 9.323 20.457 9.327 20.318 C 9.325 20.129 9.323 19.94 9.331 19.751 C 9.335 19.64 9.412 19.537 9.517 19.502 Z M 17.774 19.374 C 17.922 19.326 18.097 19.431 18.122 19.585 C 18.139 19.723 18.124 19.861 18.125 19.999 C 18.119 20.141 18.142 20.317 18.015 20.416 C 17.866 20.548 17.597 20.454 17.57 20.254 C 17.553 20.052 17.57 19.849 17.573 19.646 C 17.572 19.524 17.654 19.406 17.774 19.374 Z M 11.437 10.112 C 11.442 10.075 11.423 9.991 11.488 10.002 C 15.061 10 18.635 10.001 22.208 10.001 C 22.472 10.003 22.737 9.996 23.001 10.005 C 22.999 13.11 23.001 16.215 23 19.32 C 19.146 19.321 15.292 19.322 11.437 19.32 C 11.439 16.251 11.439 13.181 11.437 10.112 Z M 9.487 17.839 C 9.647 17.747 9.875 17.864 9.887 18.049 C 9.899 18.261 9.897 18.475 9.883 18.687 C 9.866 18.895 9.582 18.998 9.433 18.855 C 9.29 18.735 9.342 18.531 9.333 18.368 C 9.34 18.188 9.289 17.936 9.487 17.839 Z M 13.09 11.554 C 13.089 13.624 13.089 15.695 13.09 17.766 C 15.842 17.768 18.595 17.769 21.347 17.766 C 21.349 15.695 21.349 13.625 21.347 11.554 C 18.595 11.552 15.842 11.553 13.09 11.554 Z M 9.547 16.137 C 9.686 16.098 9.851 16.182 9.885 16.325 C 9.915 16.471 9.895 16.62 9.9 16.768 C 9.895 16.897 9.919 17.049 9.823 17.152 C 9.719 17.272 9.513 17.27 9.411 17.148 C 9.332 17.064 9.34 16.94 9.339 16.833 C 9.344 16.683 9.337 16.533 9.347 16.384 C 9.35 16.269 9.436 16.165 9.547 16.137 Z M 9.515 14.471 C 9.653 14.404 9.835 14.48 9.886 14.624 C 9.927 14.769 9.9 14.923 9.907 15.072 C 9.903 15.217 9.931 15.396 9.803 15.499 C 9.656 15.628 9.392 15.544 9.357 15.349 C 9.334 15.151 9.349 14.95 9.349 14.75 C 9.345 14.635 9.405 14.516 9.515 14.471 Z M 10.51 14.263 C 10.665 14.246 10.821 14.26 10.977 14.255 C 11.088 14.257 11.215 14.247 11.301 14.33 C 11.447 14.45 11.411 14.714 11.235 14.787 C 11.091 14.837 10.934 14.807 10.784 14.815 C 10.629 14.812 10.43 14.844 10.331 14.694 C 10.211 14.539 10.314 14.285 10.51 14.263 Z" | |
28 | + android:fillColor="@color/white" | |
29 | + android:strokeWidth="1"/> | |
30 | +</vector> |
@@ -0,0 +1,29 @@ | ||
1 | +<!-- | |
2 | +Copyright (C) 2015 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 | +<vector | |
17 | + xmlns:android="http://schemas.android.com/apk/res/android" | |
18 | + android:name="vector" | |
19 | + android:width="32dp" | |
20 | + android:height="32dp" | |
21 | + android:viewportWidth="32" | |
22 | + android:viewportHeight="32" | |
23 | + android:tint="@color/decor_button_dark_color"> | |
24 | + <path | |
25 | + android:name="path" | |
26 | + android:pathData="M 17.644 20.959 C 17.758 20.921 17.879 20.923 17.998 20.921 C 18.601 20.924 19.206 20.916 19.809 20.926 C 20.059 20.918 20.291 21.118 20.313 21.368 C 20.351 21.638 20.126 21.906 19.854 21.916 C 19.16 21.933 18.465 21.937 17.771 21.914 C 17.488 21.897 17.271 21.601 17.334 21.325 C 17.366 21.16 17.488 21.019 17.644 20.959 Z M 9.645 20.959 C 9.759 20.921 9.881 20.923 9.999 20.921 C 10.604 20.924 11.208 20.915 11.813 20.926 C 12.087 20.917 12.333 21.165 12.316 21.439 C 12.314 21.703 12.073 21.926 11.811 21.919 C 11.13 21.93 10.448 21.938 9.768 21.914 C 9.506 21.894 9.298 21.638 9.327 21.379 C 9.341 21.193 9.471 21.024 9.645 20.959 Z M 13.641 20.96 C 13.757 20.92 13.881 20.924 14.002 20.921 C 14.607 20.924 15.212 20.915 15.816 20.926 C 16.063 20.921 16.29 21.121 16.313 21.367 C 16.351 21.638 16.127 21.906 15.854 21.916 C 15.174 21.935 14.494 21.932 13.813 21.918 C 13.578 21.917 13.36 21.731 13.331 21.496 C 13.293 21.273 13.431 21.039 13.641 20.96 Z M 22.231 20.124 C 22.334 19.811 22.77 19.697 23.014 19.918 C 23.29 20.154 23.169 20.558 23.196 20.874 C 23.172 21.176 23.284 21.548 23.037 21.783 C 22.826 21.985 22.512 21.908 22.249 21.924 C 22.001 21.91 21.714 21.976 21.505 21.805 C 21.273 21.626 21.266 21.238 21.493 21.052 C 21.682 20.878 21.958 20.931 22.191 20.921 C 22.208 20.656 22.163 20.384 22.231 20.124 Z M 13.325 20.481 C 13.326 18.987 13.323 17.494 13.326 16 C 16.118 16.001 18.91 16.001 21.701 16 C 21.704 17.494 21.701 18.987 21.703 20.481 L 13.325 20.481 Z M 9.262 17.323 C 9.521 17.193 9.87 17.347 9.943 17.628 C 10.004 17.914 9.952 18.209 9.975 18.499 C 10.005 18.811 9.958 19.123 9.971 19.436 C 9.966 19.648 10.003 19.886 9.869 20.068 C 9.711 20.291 9.363 20.336 9.156 20.156 C 9.011 20.046 8.967 19.858 8.97 19.684 C 8.977 19.206 8.946 18.728 8.971 18.249 C 8.972 17.929 8.901 17.482 9.262 17.323 Z M 22.569 15.818 C 22.875 15.726 23.208 15.992 23.191 16.309 C 23.2 16.956 23.196 17.604 23.194 18.251 C 23.204 18.461 23.086 18.675 22.887 18.754 C 22.582 18.897 22.196 18.645 22.2 18.309 C 22.186 17.644 22.189 16.979 22.198 16.314 C 22.193 16.089 22.348 15.871 22.569 15.818 Z M 9.263 13.323 C 9.522 13.194 9.87 13.347 9.943 13.628 C 10.004 13.915 9.952 14.211 9.975 14.501 C 10.005 14.835 9.955 15.169 9.972 15.504 C 9.977 15.731 9.985 16.007 9.782 16.158 C 9.533 16.378 9.094 16.249 9.001 15.931 C 8.941 15.667 8.984 15.394 8.97 15.126 C 8.941 14.709 8.984 14.293 8.97 13.877 C 8.955 13.656 9.048 13.413 9.263 13.323 Z M 22.569 11.818 C 22.875 11.726 23.208 11.993 23.192 12.31 C 23.2 12.958 23.196 13.605 23.194 14.253 C 23.204 14.464 23.084 14.677 22.884 14.756 C 22.579 14.896 22.195 14.644 22.2 14.309 C 22.186 13.663 22.192 13.015 22.196 12.368 C 22.178 12.127 22.325 11.874 22.569 11.818 Z M 9.339 10.022 C 9.576 9.976 9.819 10.04 10.059 10.023 C 10.315 10.03 10.626 9.968 10.824 10.175 C 11.028 10.37 11.006 10.733 10.785 10.906 C 10.566 11.084 10.267 10.996 10.009 11.028 C 9.877 11.364 10.111 11.837 9.813 12.131 C 9.557 12.4 9.044 12.245 8.988 11.876 C 8.948 11.481 8.989 11.082 8.949 10.686 C 8.919 10.409 9.055 10.102 9.339 10.022 Z M 16.459 10.026 C 16.953 10.028 17.448 9.993 17.941 10.023 C 18.168 10.031 18.401 9.996 18.624 10.052 C 18.902 10.131 19.052 10.48 18.917 10.737 C 18.834 10.92 18.635 11.025 18.438 11.02 C 17.771 11.026 17.104 11.034 16.438 11.015 C 16.177 11.008 15.956 10.759 15.976 10.499 C 15.979 10.245 16.206 10.03 16.459 10.026 Z M 20.457 10.027 C 20.97 10.025 21.484 9.995 21.997 10.023 C 22.249 10.036 22.531 9.969 22.756 10.117 C 22.978 10.264 23.034 10.599 22.873 10.811 C 22.776 10.954 22.602 11.022 22.434 11.02 C 21.77 11.026 21.106 11.034 20.443 11.015 C 20.179 11.01 19.958 10.762 19.976 10.501 C 19.979 10.247 20.205 10.031 20.457 10.027 Z M 12.461 10.026 C 12.973 10.026 13.486 9.994 13.998 10.023 C 14.249 10.036 14.529 9.97 14.754 10.115 C 14.978 10.262 15.036 10.6 14.871 10.813 C 14.775 10.954 14.604 11.021 14.437 11.02 C 13.772 11.026 13.106 11.034 12.441 11.015 C 12.178 11.009 11.956 10.76 11.976 10.499 C 11.98 10.244 12.208 10.029 12.461 10.026 Z" | |
27 | + android:fillColor="@color/white" | |
28 | + android:strokeWidth="1"/> | |
29 | +</vector> |
@@ -0,0 +1,29 @@ | ||
1 | +<!-- | |
2 | +Copyright (C) 2015 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 | +<vector | |
17 | + xmlns:android="http://schemas.android.com/apk/res/android" | |
18 | + android:name="vector" | |
19 | + android:width="32dp" | |
20 | + android:height="32dp" | |
21 | + android:viewportWidth="32" | |
22 | + android:viewportHeight="32" | |
23 | + android:tint="@color/decor_button_light_color"> | |
24 | + <path | |
25 | + android:name="path" | |
26 | + android:pathData="M 17.644 20.959 C 17.758 20.921 17.879 20.923 17.998 20.921 C 18.601 20.924 19.206 20.916 19.809 20.926 C 20.059 20.918 20.291 21.118 20.313 21.368 C 20.351 21.638 20.126 21.906 19.854 21.916 C 19.16 21.933 18.465 21.937 17.771 21.914 C 17.488 21.897 17.271 21.601 17.334 21.325 C 17.366 21.16 17.488 21.019 17.644 20.959 Z M 9.645 20.959 C 9.759 20.921 9.881 20.923 9.999 20.921 C 10.604 20.924 11.208 20.915 11.813 20.926 C 12.087 20.917 12.333 21.165 12.316 21.439 C 12.314 21.703 12.073 21.926 11.811 21.919 C 11.13 21.93 10.448 21.938 9.768 21.914 C 9.506 21.894 9.298 21.638 9.327 21.379 C 9.341 21.193 9.471 21.024 9.645 20.959 Z M 13.641 20.96 C 13.757 20.92 13.881 20.924 14.002 20.921 C 14.607 20.924 15.212 20.915 15.816 20.926 C 16.063 20.921 16.29 21.121 16.313 21.367 C 16.351 21.638 16.127 21.906 15.854 21.916 C 15.174 21.935 14.494 21.932 13.813 21.918 C 13.578 21.917 13.36 21.731 13.331 21.496 C 13.293 21.273 13.431 21.039 13.641 20.96 Z M 22.231 20.124 C 22.334 19.811 22.77 19.697 23.014 19.918 C 23.29 20.154 23.169 20.558 23.196 20.874 C 23.172 21.176 23.284 21.548 23.037 21.783 C 22.826 21.985 22.512 21.908 22.249 21.924 C 22.001 21.91 21.714 21.976 21.505 21.805 C 21.273 21.626 21.266 21.238 21.493 21.052 C 21.682 20.878 21.958 20.931 22.191 20.921 C 22.208 20.656 22.163 20.384 22.231 20.124 Z M 13.325 20.481 C 13.326 18.987 13.323 17.494 13.326 16 C 16.118 16.001 18.91 16.001 21.701 16 C 21.704 17.494 21.701 18.987 21.703 20.481 L 13.325 20.481 Z M 9.262 17.323 C 9.521 17.193 9.87 17.347 9.943 17.628 C 10.004 17.914 9.952 18.209 9.975 18.499 C 10.005 18.811 9.958 19.123 9.971 19.436 C 9.966 19.648 10.003 19.886 9.869 20.068 C 9.711 20.291 9.363 20.336 9.156 20.156 C 9.011 20.046 8.967 19.858 8.97 19.684 C 8.977 19.206 8.946 18.728 8.971 18.249 C 8.972 17.929 8.901 17.482 9.262 17.323 Z M 22.569 15.818 C 22.875 15.726 23.208 15.992 23.191 16.309 C 23.2 16.956 23.196 17.604 23.194 18.251 C 23.204 18.461 23.086 18.675 22.887 18.754 C 22.582 18.897 22.196 18.645 22.2 18.309 C 22.186 17.644 22.189 16.979 22.198 16.314 C 22.193 16.089 22.348 15.871 22.569 15.818 Z M 9.263 13.323 C 9.522 13.194 9.87 13.347 9.943 13.628 C 10.004 13.915 9.952 14.211 9.975 14.501 C 10.005 14.835 9.955 15.169 9.972 15.504 C 9.977 15.731 9.985 16.007 9.782 16.158 C 9.533 16.378 9.094 16.249 9.001 15.931 C 8.941 15.667 8.984 15.394 8.97 15.126 C 8.941 14.709 8.984 14.293 8.97 13.877 C 8.955 13.656 9.048 13.413 9.263 13.323 Z M 22.569 11.818 C 22.875 11.726 23.208 11.993 23.192 12.31 C 23.2 12.958 23.196 13.605 23.194 14.253 C 23.204 14.464 23.084 14.677 22.884 14.756 C 22.579 14.896 22.195 14.644 22.2 14.309 C 22.186 13.663 22.192 13.015 22.196 12.368 C 22.178 12.127 22.325 11.874 22.569 11.818 Z M 9.339 10.022 C 9.576 9.976 9.819 10.04 10.059 10.023 C 10.315 10.03 10.626 9.968 10.824 10.175 C 11.028 10.37 11.006 10.733 10.785 10.906 C 10.566 11.084 10.267 10.996 10.009 11.028 C 9.877 11.364 10.111 11.837 9.813 12.131 C 9.557 12.4 9.044 12.245 8.988 11.876 C 8.948 11.481 8.989 11.082 8.949 10.686 C 8.919 10.409 9.055 10.102 9.339 10.022 Z M 16.459 10.026 C 16.953 10.028 17.448 9.993 17.941 10.023 C 18.168 10.031 18.401 9.996 18.624 10.052 C 18.902 10.131 19.052 10.48 18.917 10.737 C 18.834 10.92 18.635 11.025 18.438 11.02 C 17.771 11.026 17.104 11.034 16.438 11.015 C 16.177 11.008 15.956 10.759 15.976 10.499 C 15.979 10.245 16.206 10.03 16.459 10.026 Z M 20.457 10.027 C 20.97 10.025 21.484 9.995 21.997 10.023 C 22.249 10.036 22.531 9.969 22.756 10.117 C 22.978 10.264 23.034 10.599 22.873 10.811 C 22.776 10.954 22.602 11.022 22.434 11.02 C 21.77 11.026 21.106 11.034 20.443 11.015 C 20.179 11.01 19.958 10.762 19.976 10.501 C 19.979 10.247 20.205 10.031 20.457 10.027 Z M 12.461 10.026 C 12.973 10.026 13.486 9.994 13.998 10.023 C 14.249 10.036 14.529 9.97 14.754 10.115 C 14.978 10.262 15.036 10.6 14.871 10.813 C 14.775 10.954 14.604 11.021 14.437 11.02 C 13.772 11.026 13.106 11.034 12.441 11.015 C 12.178 11.009 11.956 10.76 11.976 10.499 C 11.98 10.244 12.208 10.029 12.461 10.026 Z" | |
27 | + android:fillColor="@color/white" | |
28 | + android:strokeWidth="1"/> | |
29 | +</vector> |
@@ -139,6 +139,10 @@ | ||
139 | 139 | <array name="preloaded_freeform_multi_window_drawables"> |
140 | 140 | <item>@drawable/decor_maximize_button_dark</item> |
141 | 141 | <item>@drawable/decor_maximize_button_light</item> |
142 | + <item>@drawable/decor_minimize_button_dark</item> | |
143 | + <item>@drawable/decor_minimize_button_light</item> | |
144 | + <item>@drawable/decor_pip_button_dark</item> | |
145 | + <item>@drawable/decor_pip_button_light</item> | |
142 | 146 | </array> |
143 | 147 | |
144 | 148 | <!-- Used in LocalePicker --> |
@@ -4989,6 +4989,10 @@ | ||
4989 | 4989 | <string name="floating_toolbar_close_overflow_description">Close overflow</string> |
4990 | 4990 | |
4991 | 4991 | <!-- Free style window strings --> |
4992 | + <!-- Accessibility text for the minimize window button --> | |
4993 | + <string name="pip_button_text">Picture In Picture</string> | |
4994 | + <!-- Accessibility text for the minimize window button --> | |
4995 | + <string name="minimize_button_text">Minimize</string> | |
4992 | 4996 | <!-- Accessibility text for the maximize window button --> |
4993 | 4997 | <string name="maximize_button_text">Maximize</string> |
4994 | 4998 | <!-- Accessibility text for the close window button --> |
@@ -2346,14 +2346,20 @@ | ||
2346 | 2346 | |
2347 | 2347 | <!-- From Phone --> |
2348 | 2348 | <java-symbol type="bool" name="config_built_in_sip_phone" /> |
2349 | + <java-symbol type="id" name="pip_window" /> | |
2350 | + <java-symbol type="id" name="minimize_window" /> | |
2349 | 2351 | <java-symbol type="id" name="maximize_window" /> |
2350 | 2352 | <java-symbol type="id" name="close_window" /> |
2351 | 2353 | <java-symbol type="layout" name="decor_caption" /> |
2352 | 2354 | <java-symbol type="drawable" name="decor_caption_title_focused" /> |
2353 | 2355 | <java-symbol type="drawable" name="decor_close_button_dark" /> |
2354 | 2356 | <java-symbol type="drawable" name="decor_close_button_light" /> |
2357 | + <java-symbol type="drawable" name="decor_minimize_button_dark" /> | |
2358 | + <java-symbol type="drawable" name="decor_minimize_button_light" /> | |
2355 | 2359 | <java-symbol type="drawable" name="decor_maximize_button_dark" /> |
2356 | 2360 | <java-symbol type="drawable" name="decor_maximize_button_light" /> |
2361 | + <java-symbol type="drawable" name="decor_pip_button_dark" /> | |
2362 | + <java-symbol type="drawable" name="decor_pip_button_light" /> | |
2357 | 2363 | <java-symbol type="color" name="decor_button_dark_color" /> |
2358 | 2364 | <java-symbol type="color" name="decor_button_light_color" /> |
2359 | 2365 | <java-symbol type="array" name="unloggable_phone_numbers" /> |