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

Commit 648426f3 authored by Eun-Jeong Shin's avatar Eun-Jeong Shin Committed by Android (Google) Code Review
Browse files

Merge "Generate user consent dialog for device log access" into tm-dev

parents 81aa0eac 8e094fb3
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -6668,10 +6668,9 @@
                  android:exported="false">
        </activity>

        <activity android:name="com.android.server.logcat.LogAccessConfirmationActivity"
                  android:theme="@style/Theme.Dialog.Confirmation"
        <activity android:name="com.android.server.logcat.LogAccessDialogActivity"
                  android:theme="@style/Theme.DeviceDefault.Dialog.Alert.DayNight"
                  android:excludeFromRecents="true"
                  android:process=":ui"
                  android:label="@string/log_access_confirmation_title"
                  android:exported="false">
        </activity>
+23 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (C) 2022 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.
  -->

<shape xmlns:android="http://schemas.android.com/apk/res/android"
       android:shape="rectangle">
    <solid android:color="@android:color/system_accent1_100"/>
    <corners android:topLeftRadius="4dp" android:topRightRadius="4dp"
             android:bottomLeftRadius="12dp" android:bottomRightRadius="12dp"/>
</shape>
 No newline at end of file
+23 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (C) 2022 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.
  -->

<shape xmlns:android="http://schemas.android.com/apk/res/android"
       android:shape="rectangle">
    <solid android:color="@android:color/system_accent1_100"/>
    <corners android:topLeftRadius="12dp" android:topRightRadius="12dp"
             android:bottomLeftRadius="4dp" android:bottomRightRadius="4dp"/>
</shape>
 No newline at end of file
+86 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
** Copyright 2022, 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.
*/
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              xmlns:app="http://schemas.android.com/apk/res-auto"
              xmlns:tools="http://schemas.android.com/tools"
              android:layout_width="380dp"
              android:layout_height="match_parent"
              android:orientation="vertical"
              android:gravity="center"
              android:paddingLeft="24dp"
              android:paddingRight="24dp"
              android:paddingTop="24dp"
              android:paddingBottom="24dp"
              android:background="?attr/colorSurface">

    <ImageView
            android:id="@+id/log_access_image_view"
            android:layout_width="32dp"
            android:layout_height="32dp"
            android:layout_marginBottom="16dp"
            android:src="@drawable/ic_doc_document"
            tools:layout_editor_absoluteX="148dp"
            tools:layout_editor_absoluteY="35dp"
            android:gravity="center" />


    <TextView
            android:id="@+id/log_access_dialog_title"
            android:layout_height="wrap_content"
            android:layout_width="wrap_content"
            android:layout_marginBottom="32dp"
            android:text="@string/log_access_confirmation_title"
            android:textAppearance="?attr/textAppearanceLarge"
            android:textColor="@android:color/system_neutral1_900"
            android:gravity="center" />

    <TextView
            android:id="@+id/log_access_dialog_body"
            android:layout_height="wrap_content"
            android:layout_width="wrap_content"
            android:text="@string/log_access_confirmation_body"
            android:textAppearance="@style/PrimaryAllowLogAccess"
            android:gravity="center" />

    <Button
            android:id="@+id/log_access_dialog_allow_button"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:text="@string/log_access_confirmation_allow"
            style="@style/PermissionGrantButtonTop"
            android:layout_marginBottom="5dp"
            android:layout_centerHorizontal="true"
            android:layout_alignParentTop="true"
            android:layout_alignParentBottom="true"
            android:clipToOutline="true"
            android:gravity="center" />

    <Button
            android:id="@+id/log_access_dialog_deny_button"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:text="@string/log_access_confirmation_deny"
            style="@style/PermissionGrantButtonBottom"
            android:layout_centerHorizontal="true"
            android:layout_alignParentTop="true"
            android:layout_alignParentBottom="true"
            android:clipToOutline="true"
            android:gravity="center" />

</LinearLayout>
 No newline at end of file
+5 −4
Original line number Diff line number Diff line
@@ -5731,16 +5731,17 @@
    <!-- Title for the harmful app warning dialog. [CHAR LIMIT=40] -->
    <string name="harmful_app_warning_title">Harmful app detected</string>

    <!-- Title for the log access confirmation dialog. [CHAR LIMIT=40] -->
    <string name="log_access_confirmation_title">System log access request</string>
    <!-- Title for the log access confirmation dialog. [CHAR LIMIT=NONE] -->
    <string name="log_access_confirmation_title">Allow <xliff:g id="log_access_app_name" example="Example App">%s</xliff:g> to access all device logs?</string>
    <!-- Label for the allow button on the log access confirmation dialog. [CHAR LIMIT=20] -->
    <string name="log_access_confirmation_allow">Only this time</string>
    <!-- Label for the deny button on the log access confirmation dialog. [CHAR LIMIT=20] -->
    <string name="log_access_confirmation_deny">Don\u2019t allow</string>

    <!-- Content for the log access confirmation dialog. [CHAR LIMIT=NONE]-->
    <string name="log_access_confirmation_body"><xliff:g id="log_access_app_name" example="Example App">%s</xliff:g> requests system logs for functional debugging.
        These logs might contain information that apps and services on your device have written.</string>
    <string name="log_access_confirmation_body">Device logs record what happens on your device. Apps can use these logs to find and fix issues.\n\nSome logs may contain sensitive info, so only allow apps you trust to access all device logs.
        \n\nIf you don’t allow this app to access all device logs, it can still access its own logs, and your device manufacturer may still be able to access some logs or info on your device. Learn more
    </string>

    <!-- Privacy notice do not show [CHAR LIMIT=20] -->
    <string name="log_access_do_not_show_again">Don\u2019t show again</string>
Loading