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

Commit ec8c5511 authored by Wenhao Wang's avatar Wenhao Wang
Browse files

Revert "Revert "User consent for Logcat data access""

This reverts commit d7138b44.
This patch fixes the breaking caused by
commit b4f8ed9b.

It's a workaround patch. The upcoming patch will have solid fix.

Bug: 193708292
Bug: 217482811
Bug: 217495147
Test: atest PlatformRuleTests -- --abi x86_64
Test: atest FrameworksServicesTests -- --abi x86_64
Ignore-AOSP-First: pending fix for logcat privacy issue
Change-Id: If18086130599f0ae027d16ccbb7b5b5cd73f2e72
parent 0bfb83db
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -214,6 +214,14 @@ public abstract class ActivityManagerInternal {
     */
    public abstract boolean isSystemReady();

    /**
     * Returns package name given pid.
     *
     * @param pid The pid we are searching package name for.
     */
    @Nullable
    public abstract String getPackageNameByPid(int pid);

    /**
     * Sets if the given pid has an overlay UI or not.
     *
+2 −0
Original line number Diff line number Diff line
@@ -22,5 +22,7 @@ package android.os.logcat;
interface ILogcatManagerService {
    void startThread(in int uid, in int gid, in int pid, in int fd);
    void finishThread(in int uid, in int gid, in int pid, in int fd);
    void approve(in int uid, in int gid, in int pid, in int fd);
    void decline(in int uid, in int gid, in int pid, in int fd);
}
+8 −0
Original line number Diff line number Diff line
@@ -6540,6 +6540,14 @@
                  android:exported="false">
        </activity>

        <activity android:name="com.android.server.logcat.LogAccessConfirmationActivity"
                  android:theme="@style/Theme.Dialog.Confirmation"
                  android:excludeFromRecents="true"
                  android:process=":ui"
                  android:label="@string/log_access_confirmation_title"
                  android:exported="false">
        </activity>

        <activity android:name="com.android.server.notification.NASLearnMoreActivity"
                  android:theme="@style/Theme.Dialog.Confirmation"
                  android:excludeFromRecents="true"
+14 −0
Original line number Diff line number Diff line
@@ -5689,6 +5689,20 @@
    <!-- 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>
    <!-- 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>

    <!-- 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>
+5 −0
Original line number Diff line number Diff line
@@ -3857,6 +3857,11 @@
  <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="config_defaultAssistantAccessComponent" />

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