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

Commit defc9058 authored by Sunny Goyal's avatar Sunny Goyal Committed by Android (Google) Code Review
Browse files

Merge "Cleaning up some unused notifications functionality" into main

parents 3cbcdaff e0c1649d
Loading
Loading
Loading
Loading
+2 −7
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@
package com.android.launcher3.taskbar;

import static com.android.launcher3.accessibility.LauncherAccessibilityDelegate.DEEP_SHORTCUTS;
import static com.android.launcher3.accessibility.LauncherAccessibilityDelegate.SHORTCUTS_AND_NOTIFICATIONS;
import static com.android.launcher3.util.SplitConfigurationOptions.STAGE_POSITION_BOTTOM_OR_RIGHT;
import static com.android.launcher3.util.SplitConfigurationOptions.STAGE_POSITION_TOP_OR_LEFT;
import static com.android.launcher3.util.SplitConfigurationOptions.getLogEventForPosition;
@@ -36,7 +35,6 @@ import com.android.launcher3.logging.StatsLogManager;
import com.android.launcher3.model.data.ItemInfo;
import com.android.launcher3.model.data.ItemInfoWithIcon;
import com.android.launcher3.model.data.WorkspaceItemInfo;
import com.android.launcher3.notification.NotificationListener;
import com.android.launcher3.util.ShortcutUtil;
import com.android.quickstep.SystemUiProxy;
import com.android.quickstep.util.LogUtils;
@@ -63,8 +61,6 @@ public class TaskbarShortcutMenuAccessibilityDelegate

        mActions.put(DEEP_SHORTCUTS, new LauncherAction(DEEP_SHORTCUTS,
                R.string.action_deep_shortcut, KeyEvent.KEYCODE_S));
        mActions.put(SHORTCUTS_AND_NOTIFICATIONS, new LauncherAction(DEEP_SHORTCUTS,
                R.string.shortcuts_menu_with_notifications_description, KeyEvent.KEYCODE_S));
        mActions.put(MOVE_TO_TOP_OR_LEFT, new LauncherAction(
                MOVE_TO_TOP_OR_LEFT, R.string.move_drop_target_top_or_left, KeyEvent.KEYCODE_L));
        mActions.put(MOVE_TO_BOTTOM_OR_RIGHT, new LauncherAction(
@@ -76,8 +72,7 @@ public class TaskbarShortcutMenuAccessibilityDelegate
    @Override
    protected void getSupportedActions(View host, ItemInfo item, List<LauncherAction> out) {
        if (ShortcutUtil.supportsShortcuts(item)) {
            out.add(mActions.get(NotificationListener.getInstanceIfConnected() != null
                    ? SHORTCUTS_AND_NOTIFICATIONS : DEEP_SHORTCUTS));
            out.add(mActions.get(DEEP_SHORTCUTS));
        }
        out.add(mActions.get(MOVE_TO_TOP_OR_LEFT));
        out.add(mActions.get(MOVE_TO_BOTTOM_OR_RIGHT));
@@ -117,7 +112,7 @@ public class TaskbarShortcutMenuAccessibilityDelegate
                        instanceIds.first);
            }
            return true;
        } else if (action == DEEP_SHORTCUTS || action == SHORTCUTS_AND_NOTIFICATIONS) {
        } else if (action == DEEP_SHORTCUTS) {
            mContext.showPopupMenuForIcon((BubbleTextView) host);

            return true;
+0 −11
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<shape
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="oval">

    <solid android:color="?attr/popupNotificationDotColor"/>

    <size
        android:width="@dimen/notification_circle_icon_size"
        android:height="@dimen/notification_circle_icon_size"/>
</shape>
 No newline at end of file
+0 −98
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2017 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.
-->

<com.android.launcher3.notification.NotificationMainView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="@dimen/notification_container_height"
    android:orientation="vertical">

    <!-- header -->
    <FrameLayout
        android:id="@+id/header"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingEnd="@dimen/notification_padding_end"
        android:paddingTop="@dimen/notification_padding_header_top"
        android:paddingStart="@dimen/notification_header_padding_start">
        <TextView
            android:id="@+id/notification_text"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="top|start"
            android:text="@string/notifications_header"
            android:textColor="?android:attr/textColorPrimary"
            android:textSize="@dimen/notification_header_text_size"
            style="@style/TextHeadline"/>
        <TextView
            android:id="@+id/notification_count"
            android:layout_width="@dimen/notification_circle_icon_size"
            android:layout_height="@dimen/notification_circle_icon_size"
            android:background="@drawable/notification_circle"
            android:layout_gravity="top|end"
            android:gravity="center"
            android:textColor="?android:attr/textColorPrimary"
            android:textSize="@dimen/notification_header_count_text_size"
            style="@style/TextHeadline"/>
    </FrameLayout>

    <!-- Main view -->
    <FrameLayout
        android:id="@+id/main_view"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingTop="@dimen/notification_padding_top"
        android:paddingBottom="@dimen/notification_padding_bottom"
        android:focusable="true" >

        <LinearLayout
            android:id="@+id/text_and_background"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:gravity="center_vertical"
            android:orientation="vertical"
            android:paddingEnd="@dimen/notification_padding_end"
            android:paddingStart="@dimen/notification_main_text_padding_start">
            <TextView
                android:id="@+id/title"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:ellipsize="end"
                android:lines="1"
                android:textAlignment="viewStart"
                android:textColor="?android:attr/textColorPrimary"
                android:textSize="@dimen/notification_main_title_size"
                style="@style/TextHeadline" />

            <TextView
                android:id="@+id/text"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:ellipsize="end"
                android:lines="1"
                android:textColor="?android:attr/textColorPrimary"
                android:textSize="@dimen/notification_main_text_size" />
        </LinearLayout>

        <View
            android:id="@+id/popup_item_icon"
            android:layout_width="@dimen/notification_icon_size"
            android:layout_height="@dimen/notification_icon_size"
            android:layout_gravity="start|center_vertical"
            android:layout_marginStart="@dimen/notification_icon_padding_start"/>

    </FrameLayout>
</com.android.launcher3.notification.NotificationMainView>
 No newline at end of file
+0 −2
Original line number Diff line number Diff line
@@ -119,8 +119,6 @@
    <item type="id" name="action_move_screen_forwards" />
    <item type="id" name="action_resize" />
    <item type="id" name="action_deep_shortcuts" />
    <item type="id" name="action_shortcuts_and_notifications"/>
    <item type="id" name="action_dismiss_notification" />
    <item type="id" name="action_remote_action_shortcut" />
    <item type="id" name="action_dismiss_prediction" />
    <item type="id" name="action_pin_prediction"/>
+0 −6
Original line number Diff line number Diff line
@@ -402,9 +402,6 @@

    <!-- Accessibility action to show quick actions menu for an icon. [CHAR_LIMIT=30] -->
    <string name="action_deep_shortcut">Shortcuts</string>
    <!-- Accessibility description when the context menu of a launcher icon that has notifications as well as shortcuts (providing quick access to app's actions). The "shortcuts" translation should be consistent with the one for action_deep_shortcut. [CHAR_LIMIT=50] -->
    <string name="shortcuts_menu_with_notifications_description">Shortcuts and notifications
    </string>

    <!-- Accessibility action to dismiss a notification in the shortcuts menu for an icon. [CHAR_LIMIT=30] -->
    <string name="action_dismiss_notification">Dismiss</string>
@@ -412,9 +409,6 @@
    <!-- Content description for arrow tip close button. [CHAR LIMIT=NONE] -->
    <string name="accessibility_close">Close</string>

    <!-- Accessibility confirmation for notification being dismissed. -->
    <string name="notification_dismissed">Notification dismissed</string>

    <!-- Label of tab to indicate personal apps -->
    <string name="all_apps_personal_tab">Personal</string>

Loading