Commit Graph

9797 Commits

Author SHA1 Message Date
Evan Rosky
9bf11ede69 Merge "Fixed a bug where sometimes unhandled handler would consume all keys" into pi-dev
am: 7ba4c2b254

Change-Id: Ia7fab42d36c8b58b05656cc2e5d1253449becf96
2018-05-30 15:02:51 -07:00
Evan Rosky
7ba4c2b254 Merge "Fixed a bug where sometimes unhandled handler would consume all keys" into pi-dev 2018-05-30 21:47:25 +00:00
Selim Cinek
0fc5e52023 Merge "Fixed the animations of Messaging Layout, leading to overlaps" into pi-dev
am: d982210d89

Change-Id: I4b29f82656e3b3402f89cb5d66e71955287ac0b8
2018-05-29 18:59:25 -07:00
TreeHugger Robot
d982210d89 Merge "Fixed the animations of Messaging Layout, leading to overlaps" into pi-dev 2018-05-30 00:52:32 +00:00
Selim Cinek
f68af9b171 Fixed the animations of Messaging Layout, leading to overlaps
The animations could go wild at times, leading to overlapping
messages and ugly renderings. This improves the animations
overall and fixes those cases.

Test: add messages, observe animations
Fixes: 78114531
Fixes: 80409521
Change-Id: I6f21b87706ccc2e85f1edbd9489e4bf7e686d7d8
2018-05-29 15:29:48 -07:00
Daniel Sandler
3d7510c338 Merge "Remove direct-share target row animations and limit to one row." into pi-dev
am: d8f3889b28

Change-Id: I02947ea217d0ae98f792a63fd24542aed1567afb
2018-05-29 10:01:02 -07:00
Daniel Sandler
d8f3889b28 Merge "Remove direct-share target row animations and limit to one row." into pi-dev 2018-05-29 16:46:57 +00:00
Steven Wu
8d103afa4e Merge "Fixes a NPE in search manager in slice CTS tests." into pi-dev
am: d0545395df

Change-Id: I5411ba9cacf0fa4f9308f83d00677a23a95155da
2018-05-29 08:28:13 -07:00
TreeHugger Robot
d0545395df Merge "Fixes a NPE in search manager in slice CTS tests." into pi-dev 2018-05-29 15:18:04 +00:00
Dan Sandler
62aad00c6c Remove direct-share target row animations and limit to one row.
The animation---which was responsible for causing relayouts
that would in turn bind views, which involved package
manager roundtrips---would lock out interaction with the rest of
the share sheet for at least 400ms while the animation ran
(often much longer if services were slow to start or respond).

Now the main UI is never blocked, and direct share targets
can take as long as they like (up to 2sec) before appearing.

It's really fast now, basically.

Bug: 67622422
Bug: 63521992
Test: atest com.android.internal.app.ChooserActivityTest
Change-Id: I21826e282226f2b2ce6d3d1b5862dbfc449f5918
2018-05-29 13:58:10 +00:00
Evan Rosky
cd80e611ca Fixed a bug where sometimes unhandled handler would consume all keys
In a situation where a focused view consumed only the UP of a key
and the unhandled key manager would focus a listener, it wouldn't
drop focus unless the original key was pressed/released again.

This updates the record of captured keys before it can be consumed
in the view hierarchy.

Bug: 79993136
Test: Added a test for this to cts ViewTest#testUnhandledKeys
Change-Id: I5dfdcf16c5c41e9ad51cb62b385580c5493e8520
2018-05-25 16:18:57 -07:00
Selim Cinek
7712d46760 Merge "Fixed the behavior of group conversations when targeting P" into pi-dev
am: c4e19963f4

Change-Id: I7e5feadc253816852528e06719e136a7cba51c49
2018-05-25 13:21:38 -07:00
Selim Cinek
c4e19963f4 Merge "Fixed the behavior of group conversations when targeting P" into pi-dev 2018-05-25 20:06:52 +00:00
Steven Wu
3aa2cf7541 Fixes a NPE in search manager in slice CTS tests.
Test: atest CtsSliceTestCases
Change-Id: I8d25dd5c216a4e2fa99b2a32bce689bee767dcfa
Fixes: 76211625
2018-05-25 15:20:10 -04:00
Selim Cinek
ce8794fbbc Fixed the behavior of group conversations when targeting P
Fixes an issue where the group conversation heuristic was still
applied even when the app is targeting P. We're now following
the isGroupConversation completely and only do the migration
for apps targeting < P.

Change-Id: I471d58e8a8f5e6270f0dcce8691d08a2bdd1c582
Fixes: 78450835
Test: add messaging notification, observe correct display
2018-05-25 09:16:38 -07:00
Andreas Gampe
4f11d5381e Merge "Framework: Add API to get zygote PID" am: 1109e2333f
am: 07578c786a

Change-Id: Ibee53631caad0d6ce2108970598f5226d20a849d
2018-05-24 13:49:41 -07:00
Andreas Gampe
07578c786a Merge "Framework: Add API to get zygote PID"
am: 1109e2333f

Change-Id: I6f50efa61bcdec321cd71edae8a28881293c0398
2018-05-24 13:00:41 -07:00
TreeHugger Robot
b82d3d7e74 Merge "Calculate cellular radio value from modem.controller values." into pi-dev 2018-05-24 06:11:27 +00:00
Hui Yu
39b29bc230 Calculate cellular radio value from modem.controller values.
Recently cellular radio related values {"radio.active", "radio.scanning",
"radio.on"} are removed from power_profile.xml, which causes inaccurate
radio power usage. We use following formula to calculate radio
values from modem.controller values.

radio.active = average of modem.controller.rx and modem.controller.tx values
radio.scanning = 0 (since this is already included in radio.on bin 0)
<array name="radio.on"> <!-- Strength 0 to BINS-1 -->
    <value>modem.controller.idle * 25 / 180 </value>   <!-- none -->
    <value>max(1, modem.controller.idle/256) </value>  <!-- poor -->
    <value>max(1, modem.controller.idle/256) </value>  <!-- moderate -->
    <value>max(1, modem.controller.idle/256) </value>  <!-- good -->
    <value>max(1, modem.controller.idle/256) </value>  <!-- great -->
 </array>

Bug: 79379255
Test:  use debugger to observe correct mPowerRadioOn, mPowerBins,
mPowerScan are calculated. "adb shell dumpsys batterystats", looking for
"radio=" in "Estimated power use" section.

Change-Id: Ic65a5c8a35a5b1f4ba05ddc150e29b00bc62689f
2018-05-24 00:45:02 +00:00
TreeHugger Robot
da4c54e9da Merge "Fix per app GPS power usage." into pi-dev 2018-05-24 00:22:22 +00:00
TreeHugger Robot
261a101ac2 Merge "Add FLAG_ACTIVITY_CLEAR_TOP to more details intent" into pi-dev 2018-05-23 21:52:40 +00:00
Christine Franks
5cb4117353 Merge "Initialize color mode if set" into pi-dev 2018-05-23 19:33:06 +00:00
Hui Yu
57f6932f29 Fix per app GPS power usage.
After GPS power profile changed from a single value "gps.on" to a
"gps.signalqualitybased" array, we use the time gps stays in each
signal level to calculate the average gps power usage.

Bug: 79379255
Test: adb shell dumpsys batterystats, looking for "gps=" in per app
power usage section.

Change-Id: I93d17d5bd25324cc9f36a7a5502b088a44184621
2018-05-23 11:46:50 -07:00
Christine Franks
cf388c2eec Initialize color mode if set
ColorDisplayService doesn't start listening for changes until the end
of user setup, and color mode was previously unintialized at service
setup, so restored settings were ignored.

Bug: 79591550
Test: atest FrameworksServicesTest:ColorDisplayServiceTest
Change-Id: I00baed15e1248572d3dfd8f251dee7dc5a355a6c
2018-05-23 11:23:47 -07:00
Petr Cermak
5c98d61f6c Add FLAG_ACTIVITY_CLEAR_TOP to more details intent
This ensures that the more details activity displays information about
the correct app.

Change-Id: I0c0f71fff32c2c1c5f4597c8a4eab90ec54409ca
Fixes: 80070434
Test: manually verified
2018-05-23 15:33:41 +01:00
TreeHugger Robot
4024376f04 Merge "Fix RTL actions alignment" into pi-dev 2018-05-23 02:09:19 +00:00
TreeHugger Robot
061d858828 Merge "Fixes the collapsed view with images and different densities" into pi-dev 2018-05-23 01:40:39 +00:00
Selim Cinek
02fde73dec Fixes the collapsed view with images and different densities
Previously the collapsed view could contain a message even before
the messaging imaging image and the display would look very distored.
This now makes sure that any groups with isolated messages always
are the last ones displayed.

Test: add group with image, adjust display settings to large
Change-Id: If9e69f72ce117687898dcaea591e61c6fb49ef46
Fixes: 78490082
2018-05-22 16:30:56 -07:00
Lucas Dupin
71e38a1cf6 Fix RTL actions alignment
Change-Id: I5a81e0386ef7d98ddbe6751cf3ca560f45b2e8ec
Fixes: 79532161
Test: manual
2018-05-22 15:22:06 -07:00
Zhi An Ng
1f597da686 Merge "Disable direct share on low ram devices" into pi-dev 2018-05-22 18:08:22 +00:00
TreeHugger Robot
758cfd63db Merge "Add utility methods to AmbientDisplayConfig" into pi-dev 2018-05-21 23:37:24 +00:00
Matthew Fritze
3461bb46d0 Add utility methods to AmbientDisplayConfig
The added utility methods are to enable increased
granularity in determinining the availability of gesture
settings dependant on Always on Display.

Bug: 79779562
Test: robotests
Change-Id: Ib54a867ca554d44ee4190706805fa8545aec9fa0
2018-05-21 13:12:36 -07:00
TreeHugger Robot
404273a627 Merge "clone the visibility objects for the handler thread" into pi-dev 2018-05-18 23:59:37 +00:00
TreeHugger Robot
177ee3d7a1 Merge "Display Cutout: Fix ActionBarOverlayLayout to properly dispatch cutout" into pi-dev 2018-05-18 22:12:30 +00:00
Adrian Roos
f7b7426d81 Display Cutout: Fix ActionBarOverlayLayout to properly dispatch cutout
ActionBarOverlayLayout used to drop WindowInsets, extract the content insets
as a rect, and then dispatch a modified rect to the content view; this because
there was no way to retarget the WindowInsets to the content view, and the
WindowInsets were not truly immutable. That means however, that other kinds of
insets than the content insets do not get dispatched, such as the display cutout.

To fix this, we add APIs to inset WindowInsets, make them immutable. Note that
a similar change is needed for the support lib.

Bug: 79733300
Test: atest ActionBarOverlayLayoutTest
Change-Id: I6a69d8462163ca5e66fdb53f83def6bc4063f8aa
2018-05-18 20:58:38 +00:00
Chris Wren
2e89e8d893 clone the visibility objects for the handler thread
The main thread was recycling the objects before the hander could
pack up the binder call.

Change-Id: I4289bdcc5b940a0a8209fdd5d3df47972de0fa4b
Fixes: 72953296
Test: atest com.android.notification.functional.NotificationInteractionTests#testNotificationShadeMetrics
2018-05-18 15:32:21 -04:00
Tony Huang
4552368cdf Fix odd avatar when message sender is a number
When sender symbol is number or special-char, use person avatar icon
with sendor name color tint.

Fixes: 73551742
Test: manual use different sender name and send message notification
Change-Id: I5e3080efc834bf09c1dae93ef8af06cf3df4d22d
2018-05-15 15:26:06 +00:00
TreeHugger Robot
98deba8412 Merge "Fixing user tap on suspended widget" into pi-dev 2018-05-14 23:32:08 +00:00
Ng Zhi An
d3ec5fc5ac Disable direct share on low ram devices
Bug: 79691134
Test: flash device, open any app and try sharing
Change-Id: I78158ac60215b73092f7da6db83b20bdf1aa06c9
2018-05-14 11:33:54 -07:00
Makoto Onuki
869c6f559a Merge "Rework battery saver synchronization logic" into pi-dev 2018-05-14 15:42:14 +00:00
Suprabh Shukla
1ab90a2ed5 Fixing user tap on suspended widget
Widgets get masked with separate remove views when suspended. Need to
update them with the correct pending intent. Moved around the logic
creating the suspended alert activity to make it reusable.

Test: Manually, "pm suspend <app-with-widget>", followed by tap on
widget
Existing tests pass:
atest GtsSuspendAppsTestCases
atest com.android.server.am.ActivityStartInterceptorTest

Bug: 79474038
Change-Id: Ic75ee762434bf92c54bda307e9cb6018f94a914c
2018-05-11 14:24:54 -07:00
Matthew Ng
303071233b Fixes splitscreen when executed from fullscreen app
Fixes splitscreen from the right for launching splitscreen from
fullscreen app including pixel launcher and 3rd party launchers. With
3rd party launchers, the experience is the same as Android O. With pixel
launcher since launcher and recents are merged, it will split to
minimized mode. When pixel launcher is used, the recents stack is
ignored.

Fixes: 73250406
Fixes: 78247419
Test: use split screen; invoke command with supportapp.apk in b/78247419
adb shell am broadcast -a launcher-acc --ei cmd 1
Change-Id: I70b0551c517465b3a059ff7d0641c27f71e8114e
2018-05-11 20:28:51 +00:00
Makoto Onuki
bd7a625389 Rework battery saver synchronization logic
- Stop using individual lock instances and use use the power manager lock.
- Make sure not to access external components with the lock held,
*except for settings provider*, which is already touched by the power manager
and the battery service

(I'm planning to re-organize things for Q: b/79580230)

Fixes: 79486713

Test: atest /android/pi-dev/frameworks/base/services/tests/servicestests/src/com/android/server/power/batterysaver/Battery*Test.java /android/pi-dev/frameworks/base/services/tests/servicestests/src/com/android/server/power/*Test.java
Test: Manual test with ./development/scripts/battery_simulator.py with toggling
battery saver on and off and then watch
adb logcat -b all | grep -P '(battery_saving_stats|battery_saver_mode)'

Change-Id: I8ecdfefe978de348ee979d765c82e3d8f0280082
2018-05-11 13:24:50 -07:00
Andreas Gampe
8444dca38c Framework: Add API to get zygote PID
Add a zygote call that returns the PID of the zygote. Used for
profiling.

Bug: 79266002
Test: m
Change-Id: Idf9ba5ec314eb4cb72921000ad6cb34d1035a92a
2018-05-10 09:10:00 -07:00
Kenny Guy
14d035c969 Fix colorized messaging layout and smart replies.
Modify messaging style and smart replies view to
cope with colorized backgrounds.

Bug: 78928664
Bug: 77927019
Test: atest SystemUITests (with patch from ag/3992401)
Test: visual - see bug for screenshots

Change-Id: Iee66931574fb48d0340986bf520532f798ef59fc
2018-05-10 10:25:14 +01:00
Calin Juravle
9845141701 Merge "Make system server profiling an explicit runtime intent" into pi-dev 2018-05-10 06:03:08 +00:00
Dianne Hackborn
7105e2ca9a Merge "Further flesh out app ops foreground state." into pi-dev 2018-05-10 05:49:08 +00:00
Jaewan Kim
183a63474f Merge "MediaSessionService: Provide caller information for media key events" into pi-dev 2018-05-10 04:48:35 +00:00
Dianne Hackborn
65a4f251c7 Further flesh out app ops foreground state.
Fix some bugs, add the ability to monitor state changes, improve
dumpsys output to help debugging, add a new check API that allows
the caller to get the real state.

Bug: 78480444
Test: atest FrameworksServicesTests:AppOpsServiceTest
Test: atest CtsPermissionTestCases:AppOpsTest
Change-Id: I3d41be9968c1d95a1456f4052da958ea64aa068d
2018-05-09 18:02:35 -07:00
Calin Juravle
35fe028c93 Merge "Properly prepare system server profiles"
am: 15b9558018

Change-Id: I83070dd881f164e8d458925274b2fb41851b1ae5
2018-05-09 17:37:42 -07:00