Commit Graph

46861 Commits

Author SHA1 Message Date
TreeHugger Robot
c493fe34bb Merge "Fix autobundling." 2017-01-12 21:49:36 +00:00
Calin Juravle
4286f7ae46 Merge "Refactor PackageDexOptimizer" 2017-01-12 21:36:00 +00:00
TreeHugger Robot
317d0c9887 Merge "Send Snooze callback for Assistant" 2017-01-12 20:54:52 +00:00
Shukang Zhou
32d41b1b38 Merge "Close a file descriptor before losing its reference." 2017-01-12 18:59:31 +00:00
Calin Juravle
2d4b6ad7f3 Refactor PackageDexOptimizer
Split performDexoptLI in multiple smaller helpers. This will help in
adding the logic to process secondary dex files.

The goal is to move towards simple logic which can be reused between
compiling the package's code and its secondary dex files.

Test: device boots, packages get compiled in the background job,
      adb shell cmd package compile -m speed|speed-profile packageName

Bug: 32871170
Change-Id: I2d55edf42baa768f990939a82b3d52edf5f68a2c
2017-01-12 10:38:54 -08:00
Julia Reynolds
0e4203d72c Fix autobundling.
Test: manual
Change-Id: I9071b3e52172d152a4ccd685f4fd41944d2e40c9
2017-01-12 18:34:36 +00:00
TreeHugger Robot
d96cc6e250 Merge changes I2ff9bd44,I946e681e,If72df07b
* changes:
  Handle content insets for snapshots
  Always remove starting window in performShow
  Initial implementation of snapshots
2017-01-12 17:39:15 +00:00
Andre Eisenbach
de40f47147 Merge "Revert "Don't offer the BT sharing option to the user if BT is disallowed."" am: 0b9a18d21e am: 2d0ad3a9e7 am: e81838f7e1
am: efb1bda2d6

Change-Id: I8144d1e2c856304982679c35faa401f0aad5478f
2017-01-12 17:30:55 +00:00
Mark Salyzyn
22221f6981 Merge "resolve merge conflicts of ec7e2a164c to master" 2017-01-12 17:23:01 +00:00
Jeff Sharkey
0078e1b777 Add support for fallback categories.
When an app doesn't define a category, look for a fallback category
in a hard-coded list.  This change only defines a fallback for a
single package, but device-specific overlays can be used to provide
more detailed fallback lists.

The precidence order is: app manifest > installer hint > fallback

Test: builds, boots, fallback categories work
Bug: 33815939
Change-Id: I1f5ca76fb7e5743a4500c0a1230a754266f34d9e
2017-01-12 09:53:44 -07:00
Jeff Sharkey
9bc89af3f1 Add API for apps to declare their "category".
Upcoming platform features need to cluster apps together into broad
categories to help summarize information to users.  (For example,
when presenting battery, network, and disk usage.)

We are tightly limiting the set of categories to keep them easily
presentable to users when summarizing information.  This feature is
not designed to be a general-purpose taxonomy, nor should it be
allowed to become one.

Older apps may not have defined a category in their manifests, so
allow the installing app to define a category on their behalf.

Test: builds, boots
Bug: 33815939
Change-Id: I785b882ee7c18072ef47d56e0fc19ad72888e1b7
2017-01-12 09:53:44 -07:00
TreeHugger Robot
cb2c57338b Merge "[DPM] Improvements to the network logs batch finalization mechanism" 2017-01-12 16:52:28 +00:00
Andre Eisenbach
efb1bda2d6 Merge "Revert "Don't offer the BT sharing option to the user if BT is disallowed."" am: 0b9a18d21e am: 2d0ad3a9e7
am: e81838f7e1

Change-Id: I62d424e92e10c1604938349e94ae38938557130c
2017-01-12 16:48:15 +00:00
Andre Eisenbach
e81838f7e1 Merge "Revert "Don't offer the BT sharing option to the user if BT is disallowed."" am: 0b9a18d21e
am: 2d0ad3a9e7

Change-Id: I9ba589e7b46bf48374b30975ccc9fedb6d740b01
2017-01-12 16:44:42 +00:00
Mark Salyzyn
173215d1b2 resolve merge conflicts of ec7e2a164c to master
Test: compile
Bug: 26552300
Bug: 31289077
Change-Id: I49c6e41b79061e2b3c0352e3ac8fa5ebb152b6f5
2017-01-12 08:28:30 -08:00
Andre Eisenbach
2d0ad3a9e7 Merge "Revert "Don't offer the BT sharing option to the user if BT is disallowed.""
am: 0b9a18d21e

Change-Id: I245966c53c49da6c0b95b73ec72754d85edcd627
2017-01-12 16:27:03 +00:00
Mark Salyzyn
ec7e2a164c Merge "Replace cutils/log.h and log/logger.h with android/log.h or log/log.h (part deux)" am: 2225a0640b am: d1740f0f5b
am: 6dacea63d9

Change-Id: Ife229cc450dbbb5f43941fcd1b08b86f0e41a779
2017-01-12 15:59:48 +00:00
Andre Eisenbach
8b4838e5e3 Revert "Don't offer the BT sharing option to the user if BT is disallowed."
Causes boot loop issue:

02-15 02:31:59.785   770   770 E System  : Caused by: java.lang.IllegalArgumentException: Unknown component: com.android.bluetooth/com.android.bluetooth.opp.BluetoothOppLauncherActivity
02-15 02:31:59.785   770   770 E System  : .at com.android.server.pm.PackageManagerService.setEnabledSetting(PackageManagerService.java:18500)
02-15 02:31:59.785   770   770 E System  : .at com.android.server.pm.PackageManagerService.setComponentEnabledSetting(PackageManagerService.java:18461)
02-15 02:31:59.785   770   770 E System  : .at android.app.ApplicationPackageManager.setComponentEnabledSetting(ApplicationPackageManager.java:2129)
02-15 02:31:59.785   770   770 E System  : .at com.android.server.BluetoothManagerService.updateOppLauncherComponentState(BluetoothManagerService.java:2036)



This reverts commit 77fe44ffb6.

Change-Id: Ia079bb2fcc91bb5979a3840ab50b9d9ddda1cf24
2017-01-12 15:57:29 +00:00
Mark Salyzyn
6dacea63d9 Merge "Replace cutils/log.h and log/logger.h with android/log.h or log/log.h (part deux)" am: 2225a0640b
am: d1740f0f5b

Change-Id: I78430cd21cf1186ccc2b48ee4ee8a9b07decde5e
2017-01-12 15:46:20 +00:00
Julia Reynolds
7967230de2 Send Snooze callback for Assistant
On selection of a snooze context SnoozeCriterion.

Test: runtest systemui-notification & make cts-verifier
Change-Id: Iaca567100c29295fbbf1d327195a114106909652
2017-01-12 10:40:11 -05:00
Mark Salyzyn
d1740f0f5b Merge "Replace cutils/log.h and log/logger.h with android/log.h or log/log.h (part deux)"
am: 2225a0640b

Change-Id: I2302614d240f276a9c974f5e94bc0bbdb2585966
2017-01-12 15:32:50 +00:00
Jorim Jaggi
e2c77f9035 Handle content insets for snapshots
Pass information about content insets of a snapshotted task to
SystemUI and use it there to correctly offset the snapshot
when drawing.

Test: Open app, go to recents, make sure app aligns before
and after the animation.
Bug: 31339431
Change-Id: I2ff9bd44534bd8f66b591385da1e1e3aec40b6c5
2017-01-12 16:28:19 +01:00
Jorim Jaggi
a50da607da Always remove starting window in performShow
When going to homescreen and then opening apps quickly again, the
surface was not yet fully destroyed so we never triggered the
codepath to remove the starting window in that case, so it was
lingering around forever.

Test: Open app, press home, reopen app immidiately again, make sure
snapshot starting window is removed.
Bug: 31339431
Change-Id: I946e681e7dc222e3dedfd3edacb8f37aee4a198b
2017-01-12 16:28:08 +01:00
Jorim Jaggi
02886a82d8 Initial implementation of snapshots
All this functionality is hidden behind a flag. If this flag is
active, we disable the regular screenshots.

Instead, we take a screenshot when an app transition for which a
task is disappearing is starting. The screenshot gets stored
into a gralloc buffer. SystemUI uses a new method to retrieve
a snapshot gralloc buffer and then draws it using GraphicBuffer.
createHardwareBitmap().

When starting an existing activity in an existing tasks, or when
bringing an existing tasks to front from recents, we add a new
snapshot starting window. For that, we reuse the existing
starting window, but when creating the window, we use a fake
window that draws the contents of the starting window.

Test: runtest frameworks-services -c
com.android.server.wm.TaskSnapshotControllerTest
Bug: 31339431
Change-Id: If72df07b3e56f30413db5029d0887b8c9665aaf4
2017-01-12 16:28:01 +01:00
Mark Salyzyn
2225a0640b Merge "Replace cutils/log.h and log/logger.h with android/log.h or log/log.h (part deux)" 2017-01-12 15:18:26 +00:00
Michal Karpinski
3dcd39c14a [DPM] Improvements to the network logs batch finalization mechanism
The full batch will still be available to DPC if there were no
network logs pending.
Added some more debug logging to better investigate the issues.

Test: manual for both cases - pending batch was empty and non-empty,
      with locally decreased timeout
Test: cts-tradefed run cts --module DevicePolicyManager --test com.android.cts.devicepolicy.DeviceOwnerTest#testNetworkLoggingWithSingleUser

Bug: 34157435
Bug: 29748723
Change-Id: Iee229d74d4b0a06025b305a15687f336a0aa337e
2017-01-12 15:05:12 +00:00
TreeHugger Robot
e86e6d7595 Merge "Fix NPE when trying to add starting window" 2017-01-12 15:01:53 +00:00
TreeHugger Robot
b237ddcb84 Merge "Remove PO support from HardwarePropertiesManager" 2017-01-12 14:01:26 +00:00
TreeHugger Robot
3e17ea13c1 Merge "[DPM] Allow lower strong auth timeout on debuggable builds" 2017-01-12 13:46:09 +00:00
Jorim Jaggi
73f8820ccc Fix NPE when trying to add starting window
Container may already have been removed, so protect against that
situation.

Test: Boot device
Change-Id: Ic76d74c6df0801e2a50352a4b04d67b5d216d4fe
Fixes: 34227241
2017-01-12 14:31:49 +01:00
Michal Karpinski
2df5919faa [DPM] Allow lower strong auth timeout on debuggable builds
Timeout can be set to lower than 1h on debuggable builds (eng, user-debug)
using persist.sys.min_str_auth_timeo system property. This allows manual
testers to more easily carry out testing scenarios.

Bug: 29825955
Test: manual without setting the property: if timeout is set to less than 1h, it's clamped to 1h
Test: manual with setting the property: on user-debug build with "adb root && adb shell setprop persist.sys.min_str_auth_timeo 30000"
Change-Id: I8cd871e3d04b2c6c7164f684b9a6a24e7292bfab
2017-01-12 11:36:20 +00:00
Pavel Grafov
a902e5c255 Merge "Let profile owners also receive OTA notification." 2017-01-12 11:12:01 +00:00
Pavel Grafov
dfbfca2015 Merge "Fix DevicePolicyManagerServiceMigrationTest." 2017-01-12 11:08:54 +00:00
Erik Kline
17ca0e43a1 Merge "Simplify UpstreamNetworkMonitor callback handling" am: f9f5cf9d9b am: cbd3d8b356 am: 082263344a
am: 190d8591ce

Change-Id: I255691753279b370e85c4bde1930b7e2f45cd109
2017-01-12 10:49:31 +00:00
Erik Kline
190d8591ce Merge "Simplify UpstreamNetworkMonitor callback handling" am: f9f5cf9d9b am: cbd3d8b356
am: 082263344a

Change-Id: I11af9d4b1810cce628e240f2d8b6980ea55cd40a
2017-01-12 10:43:26 +00:00
Erik Kline
082263344a Merge "Simplify UpstreamNetworkMonitor callback handling" am: f9f5cf9d9b
am: cbd3d8b356

Change-Id: I845443ae243429847e0a42b3be5bec6276a216c0
2017-01-12 10:33:24 +00:00
Erik Kline
cbd3d8b356 Merge "Simplify UpstreamNetworkMonitor callback handling"
am: f9f5cf9d9b

Change-Id: I642567d81b6b8908b2ef7afea8d15628330481f9
2017-01-12 10:26:43 +00:00
Treehugger Robot
f9f5cf9d9b Merge "Simplify UpstreamNetworkMonitor callback handling" 2017-01-12 10:18:24 +00:00
Hugo Benichi
2c69d1de70 Captive portal: better detect empty responses am: cb4aa4d412
am: 3d5357ba2d

Change-Id: I3982ce4485d94c4abcf6afb2c58aa94a2ff2c902
2017-01-12 09:05:25 +00:00
Hugo Benichi
3d5357ba2d Captive portal: better detect empty responses
am: cb4aa4d412

Change-Id: I64a006f6bb83dc588b108395d54189bb401c83ff
2017-01-12 08:59:27 +00:00
Hugo Benichi
cb4aa4d412 Captive portal: better detect empty responses
The captive portal detection logic treats empty http responses with a
Content-Length of 0 as not coming from a portal.

However when the Content-Length is missing from the response header, the
empty response is not detected as such and is classified as a captive
portal answer.

When this happens for the http probe, the portal detection logic will
short circuit the detection and wrongly report a portal. The system
validates the network in such conditions only if the https probe
returns a successful connection faster than the http probe.

This patch attempts to better detect empty responses by trying to read
the first byte from the response body when the Content-Length is missing
for 200 responses.

Test: build, flashed + manual tests.
Bug: 33498325
Change-Id: Ie2e5c6a9dc3740e4a2304034879b5ed60f277ade
2017-01-12 15:21:35 +09:00
Colin Cross
9d273bfec1 Merge "Remove libservicestestsjni" am: d00478e9ad am: 301c714b43
am: dcb0c55c15

Change-Id: I55f8fed5eff824e792cbfc29b7cd7b496cad106c
2017-01-12 05:11:47 +00:00
Colin Cross
dcb0c55c15 Merge "Remove libservicestestsjni" am: d00478e9ad
am: 301c714b43

Change-Id: I08e2298e7dd1ba8729e6d4a03e3c940012bb5e12
2017-01-12 05:05:41 +00:00
Colin Cross
301c714b43 Merge "Remove libservicestestsjni"
am: d00478e9ad

Change-Id: I062f8bd18730a8c3ee090fc4665f652fe10ff75c
2017-01-12 04:59:42 +00:00
Treehugger Robot
d00478e9ad Merge "Remove libservicestestsjni" 2017-01-12 04:50:57 +00:00
Erik Kline
452b4b7218 Simplify UpstreamNetworkMonitor callback handling
In the callback post a lamba to the target state machine's handler
that does the processing we need before sending a notification to
the state machine.

No semantic change, just a bit cleaner.

Test: as follows
    - built (bullhead)
    - flashed
    - booted
    - runtest frameworks-net passes
    - tested basic wifi-to-mobile tethering (no DUN)
Bug: 32163131
Change-Id: I07e1b510c1ebaa5dffd42a3f16ba96e961cb58f1
2017-01-12 13:43:00 +09:00
Colin Cross
3bc99892e6 Remove libservicestestsjni
frameworks/base/services/tests/servicestests/jni no longer exists
after I993eeaa5dec001c39389023f355f506129b356e7, remove it.

Test: m -j FrameworksServicesTests
Change-Id: I8f307373aede9e749f1b992dde0f7252bf74b065
(cherry-picked from e399468b88)
Merged-In: I8f307373aede9e749f1b992dde0f7252bf74b065
2017-01-12 03:24:57 +00:00
Shijian Li
7eed086b86 Sync the startConsentUiIfNeeded logics to master. We are missing the package name when starting the activity now. am: 5e7fc7ccc8
am: 699e7878ef

Change-Id: I39aefb9af40cbe6a2cc833bf4e5e96890c0b13a4
2017-01-12 03:12:17 +00:00
Shijian Li
699e7878ef Sync the startConsentUiIfNeeded logics to master. We are missing the package name when starting the activity now.
am: 5e7fc7ccc8

Change-Id: I327673625deafc5c18319ce1b61734a090b6a989
2017-01-12 03:07:23 +00:00
TreeHugger Robot
c2d478b658 Merge "Remove libservicestestsjni" 2017-01-12 02:55:15 +00:00