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

Commit c144ea61 authored by Joe Onorato's avatar Joe Onorato Committed by Android (Google) Code Review
Browse files

Merge "Add UI to approve incident and bug reports."

parents e8184cd2 042d63c9
Loading
Loading
Loading
Loading
+4 −48
Original line number Diff line number Diff line
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

LOCAL_USE_AAPT2 := true

LOCAL_MODULE_TAGS := optional

LOCAL_SRC_FILES := \
    $(call all-java-files-under, src)

LOCAL_STATIC_ANDROID_LIBRARIES += \
    iconloader \
    androidx.car_car \
    androidx.design_design \
    androidx.transition_transition \
    androidx.core_core \
    androidx.media_media \
    androidx.legacy_legacy-support-core-utils \
    androidx.legacy_legacy-support-core-ui \
    androidx.fragment_fragment \
    androidx.appcompat_appcompat \
    androidx.preference_preference \
    androidx.recyclerview_recyclerview \
    androidx.legacy_legacy-preference-v14 \
    androidx.leanback_leanback \
    androidx.leanback_leanback-preference \
    androidx.lifecycle_lifecycle-extensions \
    androidx.lifecycle_lifecycle-common-java8 \
    SettingsLibHelpUtils \
    SettingsLibRestrictedLockUtils \
    SettingsLibAppPreference \
    SettingsLibSearchWidget \
    SettingsLibSettingsSpinner \
    SettingsLibLayoutPreference \
    SettingsLibActionButtonsPreference \
    SettingsLibBarChartPreference \
    SettingsLibEntityHeaderWidgets

LOCAL_STATIC_JAVA_LIBRARIES := \
    androidx.annotation_annotation

LOCAL_PACKAGE_NAME := PermissionController
LOCAL_SDK_VERSION := system_current
LOCAL_MIN_SDK_VERSION := 28
LOCAL_PRIVILEGED_MODULE := true
LOCAL_CERTIFICATE := platform

LOCAL_PROGUARD_FLAG_FILES := proguard.flags

include $(BUILD_PACKAGE)
# In order to build the apk and tests for both AOSP and other builds
# via inherit-package, the makefile for PermissionController itself must
# not include the subdir makefiles, so it is split into its own makefile.
include $(LOCAL_PATH)/PermissionController.mk $(call all-makefiles-under,$(LOCAL_PATH))
+20 −1
Original line number Diff line number Diff line
@@ -29,8 +29,9 @@
    <uses-permission android:name="android.permission.OBSERVE_ROLE_HOLDERS" />
    <uses-permission android:name="android.permission.SET_PREFERRED_APPLICATIONS" />
    <uses-permission android:name="com.android.permissioncontroller.permission.MANAGE_ROLES_FROM_CONTROLLER" />

    <uses-permission android:name="android.permission.ACCESS_INSTANT_APPS" />
    <uses-permission android:name="android.permission.REQUEST_INCIDENT_REPORT_APPROVAL" />
    <uses-permission android:name="android.permission.APPROVE_INCIDENT_REPORTS" />

    <uses-sdk android:minSdkVersion="28" android:targetSdkVersion="28" />

@@ -205,6 +206,24 @@
                <action android:name="android.rolecontrollerservice.RoleControllerService"/>
            </intent-filter>
        </service>

        <!-- Debug report authorization (bugreport and incident report) -->
        <receiver android:name="com.android.packageinstaller.incident.ConfirmationReceiver"
            android:exported="true">
            <intent-filter>
                <action android:name="android.intent.action.PENDING_INCIDENT_REPORTS_CHANGED" />
            </intent-filter>
        </receiver>

        <activity android:name="com.android.packageinstaller.incident.ConfirmationActivity"
                android:theme="@android:style/Theme.DeviceDefault.Light.Dialog.NoActionBar"
                android:exported="false"
                android:excludeFromRecents="true"
                android:noHistory="true" />

        <receiver android:name="com.android.packageinstaller.incident.ApprovalReceiver"
            android:exported="false" />

    </application>

</manifest>
+50 −0
Original line number Diff line number Diff line
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

LOCAL_USE_AAPT2 := true

LOCAL_MODULE_TAGS := optional

LOCAL_SRC_FILES := \
    $(call all-java-files-under, src)

LOCAL_STATIC_ANDROID_LIBRARIES += \
    iconloader \
    androidx.car_car \
    androidx.design_design \
    androidx.transition_transition \
    androidx.core_core \
    androidx.media_media \
    androidx.legacy_legacy-support-core-utils \
    androidx.legacy_legacy-support-core-ui \
    androidx.fragment_fragment \
    androidx.appcompat_appcompat \
    androidx.preference_preference \
    androidx.recyclerview_recyclerview \
    androidx.legacy_legacy-preference-v14 \
    androidx.leanback_leanback \
    androidx.leanback_leanback-preference \
    androidx.lifecycle_lifecycle-extensions \
    androidx.lifecycle_lifecycle-common-java8 \
    SettingsLibHelpUtils \
    SettingsLibRestrictedLockUtils \
    SettingsLibAppPreference \
    SettingsLibSearchWidget \
    SettingsLibSettingsSpinner \
    SettingsLibLayoutPreference \
    SettingsLibActionButtonsPreference \
    SettingsLibBarChartPreference \
    SettingsLibEntityHeaderWidgets

LOCAL_STATIC_JAVA_LIBRARIES := \
    androidx.annotation_annotation

LOCAL_PACKAGE_NAME := PermissionController
LOCAL_SDK_VERSION := system_current
LOCAL_MIN_SDK_VERSION := 28
LOCAL_PRIVILEGED_MODULE := true
LOCAL_CERTIFICATE := platform

LOCAL_PROGUARD_FLAG_FILES := proguard.flags

include $(BUILD_PACKAGE)
+26 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--  Copyright (C) 2018 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="24.0"
        android:viewportHeight="24.0"
        android:tint="?android:attr/colorControlNormal">
    <path
        android:pathData="M20,8h-2.81c-0.45,-0.78 -1.07,-1.45 -1.82,-1.96L17,4.41 15.59,3l-2.17,2.17C12.96,5.06 12.49,5 12,5c-0.49,0 -0.96,0.06 -1.41,0.17L8.41,3 7,4.41l1.62,1.63C7.88,6.55 7.26,7.22 6.81,8L4,8v2h2.09c-0.05,0.33 -0.09,0.66 -0.09,1v1L4,12v2h2v1c0,0.34 0.04,0.67 0.09,1L4,16v2h2.81c1.04,1.79 2.97,3 5.19,3s4.15,-1.21 5.19,-3L20,18v-2h-2.09c0.05,-0.33 0.09,-0.66 0.09,-1v-1h2v-2h-2v-1c0,-0.34 -0.04,-0.67 -0.09,-1L20,10L20,8zM14,16h-4v-2h4v2zM14,12h-4v-2h4v2z"
        android:fillColor="@android:color/white" />
</vector>
+29 −2
Original line number Diff line number Diff line
@@ -575,4 +575,31 @@

    <!-- Dialog body explaining that the app just selected by the user will not work after a reboot until the user enters their credentials, such as a PIN or password. [CHAR LIMIT=NONE] -->
    <string name="encryption_unaware_confirmation_message">Note: If you restart your device and have a screen lock set, this app can\u2019t start until you unlock your device.</string>

    <!-- Name for the notification channel for incident / bug report confirmation
    [CHAR LIMIT=50] -->
    <string name="incident_report_channel_name">Share Debugging Data</string>

    <!-- Title for notification shown when the user should confirm an incident / bug report.
    [CHAR LIMIT=50] -->
    <string name="incident_report_notification_title">Share detailed debugging data?</string>

    <!-- Content for notification shown when the user should confirm an incident / bug report.
    [CHAR LIMIT=120] -->
    <string name="incident_report_notification_text"><xliff:g id="app_name" example="Gmail">%1$s</xliff:g> would like to upload debugging information.</string>

    <!-- Title for the incident / bug report confirmation dialog [CHAR LIMIT=50] -->
    <string name="incident_report_dialog_title">Share Debugging Data</string>

    <!-- Content for dialog shown when the user should confirm an incident / bug report.
    [CHAR LIMIT=none] -->
    <string name="incident_report_dialog_text">"<xliff:g id="app_name" example="Gmail">%1$s</xliff:g> is requesting to upload a bug report from this device taken on <xliff:g id="date" example="December 26, 2018">%2$s</xliff:g> at <xliff:g id="time" example="1:20 PM">%3$s</xliff:g>. Bug reports include personal information about your device or logged by apps, for example, user names, location data, device identifiers, and network information. Only share bug reports with people and apps you trust with this information.

Allow <xliff:g id="app_name" example="Gmail">%4$s</xliff:g> to upload a bug report?"</string>

    <!-- Label for the button to allow sharing of the report. [CHAR LIMIT=20]-->
    <string name="incident_report_dialog_allow_label">Allow</string>

    <!-- Label for the button to NOT allow sharing of the report. [CHAR LIMIT=20] -->
    <string name="incident_report_dialog_deny_label">Deny</string>
</resources>
Loading