Commit Graph

4275 Commits

Author SHA1 Message Date
TreeHugger Robot
20e8812650 Merge "Remove Notification atom" into qt-dev 2019-04-09 00:04:04 +00:00
Howard Ro
0db82032f3 Remove Notification atom
There's no logging implmentation of Notification atom, therefore
removing it.

Bug: 130183311
Fix: 130183311
Test: make statsd
Change-Id: Ibd4b552fd4f81026401e394079526c5d1bf7bdae
2019-04-08 15:29:38 -07:00
Svet Ganov
d8eb8b2690 Restricted permission mechanism - framework
This change adds a mechanism for restricting permissions (only runtime
for now), so that an app cannot hold the permission if it is not white
listed. The whitelisting can happen at install or at any later point.

There are three whitelists: system: OS managed with default grants
and role holders being on it; upgrade: only OS puts on this list
apps when upgrading from a pre to post restriction permission database
version and OS and installer on record can remove; installer: only
the installer on record can add and remove (and the system of course).

Added a permission policy service that sits on top of permissions
and app ops and is responsible to sync between permissions and app
ops when there is an interdependecy in any direction.

Added versioning to the runtime permissions database to allow operations
that need to be done once on upgrade such as adding all permissions held
by apps pre upgrade to the upgrade whitelist if the new permisison version
inctroduces a new restricted permission. The upgrade logic is in the
permission controller and we will eventually put the default grants there.

NOTE: This change is reacting to a VP feedback for how we would handle
SMS/CallLog restriction as we pivoted from role based approach to roles
for things the user would understand plus whitelist for everything else.
This would also help us roll out softly the storage permisison as there
is too much churm coming from developer feedback.

Exempt-From-Owner-Approval: trivial change due to APi adjustment

Test: atest CtsAppSecurityHostTestCases:android.appsecurity.cts.PermissionsHostTest
Test: atest CtsPermissionTestCases
Test: atest CtsPermission2TestCases
Test: atest RoleManagerTestCases

bug:124769181

Change-Id: Ic48e3c728387ecf02f89d517ba1fe785ab9c75fd
2019-04-07 22:39:54 -07:00
Jack He
aea2698771 Rename BluetoothManufacturerInfoReported to BluetoothDeviceInfoReported
* Rename this atom to match the atom's field name

Bug: 112969790
Test: make
Change-Id: Idb54766703f47a5eb6cd7f0cdff1c41e1a92cfb1
2019-04-04 22:38:18 +00:00
Jack He
ac33c99889 Atom: Keep obfuscated_id name in BluetoothConnectionStateChanged
Bug: 112969790
Test: make, test drive with statsd
Change-Id: Ic732d48b69799f241a0e96c159b06c778392d2bf
2019-04-03 23:45:32 +00:00
TreeHugger Robot
1388c3339d Merge "Fix idmap2 policy concatenation" 2019-04-03 20:04:32 +00:00
Ryan Mitchell
ac791e6557 Fix idmap2 policy concatenation
When printing warning messages while generating idmaps, put the vertical
bar chracater in between the policies.

Bug: none
Test: manual

Change-Id: I8efee753d9ed7ce99ccafd49b6c8744eea031839
2019-04-03 11:02:39 -07:00
Muhammad Qureshi
e1e0528d85 Merge "Cancel Metric activations" 2019-04-03 17:38:51 +00:00
TreeHugger Robot
44807bc812 Merge "Add metadata and headers to incident reports." 2019-04-03 17:06:29 +00:00
Muhammad Qureshi
3a5ebf589e Cancel Metric activations
Cancel Metric activations triggered by atom matchers

Bug: 128218061
Test: statsd_test
Test: statsd_localdrive
Change-Id: I90a705d74725c2aa04025e18e1fa77ec4fefc522
2019-04-03 06:03:48 -07:00
Chandan Nath
7053e28b59 [Multi-user] Clean up user state stored in the system user directory
when user is removed.

For non system users, backup state is stored in both the user's own dir and the system dir.
When the user is removed, the user's own dir gets removed by the OS. This code change ensures
that the part of the user backup state which is in the system dir also gets removed.

Bug: 127650374

Test: atest -v CtsBackupHostTestCases:android.cts.backup.MultiUserBackupStateTest

Change-Id: I4ea252e8e6da608e36ec3ac335666923d88a8748
2019-04-03 13:36:55 +01:00
Jack He
714268038a Bluetooth: Log class of device
* Add BluetoothClassOfDeviceReported atom to log class of device
  during connection and pairing

Bug: 112969790
Test: make, test drive with statsd
Change-Id: I8039f3f94f8bc4aa9ef2b67d04929421805d2432
2019-04-02 19:31:13 -07:00
Yao Chen
cbafce94c9 Add metadata and headers to incident reports.
+ Remove the spawned thread inside the ReportFile for filter_and_write_report
  because it leads to accessing freed memory

  Instead, let the caller of ReportFile::startFileteringData create the thread.
  ReportFile class shouldn't care about whether it's writing to a pipe for IPC
  or regular file.

+ Add uri building in incidentd

+ Add metadata and headers to incident reports

Test: existing passed tests in incidentd_test still pass.
      Manually tested with statsd

Change-Id: I5fef900d31f5d181275814f1e1c8c98443f201a7
2019-04-02 16:12:10 -07:00
jianjin
8f2dee04e2 Create and log atom SystemServerWatchdogOccurred, TombStoneOccurred.
Bug: 126127632
Change-Id: I1e78069589185a4702d65cd026bc44b374a31f0a
Fix: 126127632
Test: none
2019-04-02 11:05:45 -07:00
Jian Jin
ddfac31f03 Merge "Write active metrics to disk on all shutdown cases" 2019-04-02 17:44:42 +00:00
Frank Li
ec6bbfe7d2 Merge "update dns message atom" 2019-04-02 06:13:00 +00:00
Joshua Mccloskey
8ba502e69d Merge "Adding latency biometric for enroll." 2019-04-02 03:56:00 +00:00
Jeff Sharkey
5a326402be Merge "Remove greylist of apps that gain legacy access." 2019-04-02 02:59:38 +00:00
jianjin
996f40d2eb Write active metrics to disk on all shutdown cases
Bug: 126132516
Fixes: 126132516
Test: manual tests
Change-Id: Ic0e897c57d0bf8b55167f185fa4ac80b1d672af0
2019-04-01 19:35:24 -07:00
TreeHugger Robot
de211d57dd Merge "Add INSTALL_STAGED_CANCEL_* enums" 2019-04-02 01:17:46 +00:00
Jeff Sharkey
68b3e186c2 Remove greylist of apps that gain legacy access.
Per design pivot, access to legacy behavior will be determined by
the new "allowExternalStorageSandbox" manifest flag.

Bug: 124818022, 129487770
Test: atest --test-mapping packages/providers/MediaProvider
Test: atest android.appsecurity.cts.ExternalStorageHostTest
Change-Id: I169e5eb3612c23aad47204cde9ff263f9df6f8c1
2019-04-01 18:48:52 -06:00
TreeHugger Robot
fc98f99c84 Merge "Enable presubmit for idmap2_tests" 2019-04-01 21:57:57 +00:00
joshmccloskey
6f952b2ae0 Adding latency biometric for enroll.
Bug: 129298461
Test: Verified that logs are correct on a C1 device.
Change-Id: Ifd7ea9862860c7ec4ebdbd5e281de9897b9dd6b2
2019-04-01 21:17:27 +00:00
lifr
b6b90b683c update dns message atom
Test: make statsd_testdrive
     ./out/host/linux-x86/bin/statsd_testdrive 116 => pass
Bug: 129463409
Change-Id: I267f97eacb2dd36b8ab26019f61d80fa0281678c
2019-04-02 02:12:42 +08:00
Howard Ro
3a662aff94 Add INSTALL_STAGED_CANCEL_* enums
Test: no test for enum additions
Change-Id: I22fc86005b961577190753ed36c5178d32137cc4
2019-03-29 18:26:00 -07:00
Colin Cross
31bfddf583 Merge "Convert frameworks/base/cmds/media and bmgr to Android.bp" 2019-03-30 00:45:05 +00:00
Ryan Mitchell
bcc179acf9 Enable presubmit for idmap2_tests
Bug: 128831971
Test: presubmit
Change-Id: Id68d717412045bc2e26abbe1050b3478019a2bea
2019-03-29 14:55:51 -07:00
Colin Cross
0a2d8cbb26 Convert frameworks/base/cmds/media and bmgr to Android.bp
See build/soong/README.md for more information.

Bug: 122332340
Test: m media
Test: m RunBackupFrameworksServicesRoboTests
Change-Id: Ieb54feb3902bddfd5a571369fbf50161ae646647
2019-03-29 12:41:25 -07:00
Yao Chen
b4f56c560c Merge "Make StatsLog drop less." 2019-03-29 05:28:49 +00:00
Yao Chen
0f861867c6 Make StatsLog drop less.
+ Create a thread-safe LogEventQueue to buffer log events.

+ The socket listner thread will read from socket and write to the buffer as quickly as possible
  to minimize the data loss in socket.

+ All pushed data is fetched from the the buffer and processed in a dedicated thread. After an
  event is fetched from the queue, we no longer block the socket listener thread.

+ Report event queue stats via statsdstats, including the min and max queue event history span in
  the queue (to understand how slow statsd can be and how fast the events can be)

Bug: 119031518
Test: unit tests added in statsd_test

Change-Id: I6b65ed9a678935b2e24302ba4b36e69c157adde4
2019-03-28 14:44:37 -07:00
Yao Chen
0f92de3747 Merge "Raise the max section size of an incident report to 24 mb" 2019-03-28 21:19:30 +00:00
Joe Onorato
20a0d1309b Raise the max section size of an incident report to 24 mb
Test: bit GtsIncidentManagerTestCases:*
Bug: 123543706
Change-Id: If46fb3c3972b0367e57e6dcb49edd9e3fe834a98
2019-03-28 11:05:55 -07:00
Carmen Agimof
8502e24cd3 Merge "Add a new atom to log when an app is moved from internal to external storage and vice versa." 2019-03-28 16:02:21 +00:00
Jeff Hamilton
38d503fe46 Merge "Add an API to read experiment IDs." 2019-03-28 11:44:52 +00:00
Chiachang Wang
d711ed3021 Merge "Align proto naming with server configuration" am: 2cd6f2446c am: 4f9c63ad1d
am: de9de3cb96

Change-Id: Ic21363cd264279ab5f63baf77210bc0aff41e034
2019-03-27 23:13:07 -07:00
Frank Li
9c0523d828 Merge "Config the mainline module "dnsresolver" to use native static statsd libs" 2019-03-28 05:53:30 +00:00
Jeff Hamilton
fa2f91c2fe Add an API to read experiment IDs.
Change the file format to store the
experiment IDs direclty so we don't
need to parse the proto when reading
the values out.

Bug: 129099771
Test: bit statsd_test:* && adb shell cmd stats pull-source 10051
Change-Id: I0dc1fd118f4d9ba597c2f0959648136bbafb5aab
2019-03-27 14:24:49 -04:00
Carmen Agimof
92c454ca39 Merge "Pull info about apps installed on external storage." 2019-03-27 16:51:57 +00:00
Joe Onorato
37c66e5e50 Merge "incidentd sections for userdebug and eng are compiled out" 2019-03-27 16:27:34 +00:00
Yao Chen
d68ac8003c Merge "Report the last atom tag, uid in the case of log loss." 2019-03-27 16:21:15 +00:00
Carmen Agimof
6dcc503b0d Add a new atom to log when an app is moved from internal to external
storage and vice versa.

Bug: 123688171
Test: Manually tested using stats_testdrive script.
Change-Id: Ie6c31388b779421796554465f87a4dbdf742d7e1
2019-03-27 14:47:27 +00:00
Carmen Agimof
a769c156c1 Pull info about apps installed on external storage.
Bug: 123688171
Test: Manually tested using statsd_testdrive script
Change-Id: Ie47c69c1177d77993907d7ff8ef52691a0c2eaef
2019-03-27 14:36:23 +00:00
Steven Wu
9db25fcfe2 Merge "Add logging to indiciate whether a bubble is read or unread." 2019-03-27 13:39:27 +00:00
Chiachang Wang
729d267cc6 Align proto naming with server configuration
Update naming as server requirement.

Bug: 128887306
Test: build
Change-Id: Iae46b1e41a66b1ad7d0c166ac52d5442b0c4070d
2019-03-27 09:40:46 +00:00
lifr
e82d8f67c8 Config the mainline module "dnsresolver" to use native static statsd libs
Test: make statsd_testdrive
     ./out/host/linux-x86/bin/statsd_testdrive 116 => pass

Bug: 129253665
Change-Id: I16385238b6d7820a69864219d4fb2ff96ed13ef4
2019-03-27 17:37:38 +08:00
Joe Onorato
fe7bbf410c incidentd sections for userdebug and eng are compiled out
Previously, the decision to include or not include them was
done at runtime. This changes them to be behind a compile
time flag. It's just safer, because the code just isn't there
instead of being dependent on a system property.

Test: bit GtsIncidentManagerTestCases:*
Bug: 123543706
Change-Id: If4e611914a7b0acd399ae27e55af8f718aee3ec8
2019-03-27 00:23:20 -07:00
Yao Chen
49d7dd7aaa Report the last atom tag, uid in the case of log loss.
Test: manually tested and existing statsd_test
Change-Id: I8cea9e09c4c069ec234fc0d989d550886605449b
2019-03-26 15:50:47 -07:00
Joe Onorato
99598ee6ee incidentd can now handle multiple callers asking it for incident reports
Test: bit incident_test:* GtsIncidentManagerTestCases:*
Bug: 123543706
Change-Id: I9f671dd5d8b2ad139f952a23e575c2be16120459
2019-03-26 11:20:48 -07:00
Yi Kong
0f3b0953e1 Merge "[BootAnimation] Modernize codebase by replacing NULL with nullptr" 2019-03-26 06:55:07 +00:00
Steven Wu
45e38ae47e Add logging to indiciate whether a bubble is read or unread.
Bug: 123543171
Test: manual
Change-Id: Iaa4d8e3413fedf126b080da19883b22dcf85a1f2
2019-03-25 16:33:59 -04:00