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

Commit fc13cb1d authored by Eun-Jeong Shin's avatar Eun-Jeong Shin
Browse files

Generate consent dialog when device log access is requested in SystemUI

This change is to implement device log access dialog from SystemUI rather than
 system server.

Bug: 238434889, 244173014
Test: GtsVerifier
Ignore-AOSP-First: migration of device log access dialog
Change-Id: I17058c008084f91099cd45a51ec8d8fbab1d78bb
parent 05d894c1
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -6908,13 +6908,6 @@
                  android:exported="false">
        </activity>

        <activity android:name="com.android.internal.app.LogAccessDialogActivity"
                  android:theme="@style/Theme.Translucent.NoTitleBar"
                  android:process=":ui"
                  android:excludeFromRecents="true"
                  android:exported="false">
        </activity>

        <activity android:name="com.android.server.notification.NASLearnMoreActivity"
                  android:theme="@style/Theme.Dialog.Confirmation"
                  android:excludeFromRecents="true"
+0 −21
Original line number Diff line number Diff line
<!--
  ~ 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.
  -->
<resources>
    <style name="PermissionGrantButtonTop"
        parent="@style/Widget.Leanback.Button.ButtonBarGravityStart" />
    <style name="PermissionGrantButtonBottom"
        parent="@style/Widget.Leanback.Button.ButtonBarGravityStart" />
</resources>
 No newline at end of file
+0 −26
Original line number Diff line number Diff line
@@ -5759,32 +5759,6 @@
    <!-- 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=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=40] -->
    <string name="log_access_confirmation_allow">Allow one-time access</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" product="default">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. Your device manufacturer may still be able to access some logs or info on your device.
    </string>

    <!-- Content for the log access confirmation dialog. [CHAR LIMIT=NONE]-->
    <string name="log_access_confirmation_body" product="tv">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. Your device manufacturer may still be able to access some logs or info on your device.\n\nLearn more at g.co/android/devicelogs.
    </string>

    <!-- Learn more URL for the log access confirmation dialog. [DO NOT TRANSLATE]-->
    <string name="log_access_confirmation_learn_more" product="default" translatable="false">&lt;a href="https://support.google.com/android?p=system_logs#topic=7313011"&gt;Learn more&lt;/a&gt;</string>

    <!-- Learn more URL for the log access confirmation dialog. [DO NOT TRANSLATE]-->
    <string name="log_access_confirmation_learn_more" product="tv" translatable="false"></string>

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

    <!-- Text describing a permission request for one app to show another app's
         slices [CHAR LIMIT=NONE] -->
    <string name="slices_permission_request"><xliff:g id="app" example="Example App">%1$s</xliff:g> wants to show <xliff:g id="app_2" example="Other Example App">%2$s</xliff:g> slices</string>
+0 −36
Original line number Diff line number Diff line
@@ -1541,40 +1541,4 @@ please see styles_device_defaults.xml.
    <style name="NotificationTombstoneAction" parent="NotificationAction">
      <item name="textColor">#555555</item>
    </style>

    <!-- The style for log access consent text -->
    <style name="AllowLogAccess">
        <item name="android:textSize">24sp</item>
        <item name="android:fontFamily">google-sans</item>
    </style>

    <style name="PrimaryAllowLogAccess">
        <item name="android:textSize">14sp</item>
        <item name="android:fontFamily">google-sans-text</item>
    </style>

    <style name="PermissionGrantButtonTextAppearance">
        <item name="android:fontFamily">google-sans-medium</item>
        <item name="android:textSize">14sp</item>
        <item name="android:textColor">@android:color/system_neutral1_900</item>
    </style>

    <style name="PermissionGrantButtonTop"
           parent="@android:style/Widget.DeviceDefault.Button.Borderless.Colored">
        <item name="android:layout_width">332dp</item>
        <item name="android:layout_height">56dp</item>
        <item name="android:layout_marginTop">2dp</item>
        <item name="android:layout_marginBottom">2dp</item>
        <item name="android:background">@drawable/grant_permissions_buttons_top</item>
    </style>

    <style name="PermissionGrantButtonBottom"
           parent="@android:style/Widget.DeviceDefault.Button.Borderless.Colored">
        <item name="android:layout_width">332dp</item>
        <item name="android:layout_height">56dp</item>
        <item name="android:layout_marginTop">2dp</item>
        <item name="android:layout_marginBottom">2dp</item>
        <item name="android:background">@drawable/grant_permissions_buttons_bottom</item>
    </style>

</resources>
+0 −11
Original line number Diff line number Diff line
@@ -3938,17 +3938,6 @@
  <java-symbol type="string" name="harmful_app_warning_title" />
  <java-symbol type="layout" name="harmful_app_warning_dialog" />

  <java-symbol type="string" name="log_access_confirmation_allow" />
  <java-symbol type="string" name="log_access_confirmation_deny" />
  <java-symbol type="string" name="log_access_confirmation_title" />
  <java-symbol type="string" name="log_access_confirmation_body" />
  <java-symbol type="string" name="log_access_confirmation_learn_more" />
  <java-symbol type="layout" name="log_access_user_consent_dialog_permission" />
  <java-symbol type="id" name="log_access_dialog_title" />
  <java-symbol type="id" name="log_access_dialog_body" />
  <java-symbol type="id" name="log_access_dialog_allow_button" />
  <java-symbol type="id" name="log_access_dialog_deny_button" />

  <java-symbol type="string" name="config_defaultAssistantAccessComponent" />

  <java-symbol type="string" name="slices_permission_request" />
Loading