Commit Graph

1243 Commits

Author SHA1 Message Date
Adam Lesinski
89aea239cd Merge \"Update DisplayMetrics when resizing\" into nyc-mr1-dev
am: 038084e61c

Change-Id: I82318bbd8dbf03ab4bc01533b8c5650306cff0aa
2016-06-24 22:11:14 +00:00
Adam Lesinski
8e8d23214a Update DisplayMetrics when resizing
Previously the DisplayMetrics passed to a new ResourcesImpl
object would be generated from the default DisplayAdjustments.
We now use the correct DisplayAdjustments for the ResourcesImpl
and make sure to update them for things like rotation changes.

Bug:29619314
Change-Id: If2ba0d7670a4554dcd3fde9766e2337f20a191fd
2016-06-24 13:13:19 -07: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
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
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
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
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
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
50e1291340 Merge "Record in progress count when parceling Timer" into nyc-dev
am: 752434a

* commit '752434a0ff54ac30b7701292b66361e64b2ae5a0':
  Record in progress count when parceling Timer

Change-Id: Icc7e8312df00bd22f0e5433e15fc65d2ad705db4
2016-04-20 01:31:46 +00:00
Adam Lesinski
752434a0ff Merge "Record in progress count when parceling Timer" into nyc-dev 2016-04-20 01:22:37 +00:00
Adam Lesinski
98f0d4692c Record in progress count when parceling Timer
The total time is computed before parceling, but the total count is not.

Bug:27747854
Change-Id: If3afdca9605f74d96a54fb9df17f6df761b99e55
2016-04-19 17:21:40 -07:00
Seigo Nonaka
c94fd1664e Merge "Delete emojis before and after ZWJ at the same time." into nyc-dev
am: 7ecd767

* commit '7ecd7671b75b2ae7c4d20928722b4a1d41bd62ff':
  Delete emojis before and after ZWJ at the same time.

Change-Id: If877cde7549f0bd0e56c7cbd707e360c8df012fd
2016-04-19 18:36:15 +00:00
Raph Levien
7ecd7671b7 Merge "Delete emojis before and after ZWJ at the same time." into nyc-dev 2016-04-19 18:31:05 +00:00
Jeff Sharkey
4dc65d31a1 Merge "Unlock should always wait for pending PRE_BOOT." into nyc-dev
am: 89fa73f

* commit '89fa73fd7abe0f87634d2914163a8fc79ba2f738':
  Unlock should always wait for pending PRE_BOOT.

Change-Id: I0043da18fabef2c5c916a2e5562d9e613c2b057c
2016-04-19 17:16:25 +00:00
Seigo Nonaka
3675d3cd84 Delete emojis before and after ZWJ at the same time.
Vendor may want to introduce their own ZWJ emoji sequence. To delete
them by one back space as the same behavior of Unicode emoji sequence,
use all emoji as the zwj emoji.

Bug: 28248662
Change-Id: I572dad42ee108476962d4b3fe9f3a6019cb50098
2016-04-19 18:54:50 +09:00
Jeff Sharkey
84a4c971c4 Unlock should always wait for pending PRE_BOOT.
While processing an unlock request, we might go async to handle
long-running operations like dispatching PRE_BOOT_COMPLETED.  This
change ensures that all unlock requests for a particular user wait
in line behind any pending async operations.

Without this CL, any subsequent unlock requests would immediately
return successful, even though PRE_BOOT_COMPLETED events were still
being processed.

Bug: 28240584
Change-Id: I307d6aaebfb8f38028f3666a2e19e4399b7cf3a7
2016-04-18 15:38:35 -06:00
Joe Onorato
f35f061c50 Merge "Add some tests for procstats, and fix some bugs that the tests uncovered." into nyc-dev
am: 5dc3c67

* commit '5dc3c674a2635179d17e96af8fb248142e03b87e':
  Add some tests for procstats, and fix some bugs that the tests uncovered.

Change-Id: I53ee3334f58db4a0904370fc4f2f1b6b29365020
2016-04-12 22:22:52 +00:00
Joe Onorato
65adfeecd2 Add some tests for procstats, and fix some bugs that the tests uncovered.
Bug: 27045736
Change-Id: Ia910730c5a3a899c89aa63dd7ab48be62cf9cfef
2016-04-12 13:13:41 -07:00
Siyamed Sinir
cda996cff8 Merge "Exclude unicode space characters from autoLink URL patterns" into nyc-dev
am: 4b92594

* commit '4b92594857ce52f96252f43c776f3ed31f0ebdfb':
  Exclude unicode space characters from autoLink URL patterns

Change-Id: Ie8c41292ab33ed50cd41a62eaa98ca7f1a06db14
2016-04-12 00:43:08 +00:00
Siyamed Sinir
4b92594857 Merge "Exclude unicode space characters from autoLink URL patterns" into nyc-dev 2016-04-12 00:35:29 +00:00
Yohei Yukawa
ddee2875c1 Merge "Shift+Meta+Space should reverse-rotate subtypes." into nyc-dev
am: 270fe5d

* commit '270fe5dbe49b5619ac87ebd50cdececd699fc0ad':
  Shift+Meta+Space should reverse-rotate subtypes.

Change-Id: I8d0bd25545c6892f2788194350e290e6f8d9eb4c
2016-04-11 05:32:05 +00:00
Yohei Yukawa
d39ae85482 Shift+Meta+Space should reverse-rotate subtypes.
This is a follow up CL to my previous CL [1], which added a new key
binding Meta+Space to rotate enabled IME subtypes.  With this CL,
Shift+Meta+Space starts reverse-rotating enabled IME subtypes as
originally planed.

 [1]: I4005692215edfcf8bed3e86b1e07000148f986f5
      ae61f7118a

Bug: 25753404
Bug: 28103839
Change-Id: I3694edd80be6dfe18b90360e24ae4d451b331928
2016-04-10 20:28:40 -07:00
Adam Lesinski
968e6e940a Merge "Remove tests that have been moved to CTS" into nyc-dev
am: 41c1bb8

* commit '41c1bb8f4a5a1f2f0a23d6cece525eaea50f57b3':
  Remove tests that have been moved to CTS

Change-Id: I39012b182d637d37fccafbc13677089885dcbcdb
2016-04-07 17:08:33 +00:00
Adam Lesinski
41c1bb8f4a Merge "Remove tests that have been moved to CTS" into nyc-dev 2016-04-07 17:04:13 +00:00
Keisuke Kuroyanagi
240c23b534 Merge "Rewrite SuggestionsPopupWindowTest using espresso." into nyc-dev
am: d119ab9

* commit 'd119ab94c0d55c3077b1a7c8ca6a54baf6d7087b':
  Rewrite SuggestionsPopupWindowTest using espresso.

Change-Id: I5dca34e91ee05a1cc3cea3f5fa016df675266cb5
2016-04-07 04:37:50 +00:00
Keisuke Kuroyanagi
d119ab94c0 Merge "Rewrite SuggestionsPopupWindowTest using espresso." into nyc-dev 2016-04-07 04:33:11 +00:00
Adam Lesinski
04518f8e9f Remove tests that have been moved to CTS
ag/906284

Change-Id: I9e5da9239a62dbc85a1b22f8fe8876da65675d9a
2016-04-06 17:47:10 -07:00
Keisuke Kuroyanagi
31eb74fb2b Rewrite SuggestionsPopupWindowTest using espresso.
- Rewrite existing test about text appearance.
- Add new tests for suggestions popup.

Bug: 25904136
Bug: 27765262
Change-Id: I12e522436a83fa264cd22176d054877eec411708
2016-04-06 19:37:46 +09:00
Siyamed Sinir
911c2694e2 Exclude unicode space characters from autoLink URL patterns
Excludes the following space characters from autoLink URL patterns:
\u00A0: no-break space
\u2000: en quad
\u2001: em quad
\u2002: en space
\u2003: em space
\u2004: three-per-em space
\u2005: four-per-em space
\u2006: six-per-em space
\u2007: figure space
\u2008: punctuation space
\u2009: thin space
\u200A: hair space
\u2028: line separator
\u2029: paragraph separator
\u202F: narrow no-break space
\u3000: ideographic space

Bug: 28020781
Change-Id: Ie6df818dc4d33dfee6ee54432a2231cca51ec423
2016-04-05 16:33:58 -07:00
Jeremy Joslin
7acd105411 Merge "Have the NetworkScoreService bind to the scorer." into nyc-dev
am: b770ed1

* commit 'b770ed132813356c2b1548b0a98c1edb565c7340':
  Have the NetworkScoreService bind to the scorer.

Change-Id: I319344d3362068624b4f3bda7f1cf1d563507115
2016-04-05 23:25:18 +00:00
Philip P. Moltmann
c48311f0eb Merge "We only have one mock service." into nyc-dev
am: c05a7a0

* commit 'c05a7a04c22c836c49ea0e605247c0f35799a3dc':
  We only have one mock service.

Change-Id: I6c3748cb83103be7a50cff528d97607e73de7ef0
2016-04-05 23:25:14 +00:00
Jeremy Joslin
b770ed1328 Merge "Have the NetworkScoreService bind to the scorer." into nyc-dev 2016-04-05 22:27:11 +00:00
Philip P. Moltmann
f4eadc5c53 We only have one mock service.
Fixes: 28024464
Change-Id: I1392704c4fdb9e7c3a4b1540131af8a14359c8f4
2016-04-05 15:16:54 -07:00
Jeremy Joslin
dd251ef495 Have the NetworkScoreService bind to the scorer.
If the current active scorer provides a service that can handle the
android.net.scoring.SCORE_NETWORKS action then the NetworkScoreService
will bind to that service to keep the scorer alive. If no service is
discovered then no attempt to bind will be made.

BUG: 27612145
Change-Id: I3f6ed0cbd83e658f1533c3e37b0cac2692c01761
2016-04-04 18:13:29 -07:00
Keisuke Kuroyanagi
3620738bf9 Merge "Make TextViewActivityTest stable by sleeping between clicks." into nyc-dev
am: 75aee0a

* commit '75aee0a681a763b8de67cb078ca3e520f65c8efe':
  Make TextViewActivityTest stable by sleeping between clicks.

Change-Id: I089fe9b89c84b1021bca57a25be6d73ba6437f98
2016-04-04 03:46:35 +00:00
Keisuke Kuroyanagi
75aee0a681 Merge "Make TextViewActivityTest stable by sleeping between clicks." into nyc-dev 2016-04-04 03:39:20 +00:00
Keisuke Kuroyanagi
51ec6d9789 Merge "Make hasTransientState be true only if user created selection is active." into nyc-dev
am: fc1d11e

* commit 'fc1d11ed9dc4d25a939e5187f32fe9eb107e942c':
  Make hasTransientState be true only if user created selection is active.

Change-Id: Ic28caa1dea935da7b6408282fb0266c889c29050
2016-04-04 03:20:47 +00:00
Keisuke Kuroyanagi
fc1d11ed9d Merge "Make hasTransientState be true only if user created selection is active." into nyc-dev 2016-04-04 03:12:32 +00:00
Clara Bayarri
ceeab499ac Merge "Remove unused import for KeyboardShortcutGroup" into nyc-dev
am: 032a76f

* commit '032a76f94b457d255ebc0895bc1d8f3c0b6d8e31':
  Remove unused import for KeyboardShortcutGroup

Change-Id: Id69c4c923a3456857d73a2c21a27be962378bd12
2016-04-01 16:27:01 +00:00
Clara Bayarri
89203de878 Remove unused import for KeyboardShortcutGroup
Left it in accidentally when removing default method.

Change-Id: I6af0712624ffaefff4cb4ad2a9e5a86d7104d2e7
2016-04-01 14:40:34 +01:00
Keisuke Kuroyanagi
5f318b6285 Make TextViewActivityTest stable by sleeping between clicks.
Bug: 27893257
Change-Id: I2eaaa38b4af9333a46a8702098b4ec0806def538
2016-04-01 19:16:31 +09:00
Keisuke Kuroyanagi
183fd5071e Make hasTransientState be true only if user created selection is active.
Previously, hasTransientState returned true even when TextView has a
selection that hasn't been created by the user. This unnecessarily
prevents the TextView from being recycled.
This issue was introduced by Ib454b0fbbc2c2f8d198, which fixes that
setHasTransientState(true) is not always coupled with
setHasTransientState(false).

With this CL:
hasTransientState will get true when selection action mode is started.
hasTransientState will get false when selection is removed.
Note that hasTransientState intentionally continues to be true when
selection action mode is terminated with preserving selection.

Bug: 27913323
Change-Id: I960ddfd7221caeb676c23926af06a8a415dec288
2016-04-01 15:00:53 +09:00
Ying Wang
c2f612e048 Merge commit '1a510a3c5ce1a7d8ef9817ad7da4b06b9844383f' into manual_merge_1a510a3
Change-Id: I84953dc077a5dfea1290b952e2de73f9a6d34118
2016-03-31 10:55:46 -07:00
Jeff Sharkey
294163e833 Merge "Fix DownloadManager tests." into nyc-dev
am: 4938d6e

* commit '4938d6e161733b69a291d2ddf16d25efb41030cb':
  Fix DownloadManager tests.

Change-Id: I306883251d72e655a361a30217bf825e0fe8beea
2016-03-31 02:45:45 +00:00
Jeff Sharkey
4938d6e161 Merge "Fix DownloadManager tests." into nyc-dev 2016-03-31 02:43:21 +00:00