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

Commit 4facf500 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Custom warning blocked activity dialog" into main

parents b53c6361 df96c4e8
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -24,6 +24,14 @@
            </intent-filter>
        </activity>

        <activity
            android:name=".NotifyComputerControlBlockedActivity"
            android:theme="@style/Theme.NotifyComputerControlBlockedActivity.FilterTouches"
            android:excludeFromRecents="true"
            android:exported="true"
            android:launchMode="singleTop">
        </activity>

    </application>

</manifest>
+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.
  -->

<ScrollView
    xmlns:android="http://schemas.android.com/apk/res/android"
    style="@style/NotifyComputerControlBlockedActivityScrollView">
    <LinearLayout
        style="@style/NotifyComputerControlBlockedActivityContent">
        <TextView
            android:id="@+id/title"
            android:text="@string/request_computer_control_access_dialog_title"
            style="@style/NotifyComputerControlBlockedActivityTitle" />
        <Button
            android:id="@+id/ok_button"
            android:text="@string/notify_computer_control_blocked_activity_button_ok"
            style="@style/NotifyComputerControlBlockedActivityOkButton" />
    </LinearLayout>
</ScrollView>
+17 −0
Original line number Diff line number Diff line
@@ -20,6 +20,8 @@
    <!-- Title of the VirtualDeviceManager application. [CHAR LIMIT=50] -->
    <string name="app_label">Virtual Device Manager</string>

    <!-- START REQUEST COMPUTER CONTROL ACCESS DIALOG -->

    <!-- Label for the title of request computer control access dialog [CHAR LIMIT=70] -->
    <string name="request_computer_control_access_dialog_title">Allow &lt;strong&gt;<xliff:g id="agent_app_name" example="Example Agent App">%1$s</xliff:g>&lt;/strong&gt; to fully automate your apps?</string>

@@ -35,4 +37,19 @@
    <!-- Label for the always allow button for request computer control access dialog. [CHAR LIMIT=40] -->
    <string name="request_computer_control_access_dialog_button_always_allow">Always allow</string>

    <!-- END REQUEST COMPUTER CONTROL ACCESS DIALOG -->

    <!-- START NOTIFY COMPUTER CONTROL BLOCKED ACTIVITY DIALOG -->

    <!-- Label for the title of notify computer control blocked activity [CHAR LIMIT=NONE] -->
    <string name="notify_computer_control_blocked_activity_title">This app is requesting to open another app, which is restricted during automation</string>

    <!-- Label for the title of notify computer control blocked permission dialog [CHAR LIMIT=NONE] -->
    <string name="notify_computer_control_blocked_permission_dialog_title">This app is requesting a permission, which is restricted during automation</string>

    <!-- Label for the OK button for notify computer control blocked activity dialog. [CHAR LIMIT=40] -->
    <string name="notify_computer_control_blocked_activity_button_ok">OK</string>

    <!-- END NOTIFY COMPUTER CONTROL BLOCKED ACTIVITY DIALOG -->

</resources>
+40 −0
Original line number Diff line number Diff line
@@ -93,4 +93,44 @@
    </style>

    <!-- END REQUEST COMPUTER CONTROL ACCESS DIALOG -->

    <!-- START NOTIFY COMPUTER CONTROL BLOCKED ACTIVITY DIALOG -->

    <style name="NotifyComputerControlBlockedActivityScrollView">
        <item name="android:layout_width">match_parent</item>
        <item name="android:layout_height">wrap_content</item>
        <item name="android:paddingHorizontal">24dp</item>
        <item name="android:paddingTop">24dp</item>
        <item name="android:paddingBottom">16dp</item>
        <item name="android:background">@color/settingslib_materialColorSurfaceContainerHigh</item>
    </style>

    <style name="NotifyComputerControlBlockedActivityContent">
        <item name="android:layout_width">match_parent</item>
        <item name="android:layout_height">wrap_content</item>
        <item name="android:orientation">vertical</item>
        <item name="android:gravity">center_horizontal</item>
    </style>

    <style name="NotifyComputerControlBlockedActivityTitle">
        <item name="android:layout_width">wrap_content</item>
        <item name="android:layout_height">wrap_content</item>
        <item name="android:layout_marginTop">24dp</item>
        <item name="android:layout_marginBottom">16dp</item>
        <item name="android:gravity">center_horizontal</item>
        <item name="android:textAppearance">@style/TextAppearance.SettingsLib.HeadlineSmall</item>
    </style>

    <style name="NotifyComputerControlBlockedActivityOkButton">
        <item name="android:layout_width">match_parent</item>
        <item name="android:layout_height">wrap_content</item>
        <item name="android:layout_marginTop">28dp</item>
        <item name="android:minHeight">@dimen/settingslib_expressive_space_medium3</item>
        <item name="android:background">@drawable/settingslib_expressive_button_background_filled</item>
        <item name="android:textAppearance">@style/TextAppearance.SettingsLib.LabelLarge</item>
        <item name="android:textColor">@color/settingslib_materialColorOnPrimary</item>
    </style>

    <!-- END NOTIFY COMPUTER CONTROL BLOCKED ACTIVITY DIALOG -->

</resources>
+18 −0
Original line number Diff line number Diff line
@@ -51,4 +51,22 @@
    </style>

    <!-- END REQUEST COMPUTER CONTROL ACCESS DIALOG -->

    <!-- START NOTIFY COMPUTER CONTROL BLOCKED ACTIVITY DIALOG -->

    <style name="Theme.NotifyComputerControlBlockedActivity" parent="Theme.DeviceDefault.Settings.Transparent">
        <item name="android:dialogTheme">@style/Theme.NotifyComputerControlBlockedActivity.Dialog</item>
    </style>

    <style name="Theme.NotifyComputerControlBlockedActivity.FilterTouches">
        <item name="android:filterTouchesWhenObscured">true</item>
    </style>

    <style name="Theme.NotifyComputerControlBlockedActivity.Dialog" parent="Theme.DeviceDefault.Dialog.NoActionBar.DayNight">
        <item name="android:windowMinWidthMajor">@android:dimen/dialog_min_width_major</item>
        <item name="android:windowMinWidthMinor">@android:dimen/dialog_min_width_minor</item>
    </style>

    <!-- END NOTIFY COMPUTER CONTROL BLOCKED ACTIVITY DIALOG -->

</resources>
Loading