Commit Graph

7788 Commits

Author SHA1 Message Date
TreeHugger Robot
648e127fcb Merge "Changed alert window notifications to use single channel" into oc-dev 2017-05-15 22:25:43 +00:00
Wale Ogunwale
8f7bebca36 Changed alert window notifications to use single channel
Per UX request.

Change-Id: Iefe1be52743519af5ee1481b59613c87f16bdf7d
Fixes: 37422870
Test: Verify alert window notification channel.
2017-05-15 13:08:23 -07:00
Amith Yamasani
ba4ac09d23 Merge "Map isolated processes to correct uid" into oc-dev 2017-05-15 17:36:36 +00:00
Sumir Kataria
260d6c6e8c Merge "Use placeholderCount-1 if using default layout." into oc-dev 2017-05-15 16:35:32 +00:00
Peeyush Agarwal
101ab58e26 Fix broken MenuItem coretests
- Fix MenuItemImpl setShortcut bug caused when method signature was
changed after API review
- Remove outdated MenuItem coretests and move others to CTS

Bug: 38114634
Test: Run `cts-tradefed run cts-dev -m CtsViewTestCases -t
android.view.cts.MenuTest`

Change-Id: Iebb7e314cbb3f812fcfeb3f95797f1cf1bcfbae2
(cherry picked from commit d70d2e6efc)
2017-05-15 13:56:59 +00:00
Amith Yamasani
8ee74aa3ba Map isolated processes to correct uid
This was missed in a recent addition to track cpu times at freq.

Bug: 34133340
Test: manual
Change-Id: Ie3720a76a1201c787601bb7419cb9eba47b2aa27
2017-05-12 17:30:12 -07:00
Selim Cinek
0ac4b7d108 Merge "Fixed an issue where the media notification wouldn't have contrast" into oc-dev 2017-05-12 23:42:49 +00:00
TreeHugger Robot
80fc1af120 Merge "Batterystats BLE results counter takes in count" into oc-dev 2017-05-12 21:57:18 +00:00
Sudheer Shanka
5df9c5570e Merge "Add time spent by uid per cpu frequency to batterystats." into oc-dev 2017-05-12 18:02:43 +00:00
Selim Cinek
389edcd7c5 Fixed an issue where the media notification wouldn't have contrast
Because we were relying on the output to go in the right direction
already, this could be wrong. We're now only following the given
lightness direction if it is even possible to satisfy contrast.

Test: runtest -x core/tests/coretests/src/android/app/NotificationTest.java
Change-Id: I06d934a6b5c328ebbf0cf707030b0d707ccb5ab4
Fixes: 38182819
2017-05-12 10:06:41 -07:00
Bookatz
4ebc064c30 Batterystats BLE results counter takes in count
There would likely be too many BLE scan result calls for batterystats to
be healthy. Therefore, the caller can supply a count by which to increase the
counter, instead of doing it one result at a time.

Bug: 37720787
Test: runtest -x frameworks/base/core/tests/coretests/src/com/android/internal/os/BatteryStatsTests.java
Change-Id: Ib8b2e8d250036be24c6c3dac477bc8d34fe498a6
2017-05-12 09:00:20 -07:00
TreeHugger Robot
fa0b28220b Merge changes from topic 'onarevert' into oc-dev
* changes:
  Create a NotificationChannel for ONA.
  Revert "Delete old WifiNotificationController strings."
2017-05-12 04:40:26 +00:00
Sudheer Shanka
9b735c5c1a Add time spent by uid per cpu frequency to batterystats.
Currently we have total user and system cpu time spent by the uid
in the batterystats. This change will add times spent by the uid
at each different cpu frequency to the batterystats dump which will
help in better understanding the battery usage.

Bug: 34133340
Test: manual
Change-Id: I567dc75875eb58543c0e71572d0b440e87dbb4b9
2017-05-11 20:56:46 -07:00
TreeHugger Robot
120d7b219d Merge "BatteryStats: Stop reading kernel memory stats when unvailable" into oc-dev 2017-05-12 00:20:47 +00:00
TreeHugger Robot
89d64cbbd9 Merge "Make batterystats less chatty" into oc-dev 2017-05-12 00:15:56 +00:00
Sumir Kataria
db688af9d9 Use placeholderCount-1 if using default layout.
Bug: 37092598
Test: Updated ResolverActivityTest, Manual testing

Change-Id: I57ddd48c24830ac9a31a87013ca1d9b2e5714631
2017-05-11 13:07:46 -07:00
Adam Lesinski
61d2d37233 BatteryStats: Stop reading kernel memory stats when unvailable
Bug: 37689111
Test: manual
Change-Id: Ib14e4db14870a47da4f4d72bee613486fb976b78
2017-05-11 13:05:46 -07:00
Makoto Onuki
3f8e29715c Make batterystats less chatty
Fix 36869686
Test: manual

Change-Id: Ia5092222acd508e5539cd64ffe015a18036c9d83
2017-05-11 10:52:37 -07:00
TreeHugger Robot
33a030fa03 Merge "Lock out ResolverDrawerLayout dismissals during animations" into oc-dev 2017-05-11 01:48:55 +00:00
Adam Powell
08adbfed3a Lock out ResolverDrawerLayout dismissals during animations
Due to views being offset during the ChooserActivity animating in
direct share targets, it was possible to touch down on the sheet
attempting to tap, but have it be interpreted as a fling downward as
the relative touch position within the parent was moving. Lock the
dismiss gesture during animations to prevent this.

Bug: 36032762
Test: manual
Change-Id: I18b6f03148cbf402efc23e873262927e412ea7b7
2017-05-10 07:48:30 -07:00
Hugo Benichi
f37b271894 Merge "NetworkStatsFactory: fix double accounting on IPv6 only networks" into oc-dev 2017-05-10 08:19:57 +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
ec07fbc9ed 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: I4867fe181938d94b5594b3d88896a3c4e01d895c
Merged-In: I2675643b220acbc6110179fa937d4c313b6f5e32

(cherry picked from commit e1bb3a14d1)
2017-05-10 09:19:12 +09:00
Amin Shaikh
11176569e1 Create a NotificationChannel for ONA.
- Construct the NETWORK_AVAILABLE NotificationChannel in
SystemNotificationChannels

Bug: 37794067
Test: make
Change-Id: I27aa69f8d038af238343eabc706147a02cad7330
2017-05-09 14:15:14 -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
TreeHugger Robot
7080fa5282 Merge "Add BLE results counter to batterystats" into oc-dev 2017-05-09 16:03:27 +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
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
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
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
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
883af0766a Merge "Fix submenu position when showing with Gravity.END" into oc-dev 2017-05-02 15:40:42 +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
Selim Cinek
e44061f9e7 Merge changes from topic 'music_extraction' into oc-dev
* changes:
  Make music notifications not dimmable
  Implementing gradual image fade for the media template
  Extracting the notification colors based on the album art
  Moved notification builder creation to the background
2017-04-28 00:24:55 +00:00
Selim Cinek
0847acd4d4 Implementing gradual image fade for the media template
Test: play music
Merged-In: I525513ce1da1237c4edad32c0ed31e79d5eacd32
Change-Id: I525513ce1da1237c4edad32c0ed31e79d5eacd32
Fixes: 36561228
2017-04-27 22:21:50 +00:00
Selim Cinek
5fb73f8629 Extracting the notification colors based on the album art
Media notifications are now extracting the background and
foreground colors from the album art.

Test: manual, play different songs
Bug: 36561228
Merged-In: I9c3c962fa59eb70ef9b2d4893b939be6e1ee1ab0
Change-Id: I9c3c962fa59eb70ef9b2d4893b939be6e1ee1ab0
2017-04-27 22:21:17 +00:00
Sudheer Shanka
8dd177c4e8 Merge "Update VIMS internal state when a packge is modified." into oc-dev 2017-04-27 20:31:09 +00:00
Sudheer Shanka
7a3d901453 Update VIMS internal state when a packge is modified.
When the package that contains the current voice interaction service component
is changed, internal state of VoiceInteractionManagerService needs to
modified to correctly reflect that.

Bug: 36649034
Test: manual
Change-Id: I7e21ac25785b035711affd87f1b04efa717b13c4
2017-04-25 12:57:38 -07:00
TreeHugger Robot
7575fa7600 Merge "Check for uses-feature in Companion APIs" into oc-dev 2017-04-25 06:42:06 +00:00
Kang Li
925d3cf211 Merge "Moved LRResolverRankerService to ExtServices, and added a permission to ensure that ResolverRankerServices are from trust sources." into oc-dev 2017-04-24 21:21:42 +00:00
Eugene Susla
aa43a4ba9f Check for uses-feature in Companion APIs
Fixes: 37629514
Test: Invoke API from app without uses-feature
Ensure an exception with an appropriate message is thrown
Invoke API from app with uses-feature
Ensure no exception

Change-Id: I53665732264ea2de2b4c8c251b1f00bf3a256dad
2017-04-24 11:17:06 -07:00
TreeHugger Robot
e00febf61c Merge "Increases the minimized width in landscape by statusbar height" into oc-dev 2017-04-21 20:30:51 +00:00
Kang Li
0f80719a6f Moved LRResolverRankerService to ExtServices, and added a permission to
ensure that ResolverRankerServices are from trust sources.

Test: manually shared images in Camera, and in PTP to confirm it works
as expected.

Change-Id: I3549292d424fec949e9115faea7a0c5bdec06e87
(cherry picked from commit 61cf4d145e)
2017-04-21 19:56:59 +00:00
Jocelyn Dang
b2aa0ceb0d Merge "Add min and max learned battery capacity to batterystats." into oc-dev 2017-04-20 04:34:14 +00:00
TreeHugger Robot
1fb3e56998 Merge "Add a null check for visibleFile." into oc-dev 2017-04-20 01:01:07 +00:00