Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 15504af3 authored by Winson Chung's avatar Winson Chung
Browse files

Experiment with allowing tap to break through to interact with the PIP.

Test: Enable SysUI tuner, tap once on PIP to interact with the activity.
      This is only experimental behaviour, and
      android.server.cts.ActivityManagerPinnedStackTests will be updated
      accordingly if we keep this behavior.

Change-Id: I278ab8c360c44718cfcac0fd761f476a875f9b15
parent 2bbf96cf
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -415,6 +415,18 @@
            android:launchMode="singleTop"
            android:excludeFromRecents="true" />

        <activity
            android:name=".pip.phone.PipMenuActivity"
            android:theme="@style/PipPhoneOverlayControlTheme"
            android:configChanges="orientation|screenSize|smallestScreenSize|screenLayout"
            android:excludeFromRecents="true"
            android:exported="false"
            android:resizeableActivity="true"
            android:supportsPictureInPicture="true"
            android:stateNotNeeded="true"
            android:taskAffinity=""
            androidprv:alwaysFocusable="true" />

        <!-- platform logo easter egg activity -->
        <activity
            android:name=".DessertCase"
+36 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2014 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.
-->

<FrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#33000000">
    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center">
        <Button
            android:id="@+id/expand_pip"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:textSize="14sp"
            android:textColor="#ffffffff"
            android:text="@string/pip_phone_expand"
            android:fontFamily="sans-serif" />
    </LinearLayout>
</FrameLayout>
+11 −0
Original line number Diff line number Diff line
@@ -1675,6 +1675,9 @@
        not appear on production builds ever. -->
    <string name="tuner_doze_always_on" translatable="false">Always on</string>

    <!-- Making the PIP fullscreen -->
    <string name="pip_phone_expand">Expand</string>

    <!-- PIP section of the tuner. Non-translatable since it should
        not appear on production builds ever. -->
    <string name="picture_in_picture" translatable="false">Picture-in-Picture</string>
@@ -1695,4 +1698,12 @@
        not appear on production builds ever. -->
    <string name="pip_drag_to_dismiss_summary" translatable="false">Drag to the dismiss target at the bottom of the screen to close the PIP</string>

    <!-- PIP tap once to break through to the activity. Non-translatable since it should
        not appear on production builds ever. -->
    <string name="pip_tap_through_title" translatable="false">Tap to interact</string>

    <!-- PIP tap once to break through to the activity. Non-translatable since it should
        not appear on production builds ever. -->
    <string name="pip_tap_through_summary" translatable="false">Tap once to interact with the activity</string>

</resources>
+18 −0
Original line number Diff line number Diff line
@@ -56,6 +56,24 @@
        <item name="android:activityCloseExitAnimation">@anim/forced_resizable_exit</item>
    </style>

    <style name="PipPhoneOverlayControlTheme" parent="@android:style/Theme.Material">
        <item name="android:windowIsTranslucent">true</item>
        <item name="android:windowNoTitle">true</item>
        <item name="android:windowContentOverlay">@null</item>
        <item name="android:windowBackground">@drawable/forced_resizable_background</item>
        <item name="android:colorBackgroundCacheHint">@null</item>
        <item name="android:statusBarColor">@color/transparent</item>
        <item name="android:windowAnimationStyle">@style/Animation.PipPhoneOverlayControl</item>
    </style>

    <style name="Animation.PipPhoneOverlayControl" parent="@android:style/Animation">
        <item name="android:activityOpenEnterAnimation">@anim/forced_resizable_enter</item>

        <!-- If the target stack doesn't have focus, we do a task to front animation. -->
        <item name="android:taskToFrontEnterAnimation">@anim/forced_resizable_enter</item>
        <item name="android:activityCloseExitAnimation">@anim/forced_resizable_exit</item>
    </style>

    <style name="TextAppearance.StatusBar.HeadsUp"
        parent="@*android:style/TextAppearance.StatusBar">
    </style>
+6 −0
Original line number Diff line number Diff line
@@ -137,6 +137,12 @@
          android:summary="@string/pip_drag_to_dismiss_summary"
          sysui:defValue="true" />

        <com.android.systemui.tuner.TunerSwitch
            android:key="pip_tap_through"
            android:title="@string/pip_tap_through_title"
            android:summary="@string/pip_tap_through_summary"
            sysui:defValue="false" />

    </PreferenceScreen>

    <PreferenceScreen
Loading