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

Commit dbcb0a35 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge changes I204d0ba7,Ifc51143b,I4b15fac9

* changes:
  Show swipe up onboarding after 2 apps instead of 3
  Change swipe up onboarding color based on nav bar color
  Add swipe up onboarding from apps
parents 3a1d3451 64f1cd53
Loading
Loading
Loading
Loading
+24 −0
Original line number Diff line number Diff line
<!--
  ~ Copyright (C) 2018 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="24.0"
        android:viewportHeight="24.0">
    <path
        android:fillColor="@android:color/white"
        android:pathData="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"/>
</vector>
+46 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2018 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_height="48dp"
    android:layout_width="match_parent"
    android:background="@android:color/black"
    android:layout_gravity="center">
    <View
        android:layout_width="match_parent"
        android:layout_height="1dp"
        android:background="?android:attr/listDivider"
        android:gravity="top"/>
    <TextView
        android:id="@+id/onboarding_text"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:text="@string/recents_swipe_up_onboarding"
        android:textColor="@android:color/white"
        android:textSize="16sp"
        android:drawableBottom="@drawable/ic_chevron_up"/>
    <ImageView
        android:id="@+id/dismiss"
        android:layout_width="48dp"
        android:layout_height="48dp"
        android:padding="12dp"
        android:layout_marginEnd="6dp"
        android:src="@drawable/ic_close_white"
        android:background="?android:attr/selectableItemBackgroundBorderless"
        android:layout_gravity="center_vertical|end"/>
</FrameLayout>
 No newline at end of file
+2 −0
Original line number Diff line number Diff line
@@ -831,6 +831,8 @@
    <string name="recents_stack_action_button_label">Clear all</string>
    <!-- Recents: Hint text that shows on the drop targets to start multiwindow. [CHAR LIMIT=NONE] -->
    <string name="recents_drag_hint_message">Drag here to use split screen</string>
    <!-- Recents: Text that shows above the nav bar after launching a few apps. [CHAR LIMIT=NONE] -->
    <string name="recents_swipe_up_onboarding">Swipe up to switch apps</string>

    <!-- Recents: MultiStack add stack split horizontal radio button. [CHAR LIMIT=NONE] -->
    <string name="recents_multistack_add_stack_dialog_split_horizontal">Split Horizontal</string>
+6 −2
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@ import android.app.ActivityManager.RecentTaskInfo;
import android.app.ActivityOptions;
import android.app.AppGlobals;
import android.app.IAssistDataReceiver;
import android.app.WindowConfiguration.ActivityType;
import android.content.Context;
import android.content.pm.ActivityInfo;
import android.content.pm.ApplicationInfo;
@@ -96,11 +97,14 @@ public class ActivityManagerWrapper {
     * @return the top running task (can be {@code null}).
     */
    public ActivityManager.RunningTaskInfo getRunningTask() {
        return getRunningTask(ACTIVITY_TYPE_RECENTS /* ignoreActivityType */);
    }

    public ActivityManager.RunningTaskInfo getRunningTask(@ActivityType int ignoreActivityType) {
        // Note: The set of running tasks from the system is ordered by recency
        try {
            List<ActivityManager.RunningTaskInfo> tasks =
                    ActivityManager.getService().getFilteredTasks(1,
                            ACTIVITY_TYPE_RECENTS /* ignoreActivityType */,
                    ActivityManager.getService().getFilteredTasks(1, ignoreActivityType,
                            WINDOWING_MODE_PINNED /* ignoreWindowingMode */);
            if (tasks.isEmpty()) {
                return null;
+4 −0
Original line number Diff line number Diff line
@@ -195,6 +195,10 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis
        return mOverviewProxy;
    }

    public ComponentName getLauncherComponent() {
        return mLauncherComponentName;
    }

    private void disconnectFromLauncherService() {
        if (mOverviewProxy != null) {
            mOverviewProxy.asBinder().unlinkToDeath(mOverviewServiceDeathRcpt, 0);
Loading