Loading core/java/android/app/TaskInfo.java +22 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ import android.content.pm.ActivityInfo; import android.content.res.Configuration; import android.graphics.Point; import android.graphics.Rect; import android.net.Uri; import android.os.Build; import android.os.IBinder; import android.os.Parcel; Loading Loading @@ -302,6 +303,19 @@ public class TaskInfo { */ public boolean isTopActivityStyleFloating; /** * The URI of the intent that generated the top-most activity opened using a URL. * @hide */ @Nullable public Uri capturedLink; /** * The time of the last launch of the activity opened using the {@link #capturedLink}. * @hide */ public long capturedLinkTimestamp; /** * Encapsulate specific App Compat information. * @hide Loading Loading @@ -436,6 +450,8 @@ public class TaskInfo { && Objects.equals(topActivity, that.topActivity) && isTopActivityTransparent == that.isTopActivityTransparent && isTopActivityStyleFloating == that.isTopActivityStyleFloating && Objects.equals(capturedLink, that.capturedLink) && capturedLinkTimestamp == that.capturedLinkTimestamp && appCompatTaskInfo.equalsForTaskOrganizer(that.appCompatTaskInfo); } Loading Loading @@ -506,6 +522,8 @@ public class TaskInfo { displayAreaFeatureId = source.readInt(); isTopActivityTransparent = source.readBoolean(); isTopActivityStyleFloating = source.readBoolean(); capturedLink = source.readTypedObject(Uri.CREATOR); capturedLinkTimestamp = source.readLong(); appCompatTaskInfo = source.readTypedObject(AppCompatTaskInfo.CREATOR); } Loading Loading @@ -554,6 +572,8 @@ public class TaskInfo { dest.writeInt(displayAreaFeatureId); dest.writeBoolean(isTopActivityTransparent); dest.writeBoolean(isTopActivityStyleFloating); dest.writeTypedObject(capturedLink, flags); dest.writeLong(capturedLinkTimestamp); dest.writeTypedObject(appCompatTaskInfo, flags); } Loading Loading @@ -592,6 +612,8 @@ public class TaskInfo { + " displayAreaFeatureId=" + displayAreaFeatureId + " isTopActivityTransparent=" + isTopActivityTransparent + " isTopActivityStyleFloating=" + isTopActivityStyleFloating + " capturedLink=" + capturedLink + " capturedLinkTimestamp=" + capturedLinkTimestamp + " appCompatTaskInfo=" + appCompatTaskInfo + "}"; } Loading libs/WindowManager/Shell/res/drawable/desktop_mode_ic_handle_menu_open_in_browser.xml 0 → 100644 +19 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?><!-- ~ Copyright (C) 2024 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. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960" android:tint="?attr/colorControlNormal"> <path android:fillColor="@android:color/black" android:pathData="M160,880Q127,880 103.5,856.5Q80,833 80,800L80,440Q80,407 103.5,383.5Q127,360 160,360L240,360L240,160Q240,127 263.5,103.5Q287,80 320,80L800,80Q833,80 856.5,103.5Q880,127 880,160L880,520Q880,553 856.5,576.5Q833,600 800,600L720,600L720,800Q720,833 696.5,856.5Q673,880 640,880L160,880ZM160,800L640,800Q640,800 640,800Q640,800 640,800L640,520L160,520L160,800Q160,800 160,800Q160,800 160,800ZM720,520L800,520Q800,520 800,520Q800,520 800,520L800,240L320,240L320,360L640,360Q673,360 696.5,383.5Q720,407 720,440L720,520Z"/> </vector> libs/WindowManager/Shell/res/layout/desktop_mode_window_decor_handle_menu.xml +19 −0 Original line number Diff line number Diff line Loading @@ -135,5 +135,24 @@ android:drawableTint="?androidprv:attr/materialColorOnSurface" style="@style/DesktopModeHandleMenuActionButton"/> </LinearLayout> <LinearLayout android:id="@+id/open_in_browser_pill" android:layout_width="match_parent" android:layout_height="@dimen/desktop_mode_handle_menu_open_in_browser_pill_height" android:layout_marginTop="@dimen/desktop_mode_handle_menu_pill_spacing_margin" android:layout_marginStart="1dp" android:orientation="vertical" android:elevation="1dp" android:background="@drawable/desktop_mode_decor_handle_menu_background"> <Button android:id="@+id/open_in_browser_button" android:contentDescription="@string/open_in_browser_text" android:text="@string/open_in_browser_text" android:drawableStart="@drawable/desktop_mode_ic_handle_menu_open_in_browser" android:drawableTint="?androidprv:attr/materialColorOnSurface" style="@style/DesktopModeHandleMenuActionButton"/> </LinearLayout> </LinearLayout> libs/WindowManager/Shell/res/values/dimen.xml +4 −1 Original line number Diff line number Diff line Loading @@ -507,8 +507,11 @@ <!-- The height of the handle menu's "More Actions" pill in desktop mode. --> <dimen name="desktop_mode_handle_menu_more_actions_pill_height">52dp</dimen> <!-- The height of the handle menu's "Open in browser" pill in desktop mode. --> <dimen name="desktop_mode_handle_menu_open_in_browser_pill_height">52dp</dimen> <!-- The height of the handle menu in desktop mode. --> <dimen name="desktop_mode_handle_menu_height">328dp</dimen> <dimen name="desktop_mode_handle_menu_height">380dp</dimen> <!-- The top margin of the handle menu in desktop mode. --> <dimen name="desktop_mode_handle_menu_margin_top">4dp</dimen> Loading libs/WindowManager/Shell/res/values/strings.xml +2 −0 Original line number Diff line number Diff line Loading @@ -280,6 +280,8 @@ <string name="select_text">Select</string> <!-- Accessibility text for the handle menu screenshot button [CHAR LIMIT=NONE] --> <string name="screenshot_text">Screenshot</string> <!-- Accessibility text for the handle menu open in browser button [CHAR LIMIT=NONE] --> <string name="open_in_browser_text">Open in browser</string> <!-- Accessibility text for the handle menu close button [CHAR LIMIT=NONE] --> <string name="close_text">Close</string> <!-- Accessibility text for the handle menu close menu button [CHAR LIMIT=NONE] --> Loading Loading
core/java/android/app/TaskInfo.java +22 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ import android.content.pm.ActivityInfo; import android.content.res.Configuration; import android.graphics.Point; import android.graphics.Rect; import android.net.Uri; import android.os.Build; import android.os.IBinder; import android.os.Parcel; Loading Loading @@ -302,6 +303,19 @@ public class TaskInfo { */ public boolean isTopActivityStyleFloating; /** * The URI of the intent that generated the top-most activity opened using a URL. * @hide */ @Nullable public Uri capturedLink; /** * The time of the last launch of the activity opened using the {@link #capturedLink}. * @hide */ public long capturedLinkTimestamp; /** * Encapsulate specific App Compat information. * @hide Loading Loading @@ -436,6 +450,8 @@ public class TaskInfo { && Objects.equals(topActivity, that.topActivity) && isTopActivityTransparent == that.isTopActivityTransparent && isTopActivityStyleFloating == that.isTopActivityStyleFloating && Objects.equals(capturedLink, that.capturedLink) && capturedLinkTimestamp == that.capturedLinkTimestamp && appCompatTaskInfo.equalsForTaskOrganizer(that.appCompatTaskInfo); } Loading Loading @@ -506,6 +522,8 @@ public class TaskInfo { displayAreaFeatureId = source.readInt(); isTopActivityTransparent = source.readBoolean(); isTopActivityStyleFloating = source.readBoolean(); capturedLink = source.readTypedObject(Uri.CREATOR); capturedLinkTimestamp = source.readLong(); appCompatTaskInfo = source.readTypedObject(AppCompatTaskInfo.CREATOR); } Loading Loading @@ -554,6 +572,8 @@ public class TaskInfo { dest.writeInt(displayAreaFeatureId); dest.writeBoolean(isTopActivityTransparent); dest.writeBoolean(isTopActivityStyleFloating); dest.writeTypedObject(capturedLink, flags); dest.writeLong(capturedLinkTimestamp); dest.writeTypedObject(appCompatTaskInfo, flags); } Loading Loading @@ -592,6 +612,8 @@ public class TaskInfo { + " displayAreaFeatureId=" + displayAreaFeatureId + " isTopActivityTransparent=" + isTopActivityTransparent + " isTopActivityStyleFloating=" + isTopActivityStyleFloating + " capturedLink=" + capturedLink + " capturedLinkTimestamp=" + capturedLinkTimestamp + " appCompatTaskInfo=" + appCompatTaskInfo + "}"; } Loading
libs/WindowManager/Shell/res/drawable/desktop_mode_ic_handle_menu_open_in_browser.xml 0 → 100644 +19 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?><!-- ~ Copyright (C) 2024 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. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960" android:tint="?attr/colorControlNormal"> <path android:fillColor="@android:color/black" android:pathData="M160,880Q127,880 103.5,856.5Q80,833 80,800L80,440Q80,407 103.5,383.5Q127,360 160,360L240,360L240,160Q240,127 263.5,103.5Q287,80 320,80L800,80Q833,80 856.5,103.5Q880,127 880,160L880,520Q880,553 856.5,576.5Q833,600 800,600L720,600L720,800Q720,833 696.5,856.5Q673,880 640,880L160,880ZM160,800L640,800Q640,800 640,800Q640,800 640,800L640,520L160,520L160,800Q160,800 160,800Q160,800 160,800ZM720,520L800,520Q800,520 800,520Q800,520 800,520L800,240L320,240L320,360L640,360Q673,360 696.5,383.5Q720,407 720,440L720,520Z"/> </vector>
libs/WindowManager/Shell/res/layout/desktop_mode_window_decor_handle_menu.xml +19 −0 Original line number Diff line number Diff line Loading @@ -135,5 +135,24 @@ android:drawableTint="?androidprv:attr/materialColorOnSurface" style="@style/DesktopModeHandleMenuActionButton"/> </LinearLayout> <LinearLayout android:id="@+id/open_in_browser_pill" android:layout_width="match_parent" android:layout_height="@dimen/desktop_mode_handle_menu_open_in_browser_pill_height" android:layout_marginTop="@dimen/desktop_mode_handle_menu_pill_spacing_margin" android:layout_marginStart="1dp" android:orientation="vertical" android:elevation="1dp" android:background="@drawable/desktop_mode_decor_handle_menu_background"> <Button android:id="@+id/open_in_browser_button" android:contentDescription="@string/open_in_browser_text" android:text="@string/open_in_browser_text" android:drawableStart="@drawable/desktop_mode_ic_handle_menu_open_in_browser" android:drawableTint="?androidprv:attr/materialColorOnSurface" style="@style/DesktopModeHandleMenuActionButton"/> </LinearLayout> </LinearLayout>
libs/WindowManager/Shell/res/values/dimen.xml +4 −1 Original line number Diff line number Diff line Loading @@ -507,8 +507,11 @@ <!-- The height of the handle menu's "More Actions" pill in desktop mode. --> <dimen name="desktop_mode_handle_menu_more_actions_pill_height">52dp</dimen> <!-- The height of the handle menu's "Open in browser" pill in desktop mode. --> <dimen name="desktop_mode_handle_menu_open_in_browser_pill_height">52dp</dimen> <!-- The height of the handle menu in desktop mode. --> <dimen name="desktop_mode_handle_menu_height">328dp</dimen> <dimen name="desktop_mode_handle_menu_height">380dp</dimen> <!-- The top margin of the handle menu in desktop mode. --> <dimen name="desktop_mode_handle_menu_margin_top">4dp</dimen> Loading
libs/WindowManager/Shell/res/values/strings.xml +2 −0 Original line number Diff line number Diff line Loading @@ -280,6 +280,8 @@ <string name="select_text">Select</string> <!-- Accessibility text for the handle menu screenshot button [CHAR LIMIT=NONE] --> <string name="screenshot_text">Screenshot</string> <!-- Accessibility text for the handle menu open in browser button [CHAR LIMIT=NONE] --> <string name="open_in_browser_text">Open in browser</string> <!-- Accessibility text for the handle menu close button [CHAR LIMIT=NONE] --> <string name="close_text">Close</string> <!-- Accessibility text for the handle menu close menu button [CHAR LIMIT=NONE] --> Loading