Commit Graph

257510 Commits

Author SHA1 Message Date
Michal Karpinski
0c4ec00f85 DO NOT MERGE Fix Lint errors for network logging API
Bug: 29748723

(cherry picked from commit 0879eb41ca)

Change-Id: I187aa5b96c283323edb6a1ebe5005d70e19bf563
2016-12-13 17:25:24 +00:00
Michal Karpinski
c4e7c32063 DO NOT MERGE Logging when the new batch of network logs broadcast is sent to DO
Test: this only adds a log message
Bug: 29748723

(cherry picked from commit bcf1c58ec2)

Change-Id: Iad57528c60f35d4820a2f0196cccc92f7c4d3830
2016-12-13 17:24:55 +00:00
Michal Karpinski
504fa62f9e DO NOT MERGE Disable DO single user features when clearDeviceOwner() is called
regardless of the amount of users

Bug: 32901196
Bug: 29748723
Change-Id: Ie419b5e496e23656cbe5436942d9aba402bfe68e
2016-12-13 17:24:17 +00:00
Michal Karpinski
5c64223da4 DO NOT MERGE Fix disabling DO single user features when clearDeviceOwner() is called
We should disable those features before the DO is actually cleared.

Bug: 32901196
Bug: 29748723

(cherry picked from commit c44e679611)

Change-Id: I74679abc26753585f302f3d52bca81fe21e2e668
2016-12-13 17:23:42 +00:00
Michal Karpinski
896b9db8ed DO NOT MERGE [DPM] Minor code fixes in NetworkLoggingHandler
Added a comment and renamed field to follow mConvention.

Test: will be CTS tested once APIs unhidden
Bug: 29748723

(cherry picked from commit aabe96db87)

Change-Id: I7ef118723d13ce1d313c3c56299c2dca2411eee6
2016-12-13 17:22:53 +00:00
Michal Karpinski
bbf352a2c1 DO NOT MERGE [DPM] DO uses batch token to retrieve network logs, and can retrieve
the same batch many times

This allows DO to:
a) know that some logs were dropped (by trying with token and not
getting anything)
b) know how many logs were there in each batch (useful especially
for the dropped ones)
c) retry batch retrieval if it failed

Test: will be CTS tested once APIs unhidden
Bug: 29748723

(cherry picked from commit a9ff206af2)

Change-Id: Iac10e61cdf3b100719a9c029ff897bd5ef5c8e2f
2016-12-13 17:22:07 +00:00
Michal Karpinski
4c47adef60 DO NOT MERGE [DPM] Management and retrieval of network logs
This CL follows up on ag/1530343 and adds:
1) Various network events.
2) Retrieval method in DPM and APIs in DeviceAdminReceiver.
3) Extension of NetworkLogger and it's NetworkLoggingHandler.

Test: runtest --path frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/NetworkEventTest.java
Bug: 29748723
Change-Id: I42a1a477e7c75c109a3982f809c22732b814e8b2
2016-12-13 17:19:22 +00:00
Michal Karpinski
c3abd34cfe DO NOT MERGE [DPM] DO can start network logging and listen for events
This CL adds:
1) Setter and getter in DPM to manipulate logging switch (retrieval
method to come in a subsequent CL(s)).
2) A way for DPM to register to listen for events.
3) Skeleton of NetworkLogger class (more to come in subsequent CL(s)).

Bug: 29748723
Change-Id: I5c04662ccc6febd2ba294b0eaca1ed1da9c16e47
2016-12-13 17:15:38 +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