Commit Graph

257505 Commits

Author SHA1 Message Date
Adrian Roos
e5726a2082 Ambient Display: Fix race with coloring and redaction
Fixes a bug that could result in a notification being colored on
ambient display when redaction is enabled.

Only the showing layout (either redacted or regular) was be set to
dark. If the showing layout changed after the darkness changed, the
newly showing layout was not properly darkened.

Change-Id: I0930ebe8007634ee92e104573294b5c27f1bad82
Fixes: 33429653
Test: Enable redacted notificationsn on lockscreen, enter ambient, verify that notifications are gray.
2016-12-20 20:17:36 +00:00
Ben Lin
52a9e0e1dd Merge "DO NOT MERGE ANYWHERE Revert "Using Activity#setTitle to have TalkBack announce root traversal."" into nyc-mr2-dev 2016-12-13 19:09:43 +00:00
Ben Lin
98e58262d2 DO NOT MERGE ANYWHERE Revert "Using Activity#setTitle to have TalkBack announce root traversal."
This reverts commit 4c80659e99.

Change-Id: Id5fa68f37170e61e2e63fdb3a60e8a3db79c81fa
2016-12-13 19:06:51 +00:00
Ivan Podogov
c5700918aa Merge changes from topic 'f-radio-toggle' into cw-f-dev
am: e5592abb83

Change-Id: I7b7052c0402a73bda44db5970f96b6d7226361fc
2016-12-13 16:02:45 +00:00
Svetoslav Ganov
e07563cc96 Add WiFi toggle prompts - framework
am: 82737b42a6

Change-Id: Ia8958b54d04fff971b96fc6d29771eb94fd9b17e
2016-12-13 16:02:23 +00:00
Svetoslav Ganov
d23dc17754 Add Bluetooth toggle prompts - framework
am: b1e2da7c24

Change-Id: I29c038d23488c504c838a85bd97c255b84919aab
2016-12-13 16:01:39 +00:00
Ivan Podogov
e5592abb83 Merge changes from topic 'f-radio-toggle' into cw-f-dev
* changes:
  Add WiFi toggle prompts - framework
  Add Bluetooth toggle prompts - framework
2016-12-13 15:55:30 +00:00
Hugo Benichi
8b43f6eb02 Merge "DO NOT MERGE IpConnectivityMetrics: rate limit ApfProgramEvents" into nyc-mr2-dev 2016-12-13 03:55:32 +00:00
Hugo Benichi
6674f7a3b4 Merge "DO NOT MERGE IpConnectivityMetrics reads buffer size in settings" into nyc-mr2-dev 2016-12-13 03:54:24 +00:00
Hugo Benichi
d4f09b83bd Merge "DO NOT MERGE TokenBucket for rate-limiting and throttling" into nyc-mr2-dev 2016-12-13 03:54:17 +00:00
Hugo Benichi
16ec47d50f Merge "DO NOT MERGE IpConnectivity metrics: add version number" into nyc-mr2-dev 2016-12-13 03:52:41 +00:00
TreeHugger Robot
c95e7a56c1 Merge "Import translations. DO NOT MERGE" into nyc-mr2-dev 2016-12-13 03:42:59 +00:00
Ben Lin
50e8e64c45 Merge "DO NOT MERGE ANYWHERE" into nyc-mr2-dev 2016-12-13 01:34:43 +00:00
Hugo Benichi
97d10ffcad DO NOT MERGE IpConnectivityMetrics: rate limit ApfProgramEvents
This patch uses the previously introduced TokenBucket to rate limit
ApfProgramEvents, still allowing for burst of ApfProgramEvents when a
new interface is set up (due to ipv4 provisioning, multicast lock, ipv6 RAs
triggering new APF program events in short amounts of time).

Test: new test in IpConnectivityMetricsTest
Bug: 1550402

(cherry picked from commit e1c173d224)

Change-Id: Ibe41e9a76db36ea502697a5f19fc0d91c40a3087
2016-12-13 10:20:03 +09:00
Hugo Benichi
ff0b58627f DO NOT MERGE IpConnectivityMetrics reads buffer size in settings
Test: IpConnectivityMetricsTest passes. Also manually changed the new
setting and verified the buffer size is as expected after flushing the
buffer.
Bug: 32198637

(cherry pick from commit 05686dbb6b)

Change-Id: Ie7ca1638533479601c5983bb6e54705003561b6c
2016-12-13 10:20:03 +09:00
Hugo Benichi
f6fdb4a552 DO NOT MERGE TokenBucket for rate-limiting and throttling
This patch adds a TokenBucket class that can accumulate and distribute
tokens over time.

Test: comes with unit tests.
Bug: 32198637

(cherry picked from commit 998493f0ee)

Change-Id: Iaf477c7bb14f8ddb293b7a907e2ab0cf76d09e07
2016-12-13 10:20:03 +09:00
Hugo Benichi
31cf55bdfe DO NOT MERGE IpConnectivity metrics: add version number
This patch adds a version field to ipconnectivity.proto and populates it
to 2, which is the logical version number for NYC-MR2.

Test: IpConnectivity{EventBuilder,Metrics}Test pass
Bug: 32127906

(cherry picked from commit d680d4c856)

Change-Id: I5f37633afd9ec82f5402c5b6670fe2febae82a14
2016-12-13 10:19:13 +09:00
Hugo Benichi
e40bb555d8 Merge "DO NOT MERGE Logging improvements in CaptivePortalLoginActivity" into nyc-mr2-dev 2016-12-13 00:27:35 +00:00
Hugo Benichi
a61684feb4 DO NOT MERGE Logging improvements in CaptivePortalLoginActivity
Logging improvements to help debugging captive portal issues.

Test: manually tested
Bug: 33126342

(cherry picked from commit 87de0c2067)

Change-Id: I3ac1773e07827194d854ebad4c27c48da106154b
2016-12-13 09:26:22 +09:00
Hugo Benichi
d792f9d032 Merge changes Ic83c3f8f,I7ed954de,I7780c389 into nyc-mr2-dev
* changes:
  DO NOT MERGE NetworkMonitor: send one DNS probe per web probe
  DO NOT MERGE NetworkMonitor metrics: add first validation information
  DO NOT MERGE Captive portal systel log improvements
2016-12-13 00:22:34 +00:00
Hugo Benichi
4efaee1d0f Merge "DO NOT MERGE APF: also drop any ICMPv6 RSs" into nyc-mr2-dev 2016-12-13 00:21:47 +00:00
Xiaohui Chen
f400349eb9 Merge "sysui: add assets and dimentions for sw900dp" into nyc-mr2-dev 2016-12-12 23:36:55 +00:00
Bill Yi
e6e588d21a Import translations. DO NOT MERGE
Change-Id: Iac15928717cf7dc2caa8a2ed0c0e9fb7d6d09011
Auto-generated-cl: translation import
2016-12-12 15:29:24 -08:00
Jason Monk
eb3623c7dd Merge "Fix animations for app QS tiles." into nyc-mr2-dev 2016-12-12 20:22:22 +00:00
Jason Monk
50a3327bbf Merge "Fix loading bar positioning." into nyc-mr2-dev 2016-12-12 20:21:59 +00:00
Alan Viverette
bf5c5f8981 Merge "Add missing API diffs for support library 25.1.0" into nyc-mr2-dev 2016-12-12 19:50:50 +00:00
Jason Monk
76bf8eb3d6 Fix loading bar positioning.
Move it down and make sure it covers entire width.

Change-Id: If906ea86ae1e78b7a75e2376c65f0ff0e191b86c
Fixes: 30292983
Test: Manual visual inspection of UI element locations
2016-12-12 13:07:50 -05:00
Tyler Gunn
fd66641943 Merge "Add reason code used to tell dialer when call failed due to WFC being off." into nyc-mr2-dev 2016-12-12 17:09:39 +00:00
TreeHugger Robot
3c5965d339 Merge "[DO NOT MERGE] Switch to using UMS.mUserStates" into nyc-mr2-dev 2016-12-12 17:05:10 +00:00
Jason Monk
d2274f848c Fix animations for app QS tiles.
Use correct context for third party tile drawable creation, also
fix comparison so that AVDs don't animate multiple times.

Change-Id: Ifcf7b818304d6677eacf080ed8c22893c91fdf73
Fixes: 32779384
Test: Install app with animated app QS tile.
2016-12-12 12:02:16 -05:00
Meng Wang
8f1a57f943 Merge "DO NOT MERGE API for reporting IMS registration failures" into nyc-mr2-dev 2016-12-10 00:08:24 +00:00
Fyodor Kupolov
7a1e682794 [DO NOT MERGE] Switch to using UMS.mUserStates
UserManager.isUserUnlocked/isUserRunning/isUserUnlockingOrUnlocked now
return state from UMS.mUserStates that is pushed from ActivityManager.

Test: create managed profile using TestDPC and check Launcher3
Test: manually create unstarted managed profile and check launchers
Bug: 33232933
Change-Id: I6b619ba1880188eabdd6e3e4cc7eb60d3a22a977
2016-12-09 21:23:57 +00:00
Doris Liu
65734b2f66 Merge "Add API info about Keyframe and PropertyValuesHolder" into nyc-mr2-dev 2016-12-09 21:13:40 +00:00
Fyodor Kupolov
8aa678b575 Merge "[DO NOT MERGE] Increased user switch timeout to 3s" into nyc-mr2-dev 2016-12-09 19:58:22 +00:00
Jeff Sharkey
ac7775f28e Merge "Fix race condition bug related to freezing apps." into cw-f-dev
am: 3350ae9c82

Change-Id: Ia1f4349217b2baca92678c74d20196a3b332f008
2016-12-09 17:28:47 +00:00
Jeff Sharkey
453efdc065 Fix race condition bug related to freezing apps.
am: 41d2be0f0f

Change-Id: I012093b52efda2cdffa47143c40e2708007158f5
2016-12-09 17:28:43 +00:00
TreeHugger Robot
3350ae9c82 Merge "Fix race condition bug related to freezing apps." into cw-f-dev 2016-12-09 17:22:22 +00:00
Jeff Sharkey
41d2be0f0f Fix race condition bug related to freezing apps.
Consider the following situation:

1. Package is frozen.
2. We try forking the app while frozen, causing a ProcessRecord with
PID 0 to be recorded in mProcessNames. As a result of the failed
fork, removeProcessLocked() tears down that ProcessRecord, but a
special case records it into mRemovedProcesses.
3. Package is unfrozen.
4. We try forking the app, and this time it proceeds normally now
that we're unfrozen.  The new valid ProcessRecord is recorded in
mProcessNames.
5. activityIdleInternalLocked() triggers a clean-up pass of
mRemovedProcesses.  trimApplications() ends up cleaning up the
stale reference from (2) above *by hash key* and not *by reference*,
which causes us to remove the new valid ProcessRecord.  This results
in the valid ProcessRecord in (4) becoming an orphaned PID, which
starts a chain reaction of havoc that ensues.

This issue is fixed by checking the expected ProcessRecord by value
before actually removing it, thus preventing orphaned PIDs.

Test: builds, boots, over 600 installs without orphaned PIDs
Bug: 28395549
Change-Id: I5ea1b31c3fd374ea7f5cc40ff35bb9195d9f3e2b
2016-12-09 09:07:16 -07:00
TreeHugger Robot
1e40ddc47a Merge "Import translations. DO NOT MERGE" into nyc-mr2-dev 2016-12-09 12:02:44 +00:00
Bill Yi
77deddca61 Import translations. DO NOT MERGE
Change-Id: I1b452aa96ca024ffc792815917b75f8b777e7a81
Auto-generated-cl: translation import
2016-12-09 00:08:50 -08:00
Hugo Benichi
eb5e9aa2ce DO NOT MERGE NetworkMonitor: send one DNS probe per web probe
This patch changes sligthly the two web probes mechanism for captive
portal detection and network validation so that DNS resolution is always
done for both probes.

In general the target web servers of the two parallel HTTP and HTTPS probes
are now different. This introduces a bias in the latency measurement of
th HTTPS probe since this latency will also include DNS resolution in
general.

Test: manual verification + $ runtest frameworks-net
Bug: 32198726

(cherry picked from commit ab61e7c324)

Change-Id: Ic83c3f8f46d32269bca1b90ae192ef648d5df6c3
2016-12-09 16:14:47 +09:00
Hugo Benichi
dd22982e25 DO NOT MERGE NetworkMonitor metrics: add first validation information
This patch adds first validation information to:
  - ValidationProbeEvent, by extending the probe_type int field of to
    also include a bit indicating if the probe was part of a first
    validation attempt or not.
  - NetworkMonitorEvent, by defining new contants for the event_type
    field.

Test: $ runtest frameworks-net
      + manually generating events and inspecting the
        output of $ adb shell dumpsys connmetrics list
Bug: b/32198726

(cherry picked from commit 147aa6d53b)

Change-Id: I7ed954dee006f8804a5bf8940eec180714bddd07
2016-12-09 16:14:41 +09:00
Hugo Benichi
a4f17bcbdf DO NOT MERGE Captive portal systel log improvements
This patch improves system logging around captive portal detection to
make inspection of bug reports sligthly easier:

- NetworkMonitor now logs by default CMD_CAPTIVE_PORTAL_RECHECK and
  CMD_CAPTIVE_PORTAL_APP_FINISHED. Other system logs are kept off with
  a new VDBG boolean contant,
- NetworkNotificationManager now prints the notification id at
  notification time. This allows to easily correlate show and clear.
- errors in NetworkNotificationManager are logged as Throwable instead
  of through their implicit toString() method.

Test: $ runtest frameworks-net
Bug: 32198726

(cherry picked from commit 8b025bf108)

Change-Id: I7780c389a94c4b9fa226f53b02fe5960d1c08618
2016-12-09 16:14:32 +09:00
Hugo Benichi
0cc49bb5bc DO NOT MERGE APF: also drop any ICMPv6 RSs
Test: new unit test + $ runtest franeworks-net
Bug: 32833400

(cherry picked from commit f98182ef5e)

Change-Id: I4c46304b9dc8105123fc02a29f99dbc835248eb0
2016-12-09 16:08:52 +09:00
Svetoslav Ganov
ff112f6ad2 Fix vulnerability in MemoryIntArray am: 1181f448c1 am: d08cf2b071
am: 385277305e

Change-Id: Ie90f6504f26526256671b057dfbb0c93e8c193c5
2016-12-09 01:52:48 +00:00
Fyodor Kupolov
2fe1990ba7 [DO NOT MERGE] Increased user switch timeout to 3s
Also report the actual delay if sendResult is eventually called.

Test: Manual - device boots, no timeouts
Bug: 30813554
Change-Id: I1271181ab9d2653fad1167049c84a6780ad46ff0
2016-12-08 17:49:09 -08:00
Svetoslav Ganov
385277305e Fix vulnerability in MemoryIntArray am: 1181f448c1
am: d08cf2b071

Change-Id: I436a09f1e49626fa45a7f6cc6bff92b2e5486a97
2016-12-09 01:48:16 +00:00
Svetoslav Ganov
d08cf2b071 Fix vulnerability in MemoryIntArray
am: 1181f448c1

Change-Id: I4217066be49bb9525e945f110c22eb864ec6c212
2016-12-09 01:43:52 +00:00
Svetoslav Ganov
1181f448c1 Fix vulnerability in MemoryIntArray
MemoryIntArray was using the size of the undelying
ashmem region to mmap the data but the ashmem size
can be changed until the former is memory mapped.
Since we use the ashmem region size for boundary
checking and memory unmapping if it does not match
the size used while mapping an attacker can force
the system to unmap memory or to access undefined
memory and crash.

Also we were passing the memory address where the
ashmem region is mapped in the owner process to
support cases where the client can pass back the
MemoryIntArray instance. This allows an attacker
to put invalid address and cause arbitrary memory
to be freed.

Now we no longer support passing back the instance
to the owner process (the passed back instance is
read only), so no need to pass the memory adress
of the owner's mapping, thus not allowing freeing
arbitrary memory.

Further, we now check the memory mapped size against
the size of the underlying ashmem region after we do
the memory mapping (to fix the ahsmem size) and if
an attacker changed the size under us we throw.

Tests: Updated the tests and they pass.

bug:33039926
bug:33042690

Change-Id: Ibf56827209a9b791aa83ae679219baf829ffc2ac
2016-12-09 00:08:33 +00:00
Bill Napier
31f2e91892 Revert "Fix vulnerability in MemoryIntArray am: a97171ec49" am: 43966dafb3 am: 498547ec6c
am: ef435f6780

Change-Id: Ib5c8b17acafa4a2c55666c2dbc1591bbbeac51a7
2016-12-08 22:40:05 +00:00