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

Commit 83d87e42 authored by Evan Chen's avatar Evan Chen
Browse files

Change allow button to a downward button to scroll the permission list

1. If the user hasn't scrolled to the bottom of the permission list, display a button with a downward arrow.
2. Each tap of the downward button scrolls the permission list to reveal the next permission.
3. Once the user has scrolled to the very bottom of the permission list, the "Allow" button becomes visible.

Fix: 391252796
Test: cts + manually
Flag: EXEMPT bugfix
Change-Id: Iac25d681edaf3604230c6d2f7ac8133a8a355ca2
parent d241c39b
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2022 The Android Open Source Project
  ~ Copyright (C) 2025 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.
+32 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2025 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.
  -->

<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item>
        <shape android:shape="rectangle">
            <solid android:color="@android:color/system_accent1_100" />
            <corners
                android:bottomLeftRadius="4dp"
                android:bottomRightRadius="4dp"
                android:topLeftRadius="12dp"
                android:topRightRadius="12dp" />
        </shape>
    </item>
    <item
        android:drawable="@drawable/ic_downward_arrow"
        android:gravity="center" />
</layer-list>
 No newline at end of file
+25 −0
Original line number Diff line number Diff line
<!--
  ~ Copyright (C) 2025 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/system_accent1_600"
        android:pathData="M480,720L240,480L296,424L440,568L440,200L520,200L520,568L664,424L720,480L480,720Z"/>
</vector>
 No newline at end of file
+6 −0
Original line number Diff line number Diff line
@@ -139,6 +139,12 @@
    <!-- Back button for the helper consent dialog [CHAR LIMIT=30] -->
    <string name="consent_back">Back</string>

    <!-- Downward arrow button action for scroll down the permission list [CHAR LIMIT=30] -->
    <string name="downward_arrow_action">Scroll down the list</string>

    <!-- Downward arrow button [CHAR LIMIT=30] -->
    <string name="downward_arrow">Downward arrow</string>

    <!-- Expand permission in the list CHAR LIMIT=30] -->
    <string name="permission_expand">Expand <xliff:g id="permission_type" example="Notification">%1$s</xliff:g></string>

+1 −1
Original line number Diff line number Diff line
@@ -119,7 +119,7 @@
        <item name="android:layout_marginEnd">32dp</item>
        <item name="android:textColor">@android:color/system_neutral1_900</item>
        <item name="android:textAppearance">@android:style/TextAppearance.DeviceDefault.Medium</item>
        <item name="android:background">@drawable/btn_positive_bottom</item>
        <item name="android:background">@drawable/btn_positive_button</item>
    </style>

    <style name="NegativeButton"
Loading