Commit Graph

1858 Commits

Author SHA1 Message Date
Tony Mak
39fcc6acbc Merge "Fix the handling of bundle array in RestrictionsManager" 2016-06-21 09:14:48 +00:00
Seigo Nonaka
6a643348de Add test case for issue 29491345
Bug: 29491345
Change-Id: Icd7d1612ad317978356a17688d6ceb8b6a4825a8
2016-06-21 10:31:03 +09:00
Tony Mak
1d18efe080 Fix the handling of bundle array in RestrictionsManager
Fix: 29506624

Change-Id: I0683d406f8b70d5d5f78bfc337d3952b6513d102
2016-06-20 19:41:08 +00:00
TreeHugger Robot
68e1b0ba8b Merge "Test presubmit infrastructure" 2016-06-09 00:07:29 +00:00
Yuchao Zhou
994c577523 Merge \\"Update enable/disable code to reduce flakiness\\" into nyc-mr1-dev am: a2da20d334
am: 4b780d6bc9

Change-Id: I7ad8c5bc17e9929b25553b647239873f4a2d25a3
2016-06-08 23:39:52 +00:00
Yuchao Zhou
4b780d6bc9 Merge \"Update enable/disable code to reduce flakiness\" into nyc-mr1-dev
am: a2da20d334

Change-Id: Icf4936922afa7d5fd8cf309a5205b3dd6bfe95cc
2016-06-08 23:33:47 +00:00
Chet Haase
9392d40ac7 Test presubmit infrastructure
Annotating a single test to vet the presubmit infrastructure for TreeHugger

Change-Id: Iee8f4014d037d44c0700a596d8f51591a31ba649
2016-06-08 15:40:46 -07:00
Yuchao Zhou
571a4a97cd Update enable/disable code to reduce flakiness
Change-Id: I9d3f69ca583b365bb5f89cfe16adcd6e604614c6
2016-06-08 14:14:37 -07:00
Lorenzo Colitti
2f310da52e Merge changes Ic98e3bcb,Idb0c55fc,Ia8649061,I5e7e5a87 into nyc-mr1-dev am: 3e2bfbd135
am: 3feff1367b

Change-Id: I776625bbc557c747477db70235847dd8b3ab8baf
2016-06-08 06:44:24 +00:00
Lorenzo Colitti
3feff1367b Merge changes Ic98e3bcb,Idb0c55fc,Ia8649061,I5e7e5a87 into nyc-mr1-dev
am: 3e2bfbd135

Change-Id: I2305c4019f56896d741caa509df41416368e5642
2016-06-08 06:39:18 +00:00
TreeHugger Robot
3e2bfbd135 Merge changes Ic98e3bcb,Idb0c55fc,Ia8649061,I5e7e5a87 into nyc-mr1-dev
* changes:
  Give WakeupMessage the ability to transport an object as well.
  Don't treat the lingerExpired broadcast specially.
  Add a test for mobile data always on.
  Add a FakeSettingsProvider and use it in ConnectivityServiceTest.
2016-06-08 06:35:32 +00:00
Lorenzo Colitti
eab17da588 Give WakeupMessage the ability to transport an object as well.
Bug: 23113288
Change-Id: Ic98e3bcb3ea8b0b28a309bd647fb4178311c46a3
2016-06-08 14:11:52 +09:00
Sharvil Nanavati
a82473f813 Merge \\"Fix build break by adding missing parenthesis.\\" into nyc-mr1-dev am: f4f7c64c75
am: 591c8ece75

Change-Id: I08107d8f08a35b75a14b9ea5bb2a3cb5bab48551
2016-06-07 23:52:37 +00:00
Sharvil Nanavati
591c8ece75 Merge \"Fix build break by adding missing parenthesis.\" into nyc-mr1-dev
am: f4f7c64c75

Change-Id: Ie10bd4ea8d7345550fb4a42090320d31669321fa
2016-06-07 23:47:39 +00:00
Sharvil Nanavati
957abc8318 Fix build break by adding missing parenthesis.
Change-Id: Ia9a47e24b25e3093f19aeea297a86964c8f00722
2016-06-07 16:41:16 -07:00
Sharvil Nanavati
f0cd8d306b Merge \\"Fix flaky discoverable stress test.\\" into nyc-mr1-dev am: 9e67da47f3
am: 293b050778

Change-Id: Iab35267cb69596622a12e4c7e69573a8eea99fc3
2016-06-07 22:28:32 +00:00
Sharvil Nanavati
293b050778 Merge \"Fix flaky discoverable stress test.\" into nyc-mr1-dev
am: 9e67da47f3

Change-Id: I5583238b6de24571762c656253510b469cd810f1
2016-06-07 22:23:38 +00:00
Sharvil Nanavati
f6aebbe4bd Fix flaky discoverable stress test.
Bug: 28980767
Change-Id: I6858456f58118a3385b05d42361a5c9223ebbdc4
2016-06-07 15:01:49 -07:00
Seigo Nonaka
614c25a0a1 Merge "Introduce initial perf test for framework/base/core." 2016-06-06 05:10:34 +00:00
Seigo Nonaka
29b98b5204 Introduce initial perf test for framework/base/core.
Bug: 28980976
Change-Id: Ib2ccbad8d6657dcae08c2aafa9a63bcc52b88a04
2016-06-02 18:51:45 +09:00
Sharvil Nanavati
0e243c0cf3 Merge "Fix crash with intent-less actions" into nyc-dev am: ac2b44f502 am: 7a845c5283
am: da3950d2a2

* commit 'da3950d2a2413077acbb44b1e887bac11dc6c5f8':
  Clean up Bluetooth test code.

Change-Id: I906af814f219367a09deb269a935a91cccc07d0c
2016-05-31 21:15:31 +00:00
Adrian Roos
da3950d2a2 Merge "Fix crash with intent-less actions" into nyc-dev am: ac2b44f502
am: 7a845c5283

* commit '7a845c52834d00035ca92ec46d311aef3cd0835a':
  Clean up Bluetooth test code.

Change-Id: I8ff0ff77cc94caa1645f7d37aa6f5a6f5cf72c54
2016-05-31 21:08:54 +00:00
Sharvil Nanavati
6570340f71 Clean up Bluetooth test code.
Change-Id: I502b03df842c628c7b504e2a32a17bce6d25b4f8
2016-05-25 15:27:41 -07:00
Adam Lesinski
534881d8fa Merge "Improve performance of LocaleList with Resources" into nyc-dev am: bb26248bbb am: 5e106dea45
am: 9ed84d8612

* commit '9ed84d86120dd6487eacba503f45f6d147f05fbf':
  Improve performance of LocaleList with Resources

Change-Id: I7c1694545f9eee940ca7065f3ac5aee5e2a7b27c
2016-05-24 21:47:36 +00:00
Adam Lesinski
5e106dea45 Merge "Improve performance of LocaleList with Resources" into nyc-dev
am: bb26248bbb

* commit 'bb26248bbba6e4014ea89a97b86618b7289a5f29':
  Improve performance of LocaleList with Resources

Change-Id: Ic43a26915a28d71a967eb038331a0f3c31bdfe8f
2016-05-24 21:35:56 +00:00
Adam Lesinski
b61e405397 Improve performance of LocaleList with Resources
We allow each individual Resources object to select the best
Locale for the given APK. This allows one update to the configuration
instead of multiple updates, once the locale is chosen.

The Java locale is selected from the app context's locale.

Bug:28625993
Bug:27325465
Change-Id: I99e1e53f522e560f3b80bbd1e1c605f552dbdff0
2016-05-24 12:54:48 -07:00
Adrian Roos
4d10db7fdd Fix RemoteViewsTests
Change-Id: I99d1f3b5521e3efad419074fede7eaef5707216d
2016-05-23 21:33:54 +00:00
Adam Lesinski
6028e28986 Merge "Merge "Fix parsing of kernel wakelocks" into nyc-dev am: 6f0d399214 am: 7dd96663a0" into nyc-mr1-dev-plus-aosp
am: 768542e38d

* commit '768542e38d356bd18cb567dacc89c504d128ccd4':
  Fix parsing of kernel wakelocks

Change-Id: Ic5b48697830e96528cd87a579f0ee8a5ab665bf9
2016-05-20 17:43:40 +00:00
Adam Lesinski
fea0c3af7a Merge "Fix parsing of kernel wakelocks" into nyc-dev
am: 6f0d399214

* commit '6f0d3992149aa782450667ed750fe0c3cf8ee334':
  Fix parsing of kernel wakelocks

Change-Id: Ibc60849809b5553e820833437a9d2d47d065a38e
2016-05-20 17:32:42 +00:00
Adam Lesinski
acb5ac77a3 Merge "Fix parsing of kernel wakelocks" into nyc-dev am: 6f0d399214
am: 7dd96663a0

* commit '7dd96663a0c728b4913ed4146cc442336833a1ca':
  Fix parsing of kernel wakelocks

Change-Id: I312c22fdbee545a2f7991c320ee4d5eea73decba
2016-05-20 17:32:04 +00:00
Adam Lesinski
6f0d399214 Merge "Fix parsing of kernel wakelocks" into nyc-dev 2016-05-20 17:23:08 +00:00
Adam Lesinski
d84ad30ee6 Fix parsing of kernel wakelocks
We handled stale wakelocks (wakelocks that disappear from /d/wakeup_sources)
differently in previous version of Android. They would be set stale, but still be
updated with their previous counts (they would never disappear).

The method setStale has been replaced with endSample(), which is semantically different.
Once a SamplingTimer has endSample() called, it expects any future calls to update() to
be a new sample, meaning the entire amount passed to update() is included in the kernel
wakelock's total. Since stale wakelocks were never removed from the list, this would
increase by large amounts when nothing had actually changed.

This was exacerbated by the fact that there was a bug where the last wakelock in
/d/wakeup_sources was never parsed, so if the order ever changed, this "stale" wakelock
would suddenly re-appear and the entire amount reported would be charged to the wakelock,
instead of just the difference since the last update.

All this was exposed when we added support to handle wakelocks that would disappear and
reappear with smaller values, meaning the kernel had pruned them from its accounting and
reset them.

Bug:28601080
Change-Id: Ic96027f7d580dac5e20aa73d67e5cedac4ccabeb
2016-05-19 17:21:10 -07:00
Yohei Yukawa
af15c8bcae Merge "Move LocaleList to avoid layering violation." into nyc-dev am: 31884efd13 am: ddaf3f4681
am: bf4c8f730b

* commit 'bf4c8f730b167e5ee65ed7c59dfa1d7867b63fcc':
  Move LocaleList to avoid layering violation.

Change-Id: I78fee5269f7428e34b196573575784fc15cb1372
2016-05-18 02:25:10 +00:00
Yohei Yukawa
ddaf3f4681 Merge "Move LocaleList to avoid layering violation." into nyc-dev
am: 31884efd13

* commit '31884efd13b3ac60078edaa0b7e8a4b75d995538':
  Move LocaleList to avoid layering violation.

Change-Id: I9132fe456a8d79569c651dac0a0bce0153444767
2016-05-18 02:18:38 +00:00
Yohei Yukawa
23cbe85610 Move LocaleList to avoid layering violation.
Since LocaleList needs to depend on android.os.Parcelable, we cannot let
that class belong to "android.util" package, which causes layering
violation.

Bug: 28819696
Change-Id: Ia8de2ee9df3dd0a42b1fe84574439519b680fe18
2016-05-17 16:42:58 -07:00
Svetoslav Ganov
582ed22116 Merge "Make settings cahches generation mechanism robust." into nyc-dev am: b35301e421 am: d361bbd0db
am: 7cd6a970c0

* commit '7cd6a970c047c06c196cb351d00584180806351e':
  Make settings cahches generation mechanism robust.

Change-Id: I2181d6f48052e4ae3204e39bfb050387065a7fcc
2016-05-13 22:31:32 +00:00
Svetoslav Ganov
d361bbd0db Merge "Make settings cahches generation mechanism robust." into nyc-dev
am: b35301e421

* commit 'b35301e421bb08c28425c49ad46a277c96ccb411':
  Make settings cahches generation mechanism robust.

Change-Id: I59566be20a76084f409f0dd57c70337b60339c87
2016-05-13 22:26:29 +00:00
Svetoslav Ganov
04df738bcb Make settings cahches generation mechanism robust.
Settings is using a MemoryIntArray to communicate the settings table
version enabling apps to have up-to-date local caches. However, ashmem
allows an arbitrary process with a handle to the fd (even in read only
mode) to unpin the memory which can then be garbage collected. Here we
make this mechanism fault tolerant against bad apps unpinning the ashmem
region. First, we no longer unpin the ashmem on the client side and if
the ashmem region is purged and cannot be pinned we recreate it and
hook up again with the local app caches. The change also adds a test
that clients can only read while owner can read/write.

bug:28764789

Change-Id: I1ef79b4b21e976124b268c9126a55d614157059b
2016-05-13 15:14:14 -07:00
Felipe Leme
850ce012e7 Merge "Refactored NetworkPolicyManagerService mUidRules." into nyc-dev am: de66540fd3 am: 443c032e52
am: fd1ace40ec

* commit 'fd1ace40eccc468b5e5d33c29693bf66e1761d39':
  Refactored NetworkPolicyManagerService mUidRules.

Change-Id: I0b348dc47666d563d368d82aa9633dcfe56992a0
2016-05-06 22:03:18 +00:00
Felipe Leme
443c032e52 Merge "Refactored NetworkPolicyManagerService mUidRules." into nyc-dev
am: de66540fd3

* commit 'de66540fd3f73937c3cfbe1d50e575aa69acc474':
  Refactored NetworkPolicyManagerService mUidRules.

Change-Id: I25d2520eafcf8c45b80b94908a3b5bfa04315f76
2016-05-06 21:53:39 +00:00
Felipe Leme
46c4fc357c Refactored NetworkPolicyManagerService mUidRules.
NetworkPolicyManagerService (NMPS) keeps an internal list of uid
rules (mUidRules) for network restrictions, and when these rules
changes it needs to notify external listeners (such as
ConnectivityService / CS).

Prior to Android N, both Data Saver mode (the feature previously known
as "Restrict Baground Data") and Battery Save mode used the same set of
firewall rules to implement their restrictions: when Battery Saver mode
NPMS would mark all networks as metered and set the proper firewall
rules externally.

Recently, these 2 modes were split in 2 distinct firewall rules and
NMPS.updateRuleForRestrictBackgroundLocked() was changed to update
the mUidRules logic based on the Data Saver firewall (since the Battery
Saver firewall changes are handled externally, on
updateRuleForRestrictPowerLocked()). As such, CS was not notified when
the power-related changes were made, which would cause apps to get a
state of CONNECTED / CONNECTED when querying its active connection.

This change refactores the mUidRules to use bitmasks, in preparation for
another change that will fix the issue.

It also fixes a minor bug that was preventing removed packages to be
removed from the whitelist.

BUG: 28521946
Change-Id: I9f0e1509a6192cad403f740c1cd76a6b7dab7d26
2016-05-06 17:58:40 +00:00
Svet Ganov
db2174dcb8 Merge "Ensure local settings caches are not stale" into nyc-dev am: f71d7fe am: d4bc15b
am: 0010741

* commit '0010741818127e6c9449fc49490f0bad14a76240':
  Ensure local settings caches are not stale

Change-Id: I26c4f1f72eda3b2ebfb3ca6e086a0381d357471c
2016-04-26 18:54:37 +00:00
Svet Ganov
d4bc15b66b Merge "Ensure local settings caches are not stale" into nyc-dev
am: f71d7fe

* commit 'f71d7feef22db9e0cab2f32edc7440aedb86fdfe':
  Ensure local settings caches are not stale

Change-Id: I356b9ad0b6dc1e91bfad140de1b9fc79ab6efef3
2016-04-26 18:47:52 +00:00
Svetoslav Ganov
f71d7feef2 Merge "Ensure local settings caches are not stale" into nyc-dev 2016-04-26 18:36:28 +00:00
Svet Ganov
53a441ca8e Ensure local settings caches are not stale
We used the system proterties as a shared memory mechanism
to propagate information to local settings caches when the
content has changed and the cache should be cleared. The
system properties are unfortunately updated asynchronously
leading to cases where clients may read stale data.

This change adds a simple int array data structure backed
by shared memory which guarantees individual values are
atomically read and updated without memory tear. Multi-
index opearations are not synchronized between each other.

The settings provider is using the new data structure to
propagate the settings generation which drives when caches
are purged.

We have a single memory array keeping the generation for
different settings tables per user. Since memory array is
not a compact data structure and the user space exceeds
the memory array size we use an in-memory map from keys
to indices in the memory array where the generation id of
a key is stored. A key is derived by the setting type in
the 4 most significant bits and the user id in the 28 least
significant bits.

The mapping from a key to an index is cleared if the user is
removed and the corresponding index in the memory arry is
reset to make it available for other users. The size of the
memory array is derived from the max user count that can be
created at the same time.

bug:18826179

Change-Id: I64009cc5105309ef9aa83aba90b82afc8ad8c659
2016-04-26 11:31:55 -07:00
Adam Lesinski
042799c06d Merge "BatteryStats: Fix up semantics of SamplingTimer" into nyc-dev am: 1a8a717 am: 8414b87
am: 34e3a5f

* commit '34e3a5f72daa73f69956aace6583370d82902171':
  BatteryStats: Fix up semantics of SamplingTimer

Change-Id: I08d997bc9c0fc96c54eee8dda69e3c62005b38e5
2016-04-23 00:29:37 +00:00
Adam Lesinski
8414b87f6c Merge "BatteryStats: Fix up semantics of SamplingTimer" into nyc-dev
am: 1a8a717

* commit '1a8a717ab517e7b5ace00bb4d3370e0f3a2677b2':
  BatteryStats: Fix up semantics of SamplingTimer

Change-Id: Iaab0fd5bf59399a3ef2bfe2eb3904ec13691e186
2016-04-23 00:23:56 +00:00
Adam Lesinski
757c6eacc8 BatteryStats: Fix up semantics of SamplingTimer
SamplingTimer has been losing some data, as well as not correctly handling
entries that have gone away and come back with less data (reset).

This change correctly ends a SamplingTimer sample by adding the accumulated amount
to the total, then reseting the running counter to accept new values.

This is also triggered automatically when the incoming data is less than what is currently
recorded.

Bug:25695597
Change-Id: I6b540906e6be527578d1003485384a75ba211b52
2016-04-22 14:48:18 -07:00
Adam Lesinski
9369eb8802 Merge "Record in progress count when parceling Timer" into nyc-dev am: 752434a am: 7c7ee79
am: 27d36bb

* commit '27d36bb9421c6a05990820919f90989a0d92323a':
  Record in progress count when parceling Timer

Change-Id: I364905f0be07562b83695fea09c0ca154e0171f6
2016-04-20 05:26:21 +00:00
Adam Lesinski
27d36bb942 Merge "Record in progress count when parceling Timer" into nyc-dev am: 752434a
am: 7c7ee79

* commit '7c7ee79dc93ad12b2b5535e9727eef30ce1a3693':
  Record in progress count when parceling Timer

Change-Id: I7c4c92d2048df9bab52596bd3c9717fac9a056fb
2016-04-20 05:20:26 +00:00