Commit Graph

960 Commits

Author SHA1 Message Date
Victor Hsieh
4ba1eeaa0e Verify the content length in the verity digest
When generating digest for verity, for the last incomplete 4k chunk, the
data is padded with 0s.  This implies that we can not tell from the
digest whether the file contains 0 or not, or how many 0s.

Since the verity hash is used by the kernel, the definition cannot be
change.  Instead, the actual hashed content length is appended to the
original digest and is verified before used.

Also uprev algorithm IDs.

Test: use new apksigner to sign an apk, apk can be installed on device
Bug: 30972906
Change-Id: I382af6e4090c7dc3f92d5acb5ac5d02d1f496992
2018-03-07 13:28:32 -08:00
Annie Meng
292d895fb2 Merge "Validate restore of NetworkPolicy settings" into pi-dev 2018-03-07 17:07:51 +00:00
Doris Ling
1af6f81488 Add feature flag for audio output switcher.
Bug: 74130772
Test: rebuild
Change-Id: I06224975550ab4017d1546b182af083a36c0eacc
2018-03-06 15:17:10 -08:00
Annie Meng
47f5c9c55f Validate restore of NetworkPolicy settings
We want to catch potential exceptions that occur when restoring
NetworkPolicy settings. Here, a DateTimeException can be thrown when
we try to read the recurrence rule from the backup data and cannot
parse a timezone.

We also add GTS tests to validate that these catches persist and that
we don't crash when given unexpected backup data to restore.

Bug: 73942796
Test: gts-tradefed run gts -m GtsBackupHostTestCases -t com.google.android.gts.backup.NetworkPolicyRestoreHostSideTest
Change-Id: I6f6ea09d2fff60b8d704c6160234e6f032321103
(cherry picked from commit 853097ca2c)
2018-03-06 13:47:24 +00:00
Maurice Lam
805ea225b9 Merge "Revert "Small fixes to StatsManager API."" 2018-02-28 07:20:36 +00:00
Maurice Lam
c0df1f2354 Revert "Small fixes to StatsManager API."
This reverts commit 16dcd33abd.

Reason for revert: b/73975175

Bug: 73975175
Change-Id: I5bcccde100900b1370c2e43b8bcfc7d1697e5c72
2018-02-28 04:17:25 +00:00
TreeHugger Robot
e6370474a7 Merge "Remove connected devices feature flag" 2018-02-28 00:42:28 +00:00
Tony Mak
2016c0f4f6 Merge "Blue work profile badge - Blue is the new orange" 2018-02-28 00:31:44 +00:00
TreeHugger Robot
ecd5c4a8f7 Merge "Small fixes to StatsManager API." 2018-02-27 22:39:15 +00:00
Jerry Zhang
eefa467e1e Remove connected devices feature flag
Bug: 72829348
Test: passes
Change-Id: If97b4eefeb1f550a78c9117a232e5bdb21789709
2018-02-27 21:40:11 +00:00
Tony Mak
e21a1d0893 Blue work profile badge - Blue is the new orange
1. We are tinting the case rather than the circle
2. Use blue instead of orange

Test: Checked the following places
1. Notification badge
2. Launcher icon
3. Widget preview
4. Share sheet
5. Recents
6. Settings -> Google
7. Cross profile switching
8. Customized shared sheet

BUG: 73815682

Change-Id: I869aa3a041644faf772810c9ab1c3d8e0f745451
2018-02-23 18:03:49 +00:00
David Chen
16dcd33abd Small fixes to StatsManager API.
Adds some annotations, deletes an unused API method, and adds some
comments.

Test: Test that make succeeds.
Bug: 72562867
Change-Id: I6c93ee4aeeacf6842795256c76551cfb1c28888d
2018-02-22 12:56:33 -08:00
TreeHugger Robot
bf65339444 Merge "Remove flags in fs-verity header" 2018-02-21 22:54:44 +00:00
TreeHugger Robot
f66699314c Merge "Use structural equality for A11yNodeInfo#mChildNodeIds" 2018-02-21 20:59:21 +00:00
Narayan Kamath
81945916f1 Merge "Remove uses of libcore.util.Objects.hashCode / equals." 2018-02-21 09:34:42 +00:00
TreeHugger Robot
11d039a1b8 Merge "Only emit debug logging when requested." 2018-02-21 05:42:14 +00:00
Victor Hsieh
91f6eb325e Remove flags in fs-verity header
The flag of "has extension" has been removed since there is a field of
"extension count" in the header.

This changes the on-disk format, but is currently fine because the
feature is not enabled yet.

Test: build
Bug: 30972906
Change-Id: Ibf00070e678835842c1508fb1afe3dca38a77381
2018-02-20 16:26:36 -08:00
Victor Hsieh
3a0032f30f Change verity hash algorithm to pad the last chunk
As the result, all existing cases takes complete chunk for hashing.

Also bump to version number.

Test: without also bumping the version, apk with 0x401 hash won't install
Test: apk with 0x411 hash installs
Bug: 30972906
Change-Id: I48c15c886ac6eab4512f1b2b9744b07e746c6211
2018-02-20 15:34:46 -08:00
Jeff Sharkey
4e0d30757e Only emit debug logging when requested.
Test: builds, boots
Bug: 72556865
Change-Id: I69d5d760221ef907eeea38490f56243f0a3b9dcb
2018-02-20 13:36:23 -07:00
Narayan Kamath
607223f3b7 Remove uses of libcore.util.Objects.hashCode / equals.
Use public API in java.util.Objects instead.

Test: make
Change-Id: I413280f254743a2efa2640a2194693aeb5980605
2018-02-19 14:12:01 +00:00
Eugene Susla
9669e3af65 Use structural equality for A11yNodeInfo#mChildNodeIds
This reintroduces I508df9e4346e304b8ae56cc38b17e9a940d941f1
with the addition of missing nullchecks

A11yNodeInfo#writeToParcel relied on LongArray#equals to avoid
storing it if it's the default value, but because the equality
is be by reference, it would store it every time.
This fixes that.

Test: a11y cts
Change-Id: I8fadffb2508d819ae9a9db8c4298e8941a349627
Fixes: 72460870
2018-02-15 13:45:22 -08:00
Artem Iglikov
74d8796def Merge "Revert "Use structural equality for A11yNodeInfo#mChildNodeIds"" 2018-02-15 12:10:28 +00:00
Artem Iglikov
b45e0b099f Revert "Use structural equality for A11yNodeInfo#mChildNodeIds"
This reverts commit df99184a81.

Reason for revert: Crashes settings - b/73440274

Bug: 73440274
Change-Id: I529874a6110e04d6b5b7723906a03330cd637d1d
2018-02-15 09:12:58 +00:00
TreeHugger Robot
4a9bde8482 Merge "Add owner files for feature flag utils" 2018-02-15 06:11:47 +00:00
TreeHugger Robot
a9e97b0d9e Merge "Couple fixes for M11nGestureHandler" 2018-02-15 06:06:52 +00:00
TreeHugger Robot
107ca33d40 Merge "Use structural equality for A11yNodeInfo#mChildNodeIds" 2018-02-15 03:09:45 +00:00
Eugene Susla
5210e9447c Couple fixes for M11nGestureHandler
1. Added missing defensive copy for a MotionEvent that is posted
asynchronously with delay, and thus might get recycled
2. Fixed transitioning to viewport dragging on 3tap/shortcut+swipe

Test: manually ensure the fix is working
Bug: 73359125
Change-Id: Iae8cd3a83512ee363abe9f0b5702287d7616c092
2018-02-14 17:44:28 -08:00
Fan Zhang
81b68cd55e Add owner files for feature flag utils
Test: rebuild
Change-Id: I23a5724ed3a37350ecbe8fc77861db2b886846cb
2018-02-14 15:17:27 -08:00
Eugene Susla
df99184a81 Use structural equality for A11yNodeInfo#mChildNodeIds
A11yNodeInfo#writeToParcel relied on LongArray#equals to avoid
storing it if it's the default value, but because the equality
is be by reference, it would store it every time.
This fixes that.

Test: a11y cts
Fixes: 72460870
Change-Id: I508df9e4346e304b8ae56cc38b17e9a940d941f1
2018-02-14 19:34:32 +00:00
David Chen
0b5c90cd8c Updates statsd atoms.proto with small changes.
Renames the apphook atom to be more descriptive. Renames time
suffixes to match more clear convention (ms and msec are ambiguous).

Adds a field to CPU active time that's required for the metrics
to be usable.

Test: Test that statsd can still build.
Change-Id: I94866510738db994e8d757260f30e599ba995dbd
2018-02-13 16:17:25 -08:00
TreeHugger Robot
40240cf782 Merge "Revert "Add logging to MemoryIntArray"" 2018-02-13 03:13:43 +00:00
Philip P. Moltmann
d712f837c4 Revert "Add logging to MemoryIntArray"
This reverts commit 6d8f30bee7.

Reason for revert: No more bug reports, logging not needed anymore

Change-Id: I4b3150ac76f509c5baf75f10b58330d332836b97
2018-02-12 22:50:00 +00:00
TreeHugger Robot
eb50aec148 Merge "Add AttributeSet.getAttributeNamespace()." 2018-02-09 22:57:27 +00:00
Dianne Hackborn
12ff371627 Add AttributeSet.getAttributeNamespace().
Why not.

Bug: 73101753
Test: Build and booted
Change-Id: I8f712ce9d7ed06eceef04d50a733a9471429b94c
2018-02-09 12:51:58 -08:00
TreeHugger Robot
27d86e9088 Merge "ByteStringUtils: fix hex parsing to include lowercase input." 2018-02-09 19:49:15 +00:00
Dan Cashman
f27d080d1a ByteStringUtils: fix hex parsing to include lowercase input.
fromHexToByteArray() should be able to handle any hex input, not
just input specified as upper-case.

Bug: 73001469
Test: Builds, boots.
Change-Id: I89dcbaeb95d6fc540b532d897ff27fb5f40381c7
2018-02-08 17:06:05 -08:00
TreeHugger Robot
6c78b876e7 Merge "Revert "Revert "Turn on about phone v2""" 2018-02-08 23:24:49 +00:00
Doris Ling
8fdafa096f Revert "Revert "Turn on about phone v2""
This reverts commit 933026a384.

- the problem with enabling the developer options is fixed, and hence re-submitting this change.

Bug: 73102865
Change-Id: I4f608851df2a4980a6e3766b30c2d86e6e98d94c
Test: rebuild
2018-02-08 21:25:46 +00:00
Doris Ling
a5ffafbfda Merge "Revert "Turn on about phone v2"" 2018-02-08 20:47:05 +00:00
Doris Ling
933026a384 Revert "Turn on about phone v2"
This reverts commit ab4ed1169a.

Bug: 73102865
Change-Id: I029064d144b891cb6eefacc2ad648a821fa49ec0
Test: rebuild
2018-02-08 20:43:43 +00:00
TreeHugger Robot
9ea3c99a95 Merge "Statsd notifies listener with pendingintent." 2018-02-08 18:50:00 +00:00
Fan Zhang
ab63bf0582 Merge "Turn on about phone v2" 2018-02-08 05:38:56 +00:00
David Chen
661f791a25 Statsd notifies listener with pendingintent.
Previously, statsd would inform interested listeners that it's time
to collect data via a protected broadcast. However, the preferred
solution is to pass a PendingIntent via a separate setter. Whenever
statsd wants the listener to call getData, StatsCompanionService
will trigger the pending intent.

Test: Tested in marlin-eng that functionality works as expected with
dogfood app.
Bug: 72562867
Change-Id: Ibcfcd5072a1a78947f8a7cbcd0bc429b54351da3
2018-02-07 16:16:23 -08:00
Fan Zhang
ab4ed1169a Turn on about phone v2
Change-Id: I8775665b7116eeebff5178ebf32890d3585c1824
Fixes: 72523158
Bug: 36458278
Test: visual
2018-02-07 15:43:37 -08:00
Eric Schwarzenbach
9aa745909e Add default value to data usage feature flag.
Test: manual
Bug: 70950124
Change-Id: Ib18a3aa8072010139feafee0592daa8afbafe008
2018-02-06 17:20:22 -08:00
weijuncheng
8fdcf98670 Merge "Add DENSITY_440" am: 6c40bbdc5e am: a21fa41755
am: 1d64dc96f7

Change-Id: I54a18f245ebf70d9d1670973e02a318743a4ec3c
2018-02-04 01:13:30 +00:00
Treehugger Robot
6c40bbdc5e Merge "Add DENSITY_440" 2018-02-03 00:03:57 +00:00
Victor Hsieh
2120323fb8 Fix fsverity root hash format
Only fsverity header and extension are included in fsverity hash
calculation, not salt, nor the paddings.

Test: fsverity measure ioctl returns successfully
Bug: 30972906
Change-Id: I06fd82d96dfde21d05367caad5c54257a0e4d6ab
2018-02-02 10:01:53 -08:00
David Chen
76ce2d6d04 Implements StatsManager temporary stubs.
Need to use the old API for a bit, so the temporary API will convert
the arguments for ConfigKey from String to Long and then call the
correct API from statsd.

This can be deleted in the future.

Test: Test that marlin-eng can build.
Change-Id: Iebaf2debc08c749ecaae631201e7d039b916f0ce
2018-01-31 16:52:52 -08:00
TreeHugger Robot
75ca5dff32 Merge "Remove feature flag for suggestion ui v2." 2018-01-31 21:15:18 +00:00