Commit Graph

7701 Commits

Author SHA1 Message Date
Seigo Nonaka
c802751704 Merge "Reorganize font enumeration API." into oc-dev am: 2ac9698271
am: de5fa6b3d8

Change-Id: I72a02f3f681b3b5f82cffc317fe0668e842464fe
2017-04-04 17:04:40 +00:00
Seigo Nonaka
de5fa6b3d8 Merge "Reorganize font enumeration API." into oc-dev
am: 2ac9698271

Change-Id: Ie9bdcdb8d5997db421b783475e1058027cc4bb6f
2017-04-04 16:56:29 +00:00
TreeHugger Robot
2ac9698271 Merge "Reorganize font enumeration API." into oc-dev 2017-04-04 16:49:56 +00:00
Jorim Jaggi
f55392ccaa Merge "Schedule window animations at vsync-sf" into oc-dev am: de95d544cd
am: e6737ba6de

Change-Id: If143c49da7b43347fc402471304a44a75c200f5f
2017-04-04 09:35:37 +00:00
Jorim Jaggi
e6737ba6de Merge "Schedule window animations at vsync-sf" into oc-dev
am: de95d544cd

Change-Id: I0d6377d0cafdf33a7872ddda15d796147e0f4a60
2017-04-04 09:32:04 +00:00
Jorim Jaggi
cdfca9c3d2 Merge "Handle case when snapshot dimensions don't match" into oc-dev am: 1edadac465
am: 05ca99b43b

Change-Id: Ie5364d5617a159344d5232e48957ffd79a89a175
2017-04-04 09:32:02 +00:00
Jorim Jaggi
de95d544cd Merge "Schedule window animations at vsync-sf" into oc-dev 2017-04-04 09:26:03 +00:00
Jorim Jaggi
05ca99b43b Merge "Handle case when snapshot dimensions don't match" into oc-dev
am: 1edadac465

Change-Id: Icbe3f3c26cf65e7b12f5567a9bc40f7e0a3bd578
2017-04-04 09:23:35 +00:00
Jorim Jaggi
1edadac465 Merge "Handle case when snapshot dimensions don't match" into oc-dev 2017-04-04 09:14:38 +00:00
Seigo Nonaka
ff55115121 Reorganize font enumeration API.
This CL cleans up APIs around font variation settings.
- Remove FontConfig and FontManager public API.
- Remove FontManagerService from system service.
- Extract inner class FontConfig.Axis as top-level class FontVariationAxis.
  This is used by Typeface.Builder public API to create new Typeface.
- Introduce and expose FontVariationAxis utility functions from/to string.
- Throws if the invalid font variation settings is passed.

Test: android.text.cts.FontVariationAxisTest passes
Test: android.graphics.cts.TypefaceTest passes
Test: android.graphics.cts.PaintTest passes
Change-Id: I9ccafe7a53935960566243e2856e166878ca59ae
2017-04-03 13:55:07 -07:00
Makoto Onuki
b3f05c90a1 Merge "Revert "Push chooser targets to the shortcut manager."" into oc-dev am: ef7dff2563
am: be3ee7ee30

Change-Id: I13a0dd37dfb4475866535abb514aa4a8dcd2f6a6
2017-04-03 20:01:58 +00:00
Makoto Onuki
be3ee7ee30 Merge "Revert "Push chooser targets to the shortcut manager."" into oc-dev
am: ef7dff2563

Change-Id: I43302d90f7aa2c174c5e31cd5390e03c3c087157
2017-04-03 19:54:24 +00:00
Makoto Onuki
ef7dff2563 Merge "Revert "Push chooser targets to the shortcut manager."" into oc-dev 2017-04-03 19:45:18 +00:00
Jorim Jaggi
aea6b74e17 Handle case when snapshot dimensions don't match
If the snapshot starting window has different dimensions than the
snapshots we have taken, we do the following:

- Create a child Surface that has exactly the dimensions of the
snapshot.
- We fill the parent surface with the app background color, as well
as all screen background decorations (status bar background,
navigation bar background).
- We also clip of the status bar/navigation bar background in some
cases, as it looks ugly if it's not behind the system bars.
- Furthermore, we inherit all layout flags on the window and all
layout relevant SystemUI flags on the window such that it's very
likely that the size will match, and the system bars are drawn
correctly.
- In order to make the transition from the snapshot to the real
window a bit more predictable/less messy, we enforce a minimum
duration the snapshot is visible, which is slightly more than our
app transitions.

Test: TaskSnapshotSurfaceTest
Test: Open app, go home, go landscape, open app again
Test: Go to multi-window, open app from recents with a snapshot
taken in fullscreen.

Fixes: 36703868
Change-Id: Ia2d4add6971a18ab7aa2942d2b644d6e87a402af
2017-04-03 15:36:29 +02:00
Jorim Jaggi
d6d6de6da4 Schedule window animations at vsync-sf
Test: Run window animation, make sure it's smooth
Test: Take systrace, make sure it runs at vsync-tick
Test: Move divider, make sure it's still smooth

Change-Id: I1600618e074be811134fe4ccb1dfbd5034820c71
Fixes: 36583867
2017-04-03 15:27:16 +02:00
Daichi Hirono
fd88a3aba7 Merge "Process FuseAppLoop messages in Handler.Callback" into oc-dev
am: cb9ceb3fd4

Change-Id: I8708c1e60300c5384071106d9b3f75a534d1fbf6
2017-04-03 07:00:35 +00:00
TreeHugger Robot
cb9ceb3fd4 Merge "Process FuseAppLoop messages in Handler.Callback" into oc-dev 2017-04-03 06:55:04 +00:00
TreeHugger Robot
a06240021a Merge "Process FuseAppLoop messages in Handler.Callback" 2017-04-03 06:49:05 +00:00
Jeff Sharkey
558b0dd418 Consistent dump() permission checking. am: fe9a53bc45
am: 020de02854

Change-Id: Iffbf78a7b48cea41ed4b0763f2452738e084225c
2017-04-03 06:26:04 +00:00
Jeff Sharkey
020de02854 Consistent dump() permission checking.
am: fe9a53bc45

Change-Id: I300f8bc07e1266b9e78f56d085cd458862176a85
2017-04-03 06:19:02 +00:00
Daichi Hirono
ea6e6e17a0 Process FuseAppLoop messages in Handler.Callback
Previously FuseAppLoop instantiates Runnable for each command, which
causes lots of instantiation and GC.

Test: CTS
Bug: 35229514
Change-Id: Ifea098e5ade044b1a954c0b714c5b3270a95cd1a
2017-04-03 05:03:03 +00:00
Jeff Sharkey
fe9a53bc45 Consistent dump() permission checking.
This change introduces new methods on DumpUtils that can check if the
caller has DUMP and/or PACKAGE_USAGE_STATS access.  It then moves all
existing dump() methods to use these checks so that we emit
consistent error messages.

Test: cts-tradefed run commandAndExit cts-dev -m CtsSecurityTestCases -t android.security.cts.ServicePermissionsTest
Bug: 32806790
Change-Id: Iaff6b9506818ee082b1e169c89ebe1001b3bfeca
2017-04-02 22:29:07 -06:00
Daichi Hirono
5c2688a861 Process FuseAppLoop messages in Handler.Callback
Previously FuseAppLoop instantiates Runnable for each command, which
causes lots of instantiation and GC.

Test: CTS
Bug: 35229514
Change-Id: Ifea098e5ade044b1a954c0b714c5b3270a95cd1a
2017-04-03 13:18:40 +09:00
TreeHugger Robot
e516544c70 Merge "Collect background stats: scheduled jobs" 2017-03-31 23:59:08 +00:00
Winson Chung
c0e2621910 Merge "Ensure we show the PiP menu in response to KEYCODE_WINDOW." into oc-dev am: 2af994ec03
am: da7ef8060d

Change-Id: I715e2e79b729d28b856a8eda42b099db56cb0184
2017-03-31 23:27:58 +00:00
Winson Chung
da7ef8060d Merge "Ensure we show the PiP menu in response to KEYCODE_WINDOW." into oc-dev
am: 2af994ec03

Change-Id: I6abd868698fb9f7b16e62938e608f75fb2d610f4
2017-03-31 23:14:57 +00:00
TreeHugger Robot
2af994ec03 Merge "Ensure we show the PiP menu in response to KEYCODE_WINDOW." into oc-dev 2017-03-31 23:07:23 +00:00
Makoto Onuki
99302b55c6 Revert "Push chooser targets to the shortcut manager."
This reverts commit 58fc95dc57.

Bug 36186790
Test: cts-tradefed run cts-dev --skip-device-info --skip-preconditions --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker -a armeabi-v7a -l INFO -m CtsShortcutHostTestCases
Test: cts-tradefed run cts-dev --skip-device-info --skip-preconditions --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker -a armeabi-v7a -l INFO -m CtsShortcutManagerTestCases

Also all unit tests, except for the known failrues.
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest1 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest2 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest3 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest4 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest5 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest6 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest7 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest8 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest9 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest10 -w com.android.frameworks.servicestests

Change-Id: I733ee7e12a419ee7ea17ca67c56afe7b039d189a
2017-03-31 15:16:43 -07:00
Bookatz
d253f537a0 Collect background stats: scheduled jobs
Added background times and counts for an app's scheduled job usage.
Changes DualTimer to be a subclass of Timer so that background timers
can be easily accessed from the main timer (which is convenient for
jobs, whose ArrayMap of Timers is directly accessed outside of
BatteryStatsImpl).

Bug: 35669746
Test: runtest -x
frameworks/base/core/tests/coretests/src/com/android/internal/os/BatteryStatsTests.java

Change-Id: Ic1d85db34346ebda94ed39f134fc0794a5877815
2017-03-31 12:43:34 -07:00
Winson Chung
ac52f2892d Ensure we show the PiP menu in response to KEYCODE_WINDOW.
Bug: 36687605
Test: android.server.cts.ActivityManagerPinnedStackTests
Test: #testWindowButtonEntersPip
Change-Id: I0bb35fd666eb6a438e4676267f6726b44bffb3db
2017-03-31 10:42:53 -07:00
Amith Yamasani
f7d76614bb Merge "Bump up batterystats version to clear stale data" into oc-dev am: fb2f7e27ed
am: 33e20c433c

Change-Id: I2b0b70a17745ae77625a650965f95c4bd9a184a3
2017-03-30 23:06:24 +00:00
Amith Yamasani
33e20c433c Merge "Bump up batterystats version to clear stale data" into oc-dev
am: fb2f7e27ed

Change-Id: Icbc761881850e2ea39d2a4b62f9f0ff64bfedd5f
2017-03-30 23:01:50 +00:00
Amith Yamasani
b23e6358af Bump up batterystats version to clear stale data
Change-Id: I96016f30f38e17fcdfdb4a52eba69471945a21e2
Fixes: 36783752
Test: manually verified the file was deleted on flash
2017-03-30 14:01:59 -07:00
Adam Lesinski
81cbaadf64 Merge "BatteryStats: Clamp temperature to 0" into oc-dev am: 2042770ea5
am: c6e955569c

Change-Id: I9a879b887e1d717d597045bf1b504d8b7a211eee
2017-03-30 18:32:23 +00:00
Adam Lesinski
c6e955569c Merge "BatteryStats: Clamp temperature to 0" into oc-dev
am: 2042770ea5

Change-Id: I4e4d74a37afc3cdc56c14989ff66eadd774c39b7
2017-03-30 18:28:19 +00:00
TreeHugger Robot
2042770ea5 Merge "BatteryStats: Clamp temperature to 0" into oc-dev 2017-03-30 18:22:44 +00:00
Evan Rosky
2c449964f8 Merge "Allow ToolbarActionBar to pass-through unhandled keyShortcuts" into oc-dev
am: f114667f2d

Change-Id: I75deead3b2767d19f25378c4f34ca31c87027cae
2017-03-30 17:00:27 +00:00
Adam Lesinski
29ddfe55fb BatteryStats: Clamp temperature to 0
Temperature is encoded without the sign-bit, meaning
negative temperatures cause an underflow and show up
in the history as large values. We do not expect to
deal with negative temperatures for debugging/diagnostics
so just clamp the temperature to 0.

Bug: 33270828
Test: adb shell dumpsys battery set temp -10 && adb shell dumpsys batterystats --history
Change-Id: I8a92f770e4a90333eade1bb38f21d2d87bb00430
2017-03-29 19:34:08 -07:00
Evan Rosky
c46203785c Allow ToolbarActionBar to pass-through unhandled keyShortcuts
It was consuming all keyShortcuts which broke system hotkeys
like shift+tab.

In order to prevent the decor/phonewindow from creating menus,
this creates a dummy view in onCreatePanelView.

This also includes a change to Activity to not send KEYCODE_TAB
keystrokes to the defaulthandler. This was preventing keyboard
navigation from working on any activity that had a default
search fallback.

Bug: 32482282
Bug: 18021345
Test: Added a CTS test (ToolbarTest#testKeyShortcuts) for toolbar
      keyShortcuts. Verified Tab-navigation works in Play Store.
Change-Id: I5c732a2b21219157818bed49576debd20d5a8178
(cherry picked from commit b22faf524e)
2017-03-29 23:41:47 +00:00
Kang Li
35b9e30155 Add a service to rank apps for ResolverActivity.
bug: 30982298
Test: manual - shared images in Camera, texts in Messenger, and webpages
in Chrome.

Change-Id: If335c269ca54145839ad8fd4b3f9b93a74b550f8
2017-03-29 15:08:41 -07:00
Mukesh Agrawal
b4b7c1aa69 Merge "Merge changes I5c16c650,I3151fb6b am: 55efea25f3 am: ad2684ca3d am: 6b29b1c256" into oc-dev-plus-aosp
am: f463559a9a

Change-Id: If043f8624a7e6e0b66ab18ecbddd539736032002
2017-03-29 18:55:28 +00:00
Mukesh Agrawal
d194a1877a Merge changes I5c16c650,I3151fb6b am: 55efea25f3 am: ad2684ca3d
am: 6b29b1c256

Change-Id: I08019c46a433b5ea64a561d374df445d50400d45
2017-03-29 18:41:16 +00:00
Mukesh Agrawal
ad2684ca3d Merge changes I5c16c650,I3151fb6b
am: 55efea25f3

Change-Id: Ifaaae29780d905ffe9f82645d6d17dad478ba6a9
2017-03-29 18:30:00 +00:00
mukesh agrawal
47e1c7a005 StateMachine: make toString() terser
The current implementation of the toString()
method calls dump(). This causes two problems:

1. toString() may return a large string. This
   is at odds with the advice in the documentation
   for Object.toString(), which says that the
   returned String should be concise, and easy
   to read.
2. The dump() method is overriden by many of the
   StateMachine subclasses. Some of those subclasses
   have dump() implementations that are expensive,
   and/or have dependencies on other objects.

To resolve these problems, we simpify
StateMachine.toString().

Along the way: remove a stale comment about
implementing dump() using toString().

Note: only ran the StateMachine tests, since some
other tests are already failing.

Bug: 36661851
Test: tests/utiltests/runtests.sh \
      -e class com.android.internal.util.StateMachineTest
Change-Id: I5c16c650f01178c4d018b6a65e4aa95fb905aff6
2017-03-28 18:21:36 -07:00
Daichi Hirono
812c95d37d Allow apps to process ProxyFDCallback asynchrnously.
Previously callback methods of ProxyFileDescriptorCallback were invoked
on a background thread prepared in the framework. So all methods were
invoked and processed synchronously. This was problem because if it took
time to fetch bytes of one file, operations for other files were also
blocked.

The CL changes ProxyFileDescriptorCallback methods to be invoked on
Handler passed by apps. Now application can prepare a Handler per file
so that one file does not block others.

Bug: 35229514
Test: cts-tradefed run cts -m CtsOsTestCases -t android.os.storage.cts.StorageManagerTest#testOpenProxyFileDescriptor_async
Change-Id: Ibadc4aad4c0373a3da586459a8f775e40288c895
(cherry picked from commit 4f156065c8)
2017-03-29 00:14:16 +00:00
Evan Rosky
3473647f7d Merge "Allow ToolbarActionBar to pass-through unhandled keyShortcuts" 2017-03-28 19:38:45 +00:00
Torne (Richard Coles)
758f80ea43 Merge "Support loading a stub WebView using a donor package." into oc-dev am: 7ec7ef2ba3
am: 07cb93dc26

Change-Id: Ieadf02a034f991c3f7c6f745067eaa316a8dcbcf
2017-03-28 17:29:23 +00:00
Torne (Richard Coles)
0452670374 Support loading a stub WebView using a donor package.
Support loading a WebView package which specifies the name of a "donor"
that provides missing files. This allows a preinstalled stub WebView to
function by loading its code and assets from the preinstalled Monochrome
implementation, as long as the versions are close enough that the
manifest contents are compatible, which should be fine since
preinstalled versions will match.

To do this, we replace the stub's code paths in AppplicationInfo with
the donor's, so that all Java and native code and resources are loaded
from the donor APK at runtime instead of from the (mostly empty) stub.

To get the ClassLoader with the modified path cached as if it was the
regular path, we introduce a new "cacheKey" parameter in
ApplicationLoaders.

Bug: 21643067
Test: build "new" stub WebView upstream in chromium and test loading
Change-Id: I08cc9122b1c9def3e1206974f3e0e8973cca3419
2017-03-28 16:21:10 +00:00
TreeHugger Robot
4de48d03f3 Merge "Allow apps to process ProxyFDCallback asynchrnously." 2017-03-28 09:41:53 +00:00
Michael Kwan
1d34605fcb Merge "Catch exception where SwipeDismissLayout cannot monitor screen off." 2017-03-28 00:20:07 +00:00