Commit Graph

8023 Commits

Author SHA1 Message Date
Michael Wright
8036799d2e Enable Always On mode by default.
Also, add a config value for always on display availability.

Test: runtest -x tests/src/com/android/systemui/doze
Change-Id: Id5e0136a5bed0eac78ad48147b0bef8311b06986
2017-05-10 21:47:47 +01:00
Ahmed ElArabawy
2c01ffd14b Merge "power hal: Use power HAL API 1.1" 2017-05-10 20:37:48 +00:00
Hugo Benichi
4d147ff918 Merge "NetworkStatsFactory: no double looping on stats + stacked interfaces" am: 1683224416 am: cd6537edb5 am: b323e61584
am: 7b96660a43

Change-Id: I175ffaae545d88b7bc39ab01ab3a811af7e03d60
2017-05-10 09:30:01 +00:00
Hugo Benichi
7b96660a43 Merge "NetworkStatsFactory: no double looping on stats + stacked interfaces" am: 1683224416 am: cd6537edb5
am: b323e61584

Change-Id: I0312882bb8885aaa65f99a445fd0554d6ac054b3
2017-05-10 09:20:04 +00:00
Hugo Benichi
87ae16f017 Merge "Merge "NetworkStatsFactory: fix double accounting on IPv6 only networks" am: ba666e0621 am: 76dc14ec88 am: 1697d48faf" into oc-dev-plus-aosp
am: f8dbdba5a2

Change-Id: Ie09f2b4e04749e61923781f4b13e796054108fad
2017-05-10 02:06:06 +00:00
Android Build Merger (Role)
a4f91a277b Merge "Merge "AOD: Disable not-yet-ready always-on feature" into oc-dev am: 62643dddc7" into oc-dev-plus-aosp 2017-05-10 00:47:20 +00:00
Adrian Roos
2e3ef5bdfd Merge "AOD: Disable not-yet-ready always-on feature" into oc-dev
am: 62643dddc7

Change-Id: I7d7ae07607181559576d4dbd53ff7ef441c6ded3
2017-05-10 00:45:37 +00:00
Hugo Benichi
32a2d02a65 Merge "NetworkStatsFactory: fix double accounting on IPv6 only networks" am: ba666e0621 am: 76dc14ec88
am: 1697d48faf

Change-Id: I7dbfe3c96678e2325eb533f31523ad10d861ad02
2017-05-10 00:40:28 +00:00
TreeHugger Robot
62643dddc7 Merge "AOD: Disable not-yet-ready always-on feature" into oc-dev 2017-05-10 00:32:38 +00:00
Hugo Benichi
00a16e077a NetworkStatsFactory: no double looping on stats + stacked interfaces
This patch uses the associative structure of the stacked/base interface
collection to avoid the two nested for loops over stacked/base
interfaces and all stats entries when correcting 464xlat traffic stats.

Consequently the list of stats entries is iterated only once.

Test: runtest -x frameworks/base/../NetworkStatsFactoryTest.java
Bug: 33681750
Change-Id: I84ae997fb693b909f431764697627b9957131732
2017-05-10 09:14:14 +09:00
Ahmed ElArabawy
0a4e11480b power hal: Use power HAL API 1.1
Switch framework to use Power HAL 1.1

Many subsystems (e.g.wifi) could be living on an
independent power island (sourced from VBatt directly)
and might even have their own dedicated XTAL to source
their clocks. Since these SOCs are capable of
autonomously operating (while the platform is in one
of the sleep states), they are still drawing power
from the VBatt. Hence it is critical to understand
the  (SOC) level low power statistics as well when
the battery level changes and be able to find any
correlation in event of unexpected battery drain.

This commit directs framework to use Power HAL 1.1

Bug: 29339696
Test: Manual
Change-Id: I0d779365536e84de5ec50b97d50f0162738383da
Signed-off-by: Ahmed ElArabawy <arabawy@google.com>
2017-05-09 14:35:22 -07:00
Adrian Roos
763256163a AOD: Disable not-yet-ready always-on feature
Fixes: 37982136
Test: Verify Ambient Display options are gone from SysuiTuner on userdebug builds
Merged-In: I0b20ba7c352bac7c278f659f0e29496cc342d381
Change-Id: Id61e5fa8f3c42ea17e6e878ec1c8a2555fe93320
2017-05-09 12:31:26 -07:00
Bookatz
8b46904e73 Merge "Add BLE results counter to batterystats" into oc-dev am: 7080fa5282
am: eb5a068cbc

Change-Id: I2e3bb04a7283d9aa64181e221462cff7b40839af
2017-05-09 17:48:49 +00:00
Bookatz
eb5a068cbc Merge "Add BLE results counter to batterystats" into oc-dev
am: 7080fa5282

Change-Id: I8e485d5a97d46f6787b5b32c17ab5b85463f2653
2017-05-09 17:08:03 +00:00
TreeHugger Robot
7080fa5282 Merge "Add BLE results counter to batterystats" into oc-dev 2017-05-09 16:03:27 +00:00
TreeHugger Robot
5c4f60a06b Merge "Fix cannot share text from twitter to managed profile" 2017-05-09 15:23:21 +00:00
Hugo Benichi
e1bb3a14d1 NetworkStatsFactory: fix double accounting on IPv6 only networks
For 464xlat scenarios on IPv6 networks, the clatd interface setup
introduces double counting of apps ipv4 traffic. NetworkStatsFactory was
accounting for this on the tx path, but not on the rx path. Also it did
not accounted for the 20 bytes added by the IPv6 header.

This patch subtract correctly the rx and tx traffic from the root uid on
the underlying interface, and also adds correctly the 20 bytes cost per
packet on the stacked interface for 464xlat traffic.

Test: added several new unit tests, based on synthetic data and real
      data also.
Bug: 33681750
Change-Id: I2675643b220acbc6110179fa937d4c313b6f5e32
2017-05-09 22:46:14 +09:00
Philip P. Moltmann
7e6ef30452 Merge changes I7c2c9411,Ibc72c84d,Ib3968644 into oc-dev am: f512575c68
am: 169989822e

Change-Id: I330cd6e1601584e3903a26b27047aae2e7b7c711
2017-05-09 02:18:52 +00:00
Philip P. Moltmann
169989822e Merge changes I7c2c9411,Ibc72c84d,Ib3968644 into oc-dev
am: f512575c68

Change-Id: I590a658c92ad271c7b4f18f5768c1a4e581ffe94
2017-05-09 02:05:24 +00:00
TreeHugger Robot
f512575c68 Merge changes I7c2c9411,Ibc72c84d,Ib3968644 into oc-dev
* changes:
  No need to deal with windowTokens
  Persistable accessibility ID from ContextWrappers
  Check callbacks when operting on UI
2017-05-09 01:49:58 +00:00
Selim Cinek
afc4f9313c Merge changes from topic 'background_inflation' into oc-dev am: 03fbdbe6ff
am: cc360f9b69

Change-Id: I456f81ff6300792e8639733d0115d878683d1694
2017-05-08 22:30:48 +00:00
Selim Cinek
cc360f9b69 Merge changes from topic 'background_inflation' into oc-dev
am: 03fbdbe6ff

Change-Id: I1848e1f5a1ec5f9785872690b4d653afd590399f
2017-05-08 21:37:31 +00:00
Selim Cinek
03fbdbe6ff Merge changes from topic 'background_inflation' into oc-dev
* changes:
  Fixed the contrast for low-priority notifications
  Moving Row inflation to the background too
  Moving the inflation to the background
2017-05-08 21:11:37 +00:00
Philip P. Moltmann
134cee27b8 No need to deal with windowTokens
we have a link to the client which is enough to find the views.

Also there was some cases where the windowToken was not updated
properly. This is moot now.

Also: Read a array of views from the client to speed up the
client<->AutofillManager communication.

Fixes: 38070352
Test: CtsAutoFillServiceTestCases
      1 Started autofill, saw fill UI
      2 Home button
      3 Kill activity in background
      4 Recents -> back to activity
      5 Saw fill UI restored
Change-Id: I7c2c9411204fa5d65867efae9b7296399121c3a2
2017-05-08 14:02:58 -07:00
Jeff Sharkey
547a7ec9db Merge "Defeat @Nullable String[] with empty list." into oc-dev am: 5a421ad0ef
am: 22343c42d2

Change-Id: Id56528c56ec4520591c00b53faf6b4de7380b891
2017-05-07 17:56:40 +00:00
Jeff Sharkey
22343c42d2 Merge "Defeat @Nullable String[] with empty list." into oc-dev
am: 5a421ad0ef

Change-Id: Iad313a998a159049cfc55fff978b47be93f5e834
2017-05-07 17:49:39 +00:00
Jeff Sharkey
5a421ad0ef Merge "Defeat @Nullable String[] with empty list." into oc-dev 2017-05-07 17:40:32 +00:00
Jeff Sharkey
2abd66c4ff Defeat @Nullable String[] with empty list.
Test: builds, boots
Bug: 37577123
Change-Id: I6bf1af565398c30aecc0939a23846c0f85c13ffe
2017-05-05 15:26:25 -06:00
Yohei Yukawa
6226d4121d Merge "Avoid unnecessary ULocale.addLikelySubtags()" into oc-dev am: 5163d541a2
am: c43b9f27f2

Change-Id: Id5ff1326f1800219a2deeaef97b7d2b400ceefc6
2017-05-05 04:42:34 +00:00
Yohei Yukawa
c43b9f27f2 Merge "Avoid unnecessary ULocale.addLikelySubtags()" into oc-dev
am: 5163d541a2

Change-Id: I976fea1146283927b789e372425ff91942f48754
2017-05-05 04:35:16 +00:00
Yohei Yukawa
dce7df3ec2 Avoid unnecessary ULocale.addLikelySubtags()
This CL gets rid of unnecessary operations from
LocaleUtils.filterByLanguage() to speed it up, especially for the case
where there is an IME that has many subtypes.

ULocale.addLikelySubtags(ULocale) is known to be slow. Given an IME
that has N IME subtypes, LocaleUtils.filterByLanguage() calls it no
less than N times even when the only one system language is selected.
This has contributed to device boot time (Bug 32343335) time and user
switching time (Bug 28750507) since Android N where IME support
started taking multi-locale into account.

With this CL, LocaleUtils.filterByLanguage() no longer calls it
for a subtype unless its language part of the locale matches one of
user-selected system locales.

The only assumption we made here is

 for any Locale objects l1 and l2
   TextUtils.equals(l1.getLanguage(), l2.getLanguage())
 and
   TextUtils.equals(ul1.getLanguage(), ul2.getLanguage())
 are equivalent, where
   ul1 = ULocale.addLikelySubtags(ULocale.forLocale(l1)) and
   ul2 = ULocale.addLikelySubtags(ULocale.forLocale(l2))

This should be reasonable assumption, at least for locales we want to
care about for IMEs. Under this assumption there is no behavior
change at all.

Test: bit FrameworksCoreTests:com.android.internal.inputmethod.LocaleUtilsTest
Bug: 37647204
Change-Id: Ic96900fcaf3db8b7046a50b3fe6ad65aceada369
2017-05-04 16:28:18 -07:00
Selim Cinek
ac5f02749a Fixed the contrast for low-priority notifications
The low priority notifications had their contrast calculated
against the white background and weren't satisfying
our contrast requirements.
This also aligns the case where the app had no colors better,
and ensures that it's actually using the secondary text
color there.

Test: existing tests pass
Change-Id: Ic11e9d06783e60998f35e0eb7f6f29fb1d86c7df
Fixes: 37444266
2017-05-04 15:30:33 -07:00
Tony Mak
96d78f5f62 Fix cannot share text from twitter to managed profile
Cross profile intent must be implicit, we should also clear the package
and component of the inner intent in chooser intent.

Test: bit FrameworksCoreTests:com.android.internal.app.IntentForwarderActivityTest
Test: can share tweet to work profile
Test: can share web link from personal to work profile and vice versa

Fix: 37767313

Change-Id: I7cbea3525def0ff029d9b5c2953117b4cab6f28b
2017-05-04 18:12:24 +01:00
Todd Kennedy
2b33116477 Merge "Optionally let the instant app into disambig" into oc-dev am: 1f1d60c5a1
am: 74e39de950

Change-Id: I4e48ba4c05d764322ad2e953430b8b02c7c09712
2017-05-03 02:23:03 +00:00
Todd Kennedy
74e39de950 Merge "Optionally let the instant app into disambig" into oc-dev
am: 1f1d60c5a1

Change-Id: I78725fadab5bb7222f9d4528d21b22d881df45a1
2017-05-03 02:12:28 +00:00
Todd Kennedy
72dc2fa6ad Optionally let the instant app into disambig
When a user clicks "view on web", it's not assumed this is meant to be
forever. In this case, we will adjust the instant app's verification
status so that the instant isn't automatically run.

Change-Id: I246de901dafb23159a064d205fdb614d657a99dc
Fixes: 37686922
Test: Manual
Test: 1) Install instant app
Test: 2) Set to always-ask -- adb shell pm set-app-link package.name always-ask
Test: 3) Notice that we get a disambig w/ the instant app and chrome as options
Test: 4) Set to never -- adb shell pm set-app-link package.name never
Test: 5) Notice that we don't get the instant app
2017-05-02 17:03:36 -07:00
TreeHugger Robot
4b64614e6e Merge "Upstream update" 2017-05-02 22:47:05 +00:00
Lucas Dupin
425d9c5ae6 Upstream update
Pulling changes from support library

Test: non-applicable
Change-Id: Ibacca48ad78a39739793b6400b7fcb19447d26db
2017-05-02 10:33:00 -07:00
Vladislav Kaznacheev
8386225861 Merge "Fix submenu position when showing with Gravity.END" into oc-dev am: 883af0766a
am: 1ae2909045

Change-Id: I178f0af13e2df05acf0918e492a9b8a44d1107e6
2017-05-02 15:58:35 +00:00
Vladislav Kaznacheev
1ae2909045 Merge "Fix submenu position when showing with Gravity.END" into oc-dev
am: 883af0766a

Change-Id: Ib2799189f34cb8fc2baeb19a6a4a005eb13b64d1
2017-05-02 15:48:11 +00:00
TreeHugger Robot
883af0766a Merge "Fix submenu position when showing with Gravity.END" into oc-dev 2017-05-02 15:40:42 +00:00
TreeHugger Robot
eff8ed36b4 Merge "Add a time-out for connecting to SystemServer, and WebView, zygotes." 2017-05-02 10:00:27 +00:00
Dianne Hackborn
8a40a4ca27 Merge "Work on issue #36891897: Need to ensure foreground services can't..." into oc-dev am: f1a4b50739
am: a766f1d1ec

Change-Id: I82c6b62af3d4eddbd4e97c83b2bb7d4a1657c63d
2017-04-30 17:44:10 +00:00
Dianne Hackborn
a766f1d1ec Merge "Work on issue #36891897: Need to ensure foreground services can't..." into oc-dev
am: f1a4b50739

Change-Id: I242303b9dc50a8a69525d26a41cec6c09e361d17
2017-04-30 17:34:21 +00:00
Dianne Hackborn
83b40f69be Work on issue #36891897: Need to ensure foreground services can't...
...hide themselves

The activity manager now keeps track of all apps that are running
foreground services and builds a notification showing them to the
user.  We ensure they are shown to the user for at least 30 seconds
(configurable).  If foreground services are executed while the
screen is off, their apps will be shown to the user for at least
30 seconds after the screen turns back on.

While doing this I am also adding a new process state to distinguish
between "important background" stuff that should bypass bg check vs.
ones that don't.  By default, these now no longer bypass bg check,
which is really the expected (and documented) behavior.  There is a
new bind flag to allow them to bypass bg check, which is currently
only used by the IME.

Also add some new job scheduler commands that will be used to
write new tests cases for jobs timing out.

Bug: 36891897

Test: manual

Change-Id: Ied3f7b56444254513fd776f06b88bc0e54704958
2017-04-29 19:41:12 -07:00
Vladislav Kaznacheev
618cfc122d Fix submenu position when showing with Gravity.END
Bug: 37792927
Test: manual
Change-Id: I2a1033cb5b78465188958d8f24128d0fe082587f
2017-04-28 17:03:30 -07:00
Bookatz
956f36bfe2 Add BLE results counter to batterystats
Batterystats provides an API to count the number of BLE scan results.

Bug: 37720787
Test: runtest -x frameworks/base/core/tests/coretests/src/com/android/internal/os/BatteryStatsTests.java
Change-Id: Idcb7494b39e88dcbfbb3da1ebe90b8a2f8f4d55c
2017-04-28 11:03:38 -07:00
Glenn Kasten
20137dc148 USB audio: increase protection of member fields
Replace public by private or package access in field declarations,
and add getters and setters as needed.

Test: compiles OK
Change-Id: Ief3fffb6a21d2e4d05153839f444617ea5e70846
2017-04-28 09:13:14 -07:00
Gustav Sennton
f0c52b5e9c Add a time-out for connecting to SystemServer, and WebView, zygotes.
We wait for both the system server and the WebView zygotes, using
infinite loops.
This CL adds a time-out to both these loops.

Bug: 37654329
Test: Boot device, disable Chrome, enable Chrome, then start a WebView
app.

Change-Id: I74397de3caf2b02ee403195aeb3beb2320a2240d
2017-04-28 15:05:12 +01:00
Selim Cinek
ae1d6ee93f Merge changes from topic 'music_extraction' into oc-dev
am: e44061f9e7

Change-Id: I8c5a58540be4e96aea4c48a8365f512d508ff1c5
2017-04-28 01:20:22 +00:00