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

Commit fcb61483 authored by Winson Chung's avatar Winson Chung Committed by Android (Google) Code Review
Browse files

Merge "Adding dismiss-all button."

parents 3df96646 6ac8bd61
Loading
Loading
Loading
Loading
+32 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2015 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.
-->
<!-- Extends Framelayout -->
<com.android.systemui.statusbar.DismissView
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="@dimen/recents_dismiss_all_button_size"
        android:visibility="gone"
        android:clipChildren="false"
        android:clipToPadding="false">
    <com.android.systemui.statusbar.DismissViewButton
            android:id="@+id/dismiss_text"
            android:layout_width="@dimen/recents_dismiss_all_button_size"
            android:layout_height="@dimen/recents_dismiss_all_button_size"
            android:layout_gravity="end"
            android:alpha="1.0"
            android:background="@drawable/recents_button_bg"
            android:contentDescription="@string/recents_dismiss_all_message"/>
</com.android.systemui.statusbar.DismissView>
+2 −3
Original line number Diff line number Diff line
@@ -257,9 +257,8 @@
    <!-- The top offset for the task stack. -->
    <dimen name="recents_stack_top_padding">16dp</dimen>

    <!-- Used to calculate the translation animation duration, the expected amount of movement 
         in dps over one second of time. -->
    <dimen name="recents_animation_movement_in_dps_per_second">800dp</dimen>
    <!-- The dimesnsions of the dismiss all recents button. -->
    <dimen name="recents_dismiss_all_button_size">48dp</dimen>

    <!-- The min alpha to apply to a task affiliation group color. -->
    <item name="recents_task_affiliation_color_min_alpha_percentage" format="float" type="dimen">0.6</item>
+4 −1
Original line number Diff line number Diff line
@@ -394,6 +394,8 @@
    <string name="accessibility_recents_item_will_be_dismissed">Dismiss <xliff:g id="app" example="Calendar">%s</xliff:g>.</string>
    <!-- Content description to tell the user an application has been removed from recents -->
    <string name="accessibility_recents_item_dismissed"><xliff:g id="app" example="Calendar">%s</xliff:g> dismissed.</string>
    <!-- Content description to tell the user all applications has been removed from recents -->
    <string name="accessibility_recents_all_items_dismissed">All recent applications dismissed.</string>
    <!-- Content description to tell the user an application has been launched from recents -->
    <string name="accessibility_recents_item_launched">Starting <xliff:g id="app" example="Calendar">%s</xliff:g>.</string>
    <!-- Content description to tell the user a notification has been removed from the notification shade -->
@@ -667,7 +669,8 @@
    <string name="recents_search_bar_label">search</string>
    <!-- Recents: Launch error string. [CHAR LIMIT=NONE] -->
    <string name="recents_launch_error_message">Could not start <xliff:g id="app" example="Calendar">%s</xliff:g>.</string>

    <!-- Recents: Dismiss all button. [CHAR LIMIT=NONE] -->
    <string name="recents_dismiss_all_message">Dismiss all applications</string>

    <!-- Expanded Status Bar Header: Battery Charged [CHAR LIMIT=40] -->
    <string name="expanded_header_battery_charged">Charged</string>
+2 −4
Original line number Diff line number Diff line
@@ -29,12 +29,10 @@ public class Constants {
            public static final boolean EnableTransitionThumbnailDebugMode = false;
            // Enables the filtering of tasks according to their grouping
            public static final boolean EnableTaskFiltering = false;
            // Enables clipping of tasks against each other
            public static final boolean EnableTaskStackClipping = true;
            // Enables tapping on the TaskBar to launch the task
            public static final boolean EnableTaskBarTouchEvents = true;
            // Enables app-info pane on long-pressing the icon
            public static final boolean EnableDevAppInfoOnLongPress = true;
            // Enables dismiss-all
            public static final boolean EnableDismissAll = false;
            // Enables debug mode
            public static final boolean EnableDebugMode = false;
            // Enables the search bar layout
+11 −29
Original line number Diff line number Diff line
@@ -24,7 +24,6 @@ import android.content.res.Resources;
import android.graphics.Rect;
import android.provider.Settings;
import android.util.DisplayMetrics;
import android.util.TypedValue;
import android.view.animation.AnimationUtils;
import android.view.animation.Interpolator;
import com.android.systemui.R;
@@ -50,9 +49,6 @@ public class RecentsConfiguration {
    // Disable all thumbnail loading.
    public static final int SVELTE_DISABLE_LOADING = 3;

    /** Animations */
    public float animationPxMovementPerSecond;

    /** Interpolators */
    public Interpolator fastOutSlowInInterpolator;
    public Interpolator fastOutLinearInInterpolator;
@@ -83,6 +79,7 @@ public class RecentsConfiguration {
    public int taskStackScrollDuration;
    public int taskStackMaxDim;
    public int taskStackTopPaddingPx;
    public int dismissAllButtonSizePx;
    public float taskStackWidthPaddingPct;
    public float taskStackOverscrollPct;

@@ -197,10 +194,6 @@ public class RecentsConfiguration {
        // Insets
        displayRect.set(0, 0, dm.widthPixels, dm.heightPixels);

        // Animations
        animationPxMovementPerSecond =
                res.getDimensionPixelSize(R.dimen.recents_animation_movement_in_dps_per_second);

        // Filtering
        filteringCurrentViewsAnimDuration =
                res.getInteger(R.integer.recents_filter_animate_current_views_duration);
@@ -217,14 +210,11 @@ public class RecentsConfiguration {
        // Task stack
        taskStackScrollDuration =
                res.getInteger(R.integer.recents_animate_task_stack_scroll_duration);
        TypedValue widthPaddingPctValue = new TypedValue();
        res.getValue(R.dimen.recents_stack_width_padding_percentage, widthPaddingPctValue, true);
        taskStackWidthPaddingPct = widthPaddingPctValue.getFloat();
        TypedValue stackOverscrollPctValue = new TypedValue();
        res.getValue(R.dimen.recents_stack_overscroll_percentage, stackOverscrollPctValue, true);
        taskStackOverscrollPct = stackOverscrollPctValue.getFloat();
        taskStackWidthPaddingPct = res.getFloat(R.dimen.recents_stack_width_padding_percentage);
        taskStackOverscrollPct = res.getFloat(R.dimen.recents_stack_overscroll_percentage);
        taskStackMaxDim = res.getInteger(R.integer.recents_max_task_stack_view_dim);
        taskStackTopPaddingPx = res.getDimensionPixelSize(R.dimen.recents_stack_top_padding);
        dismissAllButtonSizePx = res.getDimensionPixelSize(R.dimen.recents_dismiss_all_button_size);

        // Transition
        transitionEnterFromAppDelay =
@@ -254,22 +244,19 @@ public class RecentsConfiguration {
        taskViewTranslationZMaxPx = res.getDimensionPixelSize(R.dimen.recents_task_view_z_max);
        taskViewAffiliateGroupEnterOffsetPx =
                res.getDimensionPixelSize(R.dimen.recents_task_view_affiliate_group_enter_offset);
        TypedValue thumbnailAlphaValue = new TypedValue();
        res.getValue(R.dimen.recents_task_view_thumbnail_alpha, thumbnailAlphaValue, true);
        taskViewThumbnailAlpha = thumbnailAlphaValue.getFloat();
        taskViewThumbnailAlpha = res.getFloat(R.dimen.recents_task_view_thumbnail_alpha);

        // Task bar colors
        taskBarViewDefaultBackgroundColor =
                res.getColor(R.color.recents_task_bar_default_background_color);
                res.getColor(R.color.recents_task_bar_default_background_color, null);
        taskBarViewLightTextColor =
                res.getColor(R.color.recents_task_bar_light_text_color);
                res.getColor(R.color.recents_task_bar_light_text_color, null);
        taskBarViewDarkTextColor =
                res.getColor(R.color.recents_task_bar_dark_text_color);
                res.getColor(R.color.recents_task_bar_dark_text_color, null);
        taskBarViewHighlightColor =
                res.getColor(R.color.recents_task_bar_highlight_color);
        TypedValue affMinAlphaPctValue = new TypedValue();
        res.getValue(R.dimen.recents_task_affiliation_color_min_alpha_percentage, affMinAlphaPctValue, true);
        taskBarViewAffiliationColorMinAlpha = affMinAlphaPctValue.getFloat();
                res.getColor(R.color.recents_task_bar_highlight_color, null);
        taskBarViewAffiliationColorMinAlpha = res.getFloat(
                R.dimen.recents_task_affiliation_color_min_alpha_percentage);

        // Task bar size & animations
        taskBarHeight = res.getDimensionPixelSize(R.dimen.recents_task_bar_height);
@@ -344,11 +331,6 @@ public class RecentsConfiguration {
        return !launchedWithNoRecentTasks && (!hasTransposedNavBar || !isLandscape);
    }

    /** Returns whether the current layout is horizontal. */
    public boolean hasHorizontalLayout() {
        return isLandscape && hasTransposedSearchBar;
    }

    /**
     * Returns the task stack bounds in the current orientation. These bounds do not account for
     * the system insets.
Loading