Commit Graph

3709 Commits

Author SHA1 Message Date
Jeff Sharkey
628d2e6888 Merge "Redact location Exif tags when no permission." 2018-12-04 01:28:37 +00:00
Jeff Sharkey
cb39499354 Redact location Exif tags when no permission.
When the caller doesn't hold the ACCESS_MEDIA_LOCATION permission,
any location Exif tags should be redacted for privacy reasons.  We
still allow unredacted raw file access if the media is owned by the
calling app, since they should be able to see data they contributed.

Certain backup apps really want to see the original contents without
any redaction, so provide them a setRequireOriginal() API so they
get a strong exception whenever the original bits can't be provided.

Add the ability to open a redacted file for read/write access by
stopping redaction for any ranges that have been overwritten with
new data, along with tests to verify this behavior.

Extend "content" tool to bind null values.

Bug: 111892141
Test: atest android.os.RedactingFileDescriptorTest
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: I47b220036a712d9d49547196b90e031b10760f84
2018-12-03 12:57:09 -07:00
Olivier Gaillard
76642a6cba Merge "Increase the cardinality limit for looper stats." 2018-12-03 17:27:54 +00:00
Mike Ma
85434ec8ca Implement dumpsys for incident service
Implement dump() function in IncidentService so that it can be dumped by
default. Dumpstate calls it twice, one with and one without '--proto'.
dump() ignores the former.
Dumpsys allows 10s max for each service. Hence, section 1200, 1201, 1202
are skipped because they take too long. Section 3008 and 3015 are
skipped temporarily due to errors. All sections should be enabled once
we find a workaround.
A follow-up change in SELinux is needed to allow dumpstate to access
incidentd.

Bug: 119417232
Test: Run `adb shell dumpsys incident --proto`, inspect result and logs
Test: Run `adb bugreport`, make sure incident.proto is in the zip file
      Check the proto for validity via aprotoc:
      cat incident.proto | ./out/soong/host/linux-x86/bin/aprotoc --decode_raw
Exempt-From-Owner-Approval: The original owners no longer work on this
                            project.
Change-Id: I7d08f6b644cb6751b201fb7ba37ac5e1c42fd3c5
2018-12-03 07:52:50 +00:00
Tyler Gunn
961b10fcff Merge "Add telecom test-commands for maintaining role overrides." 2018-11-30 20:03:01 +00:00
Jim Blackler
f8f70e10ef Merge "Add start time to LmkKillOccurred" 2018-11-30 19:36:11 +00:00
Misha Wagner
e4babcf3cb Merge changes I56de3aec,Iba86e8e3
* changes:
  Change CpuTimePerThreadFreq to contain all frequencies in one atom
  Remove filtering out frequencies with zero usage for CpuTimePerThreadFreq
2018-11-30 17:52:43 +00:00
Misha Wagner
fde6958b8b Change CpuTimePerThreadFreq to contain all frequencies in one atom
Test: make, flash, inspect pull-source output
Bug: 120016054
Change-Id: I56de3aec85d5f82339eb4eb876a1349d66698a63
2018-11-30 16:29:36 +00:00
Rafal Slawik
d03ae420b0 Delete rss_high_watermark_in_bytes field
Reading RSS high-water mark was moved to a separate atom.

Bug: 119598534
Test: atest UidAtomTests#testProcessMemoryState
Test: atest UidAtomTests#testNativeProcessMemoryState
Test: atest MemoryStatUtilTest
Change-Id: I18424ea3f0ab1555febe62df1be97b174e93a55c
2018-11-30 13:35:46 +00:00
Olivier Gaillard
c840ed9bfe Increase the cardinality limit for looper stats.
The recent changes to use all the dimensions as a key instead of having
multiple atoms per bucket means we now hit the maximum threshold
(although the data size is similar to what we had before).

Test: tested locally
Change-Id: I59261c273c71ce7932ee11b77bb429cec91780d7
2018-11-30 13:12:10 +00:00
TreeHugger Robot
f69ca4e970 Merge "Skip writing message field in an atom if it's empty" 2018-11-29 22:52:57 +00:00
Jim Blackler
8593d1f605 Add start time to LmkKillOccurred
To accompany Piper cl/222070329 and https://googleplex-android-review.git.corp.google.com/c/platform/system/core/+/5578724

Bug: 119854389
Test: Manual
Change-Id: Ib2af1b66d4649279fdcb97e7cdf8cdb92e361765
2018-11-29 22:21:19 +00:00
Yao Chen
8e6f998300 Skip writing message field in an atom if it's empty
Test: unit test added
Change-Id: I825b1ce526944a20fe65705508ad180ece37492c
2018-11-29 10:59:57 -08:00
Maggie White
9ab9d46a86 Merge "statsd: Increase number of available charge cycle buckets" 2018-11-29 05:18:35 +00:00
Chenjie Yu
d7e3a228be Revert "Revert "support work chain in pulled atoms""
This reverts commit 9c7b131996.

Reason for revert: Fixed build failures due to merge

Change-Id: I7d7bfed3a3234b966f3fe3fd6e0cbc63d2bedf83
Test: unit test
2018-11-28 15:53:09 -08:00
Fabian Kozynski
e3b92ab6ba Merge "Revert "support work chain in pulled atoms"" 2018-11-28 20:32:50 +00:00
Fabian Kozynski
9c7b131996 Revert "support work chain in pulled atoms"
This reverts commit ce8e4dce60.

Reason for revert: breaking multiple targets in master

Change-Id: I3ee74b314e06cb2c4d3d6da82ca116a91aad67d4
2018-11-28 20:13:22 +00:00
Chenjie Yu
fbc5842d16 Merge "support work chain in pulled atoms" 2018-11-28 19:10:30 +00:00
TreeHugger Robot
82b6b06fab Merge "Add generic atom definition for device policy events." 2018-11-28 15:13:57 +00:00
Mårten Kongstad
b87b507248 Switch to idmap2
Switch from idmap to idmap2.

This CL is the safety pin for idmap2. If idmap2 causes issues during
dogfooding it is easy go back to idmap by reverting this CL.

Once idmap2 has proven itself during a suitable period of time, the
FEATURE_FLAG_IDMAP2 flag and the obsolete idmap code will be removed.

Also add an .rc file to tell init to launch idmap2d.

Bug: 78815803
Test: atest OverlayDeviceTests OverlayHostTests
Change-Id: I5ca1388ac2f8a9379fed0c257247d351a5c7a3c4
2018-11-27 13:37:34 -08:00
Bookatz
366a4430a3 Statsd atom: pull Build information
Pulls Build information, such as Build.ID.

Test: cts-tradefed run cts-dev -m CtsStatsdHostTestCases -t android.cts.statsd.atom.HostAtomTests#testBuildInformation
Bug: 114443697
Change-Id: If1d573dbdc49543d4268f4d62e02b3ea360e75d5
2018-11-27 11:36:07 -08:00
TreeHugger Robot
32ac121d68 Merge "Increase the guardrail limit for memory usage per config" 2018-11-27 18:37:44 +00:00
arangelov
4e9940608d Add generic atom definition for device policy events.
Bug: 119492678
Test: None
Change-Id: Ic6bee84b0c2ec0028c5078da74a7b32db1881638
2018-11-27 17:25:49 +00:00
Tyler Gunn
c3430ea05e Add telecom test-commands for maintaining role overrides.
This allows for easier testing of role-dependencies for Telecom (since
RoleManager is not yet fully implemented).

Bug: 63966743
Test: Manual
Change-Id: I92fd86411d1312be2255ec0634f059cd8e4bfc26
2018-11-27 08:34:55 -08:00
Misha Wagner
3673e7ff91 Merge "Fix issue in CpuTimePerUid where microseconds are used as milliseconds" am: 4314aef811 am: f7905eb419
am: 85980756b4

Change-Id: If1338ca0d87160a79eea251e8c2c87b5b55df980
2018-11-27 06:59:11 -08:00
Misha Wagner
85980756b4 Merge "Fix issue in CpuTimePerUid where microseconds are used as milliseconds" am: 4314aef811
am: f7905eb419

Change-Id: I78470d6cc8e6e42adc50407f04b0294b9b1e159a
2018-11-27 06:42:53 -08:00
Misha Wagner
4314aef811 Merge "Fix issue in CpuTimePerUid where microseconds are used as milliseconds" 2018-11-27 14:12:59 +00:00
Yao Chen
bd88bde97c Increase the guardrail limit for memory usage per config
+ Current guardrail for memory usage is too conservative, resulting lots of voluntary data drops
in statsd without trying to send broadcast.

+ Actual data upload size is smaller than the in memory data size. So keep the threshold to send
broadcast but lift the memory usage guardrail to give a chance to send broadcast.

+ Also, make byteSize() estimation less frequent.

Bug: 119773948
Test: statsd_test passes
Change-Id: Ia4c660eb47e6d442c0952628e910b494174279d0
2018-11-26 15:48:20 -08:00
Andreas Gampe
d3196be41a Idmap2: Disable tidy errors
Temporarily only emit warnings.

Exempt-From-Owner-Approval: Build fix
Bug: 120024673
Test: N/A
Change-Id: Ia85fca04cc4fe7c4fd7a5d551abb8e00bbec820b
2018-11-26 09:47:04 -08:00
Chandan Nath
0961c3e61f Merge "add option --user to Bmgr.java" 2018-11-23 10:51:24 +00:00
Andreas Gampe
32ad3efd41 Frameworks: Fix tidy build
Some tidy warnings are now errors.

Exempt-From-Owner-Approval: Build fix
Test: WITH_TIDY=1 m
Change-Id: Id0f951e0650bbf5d10afedefe39c8326408fc1a7
2018-11-21 22:24:42 +00:00
Chandan Nath
57bf7bad03 add option --user to Bmgr.java
Bug: 118480337

Test: 1) atest RunFrameworksServicesRoboTests
    2) atest BmgrTest
    3) atest CtsBackupTestCases
    4) atest CtsBackupHostTestCases
    5) atest GtsBackupTestCases
    6) atest GtsBackupHostTestCases
    UsageStatsRestoreHostSideTest fails. I verified locally that this test
    fails without this change too.
    7) flashed device and ran:adb shell bmgr --user 10 backupnow --all
    Logs and output are as expected since backupservice isnt active for user 10
    log: Bmgr    : Running backupnow for user:10
    output: Error: Could not access the Backup Manager.  Is the system running

    8) flashed device and ran:adb shell bmgr backupnow --all
    log: Bmgr    : Running backupnow for user:0
    output:
	Running incremental backup for all packages.
	Package @pm@ with result: Success
	....
	Backup finished with result: Success

Change-Id: Icfebe26f36276ea687d15c9f9c361c409313ae9d
2018-11-21 13:52:34 +00:00
Misha Wagner
6bc6c91584 Fix issue in CpuTimePerUid where microseconds are used as milliseconds
KernelUidCpuTimeReader reads microseconds, but they are written to a
millisecond field in atoms.proto. Introduced in ag/3693225.

See google3 change: cl/222044203

Test: build
Bug: 119853118
Change-Id: I170e996aa852e28a246a98226677907bb3560371
2018-11-21 11:13:01 +00:00
Eran Messeri
fdf99084ed Merge "Grant Device IDs access to Profile Owner" 2018-11-21 07:26:40 +00:00
Dan Willemsen
bac79e0333 Merge "Convert bootanimation to Android.bp" am: f796dc71e1
am: a4e2f3f105

Change-Id: Ia520a698d62095dec752d0f2948bd4275ebefb61
2018-11-20 21:23:02 -08:00
TreeHugger Robot
3b208fa221 Merge "Convert bootanimation to Android.bp" 2018-11-21 01:19:19 +00:00
Chenjie Yu
ce8e4dce60 support work chain in pulled atoms
+ also rewrite map and merge isolated uid to host uid.

output:
Pull from 10014: { 1541137009000000000 10430748770707
(10014)0x2010101->1[I] 0x2010182->lala1[S] 0x2010201->2[I]
0x2018282->lala2[S] 0x20000->10430750[L]  }

Bug: 119043339
Bug: 117975376
Test: unit test
Change-Id: Ib6e3ea0f76594438ee1b3e12e965d85fefb405d7
2018-11-20 16:15:31 -08:00
Tej Singh
17c1132650 Merge "Atom: Pulled battery level" 2018-11-20 23:28:01 +00:00
Maggie White
38c9d32b5d statsd: Increase number of available charge cycle buckets
Pixel fuel gauges will upload up to 10 charge cycle buckets.

Test: build succeeds
Bug: 114316519
Change-Id: I29825c310e93041b0794ebdf0a8ed9bbcda722bc
Signed-off-by: Maggie White <maggiewhite@google.com>
2018-11-20 11:47:35 -08:00
Misha Wagner
bcec7d0f9f Merge "Change all uses of uint to int in CpuTimePerThreadFreq" 2018-11-20 10:07:24 +00:00
TreeHugger Robot
2f5d4be26b Merge "deprecate ALL_CONDITION_CHANGE in gauge" 2018-11-20 09:16:56 +00:00
Dan Willemsen
c15cf1d02e Convert bootanimation to Android.bp
See build/soong/README.md for more information.

Test: cd frameworks/base/cmds/bootanimation; mma
Change-Id: I7e023ffc42f61ce9a215a958fbbd158a6a8352d7
Merged-In: I7e023ffc42f61ce9a215a958fbbd158a6a8352d7
(cherry picked from commit efc3e37c9b)
2018-11-19 23:45:08 -08:00
Dan Willemsen
efc3e37c9b Convert bootanimation to Android.bp
See build/soong/README.md for more information.

Test: cd frameworks/base/cmds/bootanimation; mma
Change-Id: I7e023ffc42f61ce9a215a958fbbd158a6a8352d7
2018-11-19 23:39:47 -08:00
Tej Singh
b1dbc8b4a5 Atom: Pulled battery level
Atom to pull abttery level directly from health hal

Test: manual on blueline
Test: will do cts
Bug: 119686325
Change-Id: If2e40633b2bb9a6da61fbe1f63484735727e9ac2
2018-11-19 18:21:39 -08:00
Chenjie Yu
e077fd2e9c deprecate ALL_CONDITION_CHANGE in gauge
The feature set for GaugeMetric is the following:

1. Pull/Push once per bucket ----> RANDON_ONE_SAMPLE
  Have 1 gauge per bucket, if condition is true

2. Pull when condition becomes true ----> CONDITION_CHANGE_TO_TRUE
  Have 1 gauge per condition change to true, up to n

3. Pushed events multiple copies ----> FIRST_N_SAMPLE
  Have 1 gauge per event, up to n

4. Pull on trigger ----> FIRST_N_SAMPLE
  Have 1 gauge per trigger, up to n

For P, feature 1,2,3 work and same config can be used for P&Q.
(FIRST_N_SAMPLES is new but the code works, as would otherwise be
intended)
Feature 4 is new in Q.

Bug: 119783642
Bug: 118639742
Test: unit test
Change-Id: I671f7a5d3fdf9c2db4e8b6a137e3e45211874dcc
2018-11-19 16:39:47 -08:00
Mark Salyzyn
adc63f02b3 Merge changes I664fb325,I5e289469 am: 701001688f am: 833a491fab
am: beea2153ab

Change-Id: Ifd30d79d06e4e80103ff2f09b0ae960ceb8bc7f9
2018-11-19 13:46:31 -08:00
Mark Salyzyn
beea2153ab Merge changes I664fb325,I5e289469 am: 701001688f
am: 833a491fab

Change-Id: If9ccdbfe5ee734c9cbd95a0c7bef04e6336d6f48
2018-11-19 13:33:13 -08:00
Treehugger Robot
701001688f Merge changes I664fb325,I5e289469
* changes:
  switch to using android-base/file.h instead of android-base/test_utils.h
  Remove unused reference to android-base/test_utils.h
2018-11-19 20:25:30 +00:00
TreeHugger Robot
d1633c3bdb Merge "Incidentd: Fix switch break warnings" 2018-11-19 20:14:12 +00:00
TreeHugger Robot
76dd19544a Merge "Add ProcessMemoryHighWaterMark atom" 2018-11-19 19:04:38 +00:00