summaryrefslogtreecommitdiff
path: root/core/java/android/os/IncidentManager.java
Commit message (Collapse)AuthorAgeFilesLines
* Remove @TestApi from @SystemApi symbolsAnton Hansson2020-10-201-4/+0
| | | | | | | | | | | | | I ran these commands: cd frameworks/base grep -rl '@TestApi' --include '*.java' | xargs perl -i -p0e \ 's/\@SystemApi[\s\n]+(\@\w+[\s\n]+)?\@TestApi/\@SystemApi\1/gs' grep -rl '@TestApi' --include '*.java' | xargs perl -i -p0e \ 's/\@TestApi[\s\n]+(\@\w+[\s\n]+)?\@SystemApi/\1\@SystemApi/gs' Bug: 171179806 Test: m checkapi Change-Id: I772790b783b0a8730b8bf680c9e569a886b8d789
* Remove registerSection API with optional ExecutorMike Ma2020-03-301-18/+2
| | | | | | | | | | | | This patch addresses an issue from API review: registerSection cannot have an optional Executor registerSection is an unreleased API in R, therefore can be hard removed. Fixes: 148867197 Test: Build Change-Id: Icdb8b97f7fa3f1880aa3039dbbe82f8331a45202
* Public API: Incident report section registrationMike Ma2020-01-211-17/+39
| | | | | | | | | | Mark incident report section registration and unregistration as public APIs, and protect them with android.permission.REGISTER_INCIDENT_REPORT_SECTION. Bug: 144789854 Test: Build Change-Id: I0d79ca12054292412e10a63ba2e6f45a149066a9
* Incident Report Extension APIMike Ma2020-01-141-0/+89
| | | | | | | | | | | Add an API for priv and system app to register a dump callback with Incident Service. Bug: 145924375 Test: Register a callback dumping a string. Capture an incident report and verify that the customized section exist. Change-Id: I6fff6c1ee97e25963068d284ba37adce1bb5ec31
* Add missing nullability annotations.Aurimas Liutikas2019-08-291-1/+1
| | | | | | | | | | | | | | To prepare for enabling MissingNullability Metalava check this CL works on adding missing nullability issues that metalava flags if we tell it to flag new things since API 29. This is not a complete CL, mostly addresses public api and toString/equals for @SystemApi Exempt-From-Owner-Approval: Large scale nullability clean up Bug: 124515653 Test: make -j checkapi Change-Id: I109260842cfc25f06e40694997fcbb4afa02c867
* Add new IncidentManager.requestAuthorization method that takes an executor.Joe Onorato2019-05-161-3/+53
| | | | | | | | | | | | This is @hide for Q now that we're past API freeze, and will be @SystemApi in master. Bug: 126700920 Bug: 126701153 Bug: 130351719 Test: bit GtsIncidentConfirmationTestCases Test: bit GtsIncidentManagerTestCases Change-Id: Iac6a058017a86c1927502c529e5a7f3881eb56a7
* Fix another copy and paste of the copy and paste error.Joe Onorato2019-05-101-1/+1
| | | | | | Bug: 123955906 Test: bit GtsIncidentConfirmationTestCases:* Change-Id: I251a0295fbd64e8abea2a42af9cc23fb2c39bc63
* Fix crash in Permission Controller approving bug reports (incident reports ↵Joe Onorato2019-04-301-7/+7
| | | | | | | | were working fine) Bug: 123955906 Test: atest GtsIncidentConfirmationTestCases Change-Id: I13eb0679f71c1b6470856fd612bc914b1c61c04c
* incidentd can now handle multiple callers asking it for incident reportsJoe Onorato2019-03-261-11/+91
| | | | | | Test: bit incident_test:* GtsIncidentManagerTestCases:* Bug: 123543706 Change-Id: I9f671dd5d8b2ad139f952a23e575c2be16120459
* All Parcelable CREATOR fields are @NonNull.Jeff Sharkey2019-02-281-1/+1
| | | | | | | | | If they were null, then the Parcelable would fail to work. Bug: 126726802 Test: manual Change-Id: I7929ffa2f20e5de1c8e68e8263cca99496e9d014 Exempt-From-Owner-Approval: Trivial API annotations
* Skeleton API for IncidentManager to retrieve incident reports.Joe Onorato2019-01-291-1/+185
| | | | | | Bug: 123543706 Test: make Change-Id: I0a41d476703cb0c1c728c6de1bf290162129e699
* Add IncidentCompanionServiceJoe Onorato2019-01-291-16/+301
| | | | | | | | | It is a helper in the system process that helps dumpstate and incidentd get user confirmation to share reports Bug: 123543706 Test: bit GooglePermissionControllerTest:* Change-Id: Ia3fe4bd5257044ed89fe56ce683876fa03ba6c36
* Removing the settings-based IncidentReportArgs method.Kweku Adams2018-03-161-42/+0
| | | | | | Bug: 72378645 Test: Flashed device Change-Id: Ia12afffed169e1d0201e99887e74398de40c6cf6
* Modify SystemApi so it can be used by CTS to trigger incident reportYi Jin2018-01-291-7/+35
| | | | | | Bug: 72502621 Test: Cts/Gts tests covered, see the cls from the same topic Change-Id: Id0c1cc0fc0054e620de1349dab66513e554b1caa
* Fix parsing enum types in incident report tool as well as addingYi Jin2017-08-111-22/+11
| | | | | | | | some additional loggings Test: manually flashed to device and test calling IncidentManager.java functions Change-Id: I69610414edde865b20ba632837f037fbe43f99db
* Annotate @SystemApi with required permissions.Jeff Sharkey2017-06-051-0/+11
| | | | | | | | | | | | | | | | | Most @SystemApi methods should be protected with system (or higher) permissions, so annotate common methods with @RequiresPermission to make automatic verification easier. Verification is really only relevant when calling into system services (where permissions checking can happen on the other side of a Binder call), so annotate managers with the new @SystemService annotation, which is now automatically documented. This is purely a docs change; no logic changes are being made. Test: make -j32 update-api && make -j32 offline-sdk-docs Bug: 62263906 Change-Id: I2554227202d84465676aa4ab0dd336b5c45fc651
* First checkin of incident reporting.Joe Onorato2016-12-151-0/+114
There are a few major pieces here: incidentd --------- This daemon (started by init) runs and accepts incoming requests to take incident reports. When prompted, it calls into various system services and fills in an IncidentProto data structure, and then writes the report into dropbox. The next steps for incidentd: - Security review of SELinux policies. These will be a subset of the dumpstate permissions. Until this is done, incidentd is not started at boot time. incident -------- This shell command calls into incidentd, and can initiate an incident report and either capture the output or leave for dropbox. incident_report --------------- This host side tool can call adb shell with the correct parameters and also format the incident report as text. This formatting code was left of the device on purpose. Right now it's pretty small, but as the number of fields increases, the metadata and code to do the formatting will start to grow. The incident_report command also contains a workaround to let it work before incidentd is turned on by default. Right now, it is implemented to call adb shell dumpsys <service> --proto directly, whereas in the future it will go through the full incidentd flow. incident_section_gen -------------------- A build-time tool that generates a stripped down set of information about the fields that are available. libincident ----------- This library contains the code to connect to incidentd, and the meta proto definitions that are used by the framework protos. The basics are here now, but they are not fully fleshed out yet. The privacy.proto file contains annotations that can go in the proto file that we will later use to filter which fields are uploaded, and which are used by local sources. For example, a device in a test lab is safe to upload much much more information than a real user. These will share the same mechanism, but the user's output will be filtered according to these annotations. frameworks/core/proto --------------------- These .proto files contain the definitions of the system's output. There is one master android.os.IncidentProto file that is the top level of an incident report, but some other services (notification, fingerprint, batterystats, etc) will have others that are used directly by the logging mechanism. Other files which are shared by several of the services also go here, such as ComponentName, Locale, Configuration, etc. There will be many more. There is also a first iplementation of a dump method handling --proto in the fingerprint service. IncidentManager --------------- The java API to trigger an incident report. Test: Not written yet Change-Id: I59568b115ac7fcf73af70c946c95752bf33ae67f