Commit Graph

8971 Commits

Author SHA1 Message Date
TreeHugger Robot
057087457b Merge "Revert "Add latency logging for rotation"" 2017-12-06 04:56:46 +00:00
TreeHugger Robot
8cb0cf0aa9 Merge "Allow caller to specify target to start in setQuietModeEnabled" 2017-12-06 01:18:52 +00:00
Wale Ogunwale
79c1f22243 Revert "Add latency logging for rotation"
Causing deadlock in system-server

Bug: 70238465
Bug: 67862696

This reverts commit 453e7c1c07.

Change-Id: I9d37ff303dee577c36283ccd50f134abd76b556a
2017-12-06 01:12:11 +00:00
TreeHugger Robot
1523386d85 Merge "PooledLambda" 2017-12-05 20:38:25 +00:00
Dianne Hackborn
d5b9266f01 Merge "Add major version code to platform." 2017-12-05 20:12:17 +00:00
Eugene Susla
2f5ee71ec8 PooledLambda
This introduces PooledLambda - a way of obtaining lambdas without the
allocations overhead.

See PooledLambda javadoc for a guide and PooledLambdaSample for code samples
of useful usages.

Test: ensure samples of PooledLambdaSample work as described.
Change-Id: I46f8ad27bc1de07e19f6e39f89d2cafe4238497a
2017-12-05 10:46:59 -08:00
Jason Monk
a094c37449 Merge "Add latency logging for rotation" 2017-12-05 16:11:32 +00:00
Tony Mak
64fd8c0bdd Allow caller to specify target to start in setQuietModeEnabled
So, UMS can start the target once user is unlocked.

Test: No secure lock. Try turn off and on work mode by tapping work app.
Test: Have secure lock. Try turn off and on work mode by tapping work app.
Test: Turn off work mode. Reboot. Try to tap on any work app to turn on work mode.

BUG:69926710

Change-Id: Iaaccd5d763f7e36e5a43bad5261f1eb16060f9d6
2017-12-05 15:55:19 +00:00
TreeHugger Robot
1a958a57b8 Merge "Revert "Smooth scroll RecyclerView on a11y ACTION_SCROLL_*"" 2017-12-05 01:17:47 +00:00
Dianne Hackborn
3accca05dd Add major version code to platform.
It turns the version code into almost a 64-bit integer, with the
new major part being the upper 32 bits.

The only tricky part about this is the backup manager, since it
stored 32-bit version codes in its backup data sets.  This is dealt
with by, when the major version code is not 0, writing MIN_INT as
the version code and following that by the full long version code,
which we can detect when reading.  Note that this makes backup sets
containing apps with major version codes incompatible with older
versions of the platform.

Bug: 64459786
Test: Added in Change-Id: Iab8a682b62103babd6c16a56b8dc1e97d7078658
Change-Id: Ibfffe235bbfcf358b3741abd3f7197fdb063d3f3
2017-12-04 13:02:10 -08:00
Eugene Susla
f13b085f59 Revert "Smooth scroll RecyclerView on a11y ACTION_SCROLL_*"
This reverts commit 8b2eb6fe54.

Change-Id: Ia872874026286e709a1fa5e071c510838405d264
2017-12-04 19:46:27 +00:00
Jason Monk
453e7c1c07 Add latency logging for rotation
Move LatencyTracker and sysui_latency to make this possible

Fixes: 67862696
Test: atest
platform_testing/tests/perf/PerfTransitionTest/src/com/android/apptransition/tests/LatencyTests.java#testRotationLatency

Change-Id: I44ddbc625b8aba7b1d43858688349c9bfb0f9470
2017-12-04 11:20:22 -05:00
TreeHugger Robot
70de9728d2 Merge changes from topic "priv_vendor_app"
* changes:
  BIND_IMS_SERVICE is exposed to vendors
  Support privileged vendor apps
2017-12-04 03:20:34 +00:00
TreeHugger Robot
19a7dbfbaa Merge "Add ability for ResolverDrawer to be align to top via XML attribute." 2017-12-02 01:17:46 +00:00
Ben Lin
93b8697cdc Add ability for ResolverDrawer to be align to top via XML attribute.
Bug: 70036020
Test: ResolverActivityTest#setShowAtTopToTrue passes.
Change-Id: I2c51c9c731234f05a589c52d5a03b8b6605d4c9c
2017-12-01 12:24:37 -08:00
Bernardo Rufino
d6ba912bb9 Merge "Binding on-demand #3: updateTransportAttributes() API" 2017-12-01 12:06:23 +00:00
Bookatz
ddccf0a94e Add/fix a few statsd atoms
Adding atoms:
MobileRadioPowerStateChanged
WifiRadioPowerStateChanged
DeviceIdlingModeStateChanged

Made the following other atom changes:
Added tag to WakeupAlarmOccurred
Changed some ints to enums
Removed the obsolete UidWakelockStateChanged

Test: none
Fixes: 69479171
Fixes: 69479176
Fixes: 69479177
Fixes: 69479169
Change-Id: I815c0f896ef050a4bc1fca482fb02ccb8e78f009
2017-11-30 19:08:26 +00:00
Bernardo Rufino
ab953332bc Binding on-demand #3: updateTransportAttributes() API
This CL introduces the updateTransportAttributes() API to be used by the
transport hosts. It doesn't actually use the description attributes yet,
this will go in another CL. This is because I want to test that CL
together with transport usage. Tests are lacking for TransportManager
and BMS, I'll still add them, but I'm trying to migrate Robolectric
first.

Ref: http://go/br-binding-on-demand
Bug: 17140907
Test: make RunFrameworksServicesRoboTests
Test: runtest -p com.android.server.backup frameworks-services
Test: gts-tradefed run commandAndExit gts-dev -m GtsBackupTestCases
Test: gts-tradefed run commandAndExit gts-dev -m GtsBackupHostTestCases
Test: cts-tradefed run commandAndExit cts-dev -m CtsBackupTestCases
Change-Id: I56f7b5a5026d21d8f11afb371d5560d4913c5f2a
2017-11-30 14:26:13 +00:00
Jiyong Park
002fdbdb95 Support privileged vendor apps
Privileged apps can now be located in the vendor partition. This is
mainly to move SoC-dependent apks to the vendor partition so that the
system partition becomes more generic.

Like existing privileged apps in the system partition, the list of
privileged apps in the vendor partition and the permissions they are
using must be white-listed. The whitelist can be specified via
<privapp-permissions> tags in one of /vendor/etc/permissions/*.xml
files. Note: vendors can only white-list the apps in vendor partition,
but not the apps in system partition.

This change also introduces a new flag 'vendor-privileged' to the
permission protection level. It is used to expose platform-defined
permissions to the privileged vendor apps. If a platform permission does
not have this flag, it is not granted to vendor apps even when the app
is privileged and white-listed.

Bug: 35301609
Test: `mm` under frameworks/base/tests/privapp-permissions
adb sync && adb reboot
adb shell cmd package \
com.android.framework.permission.privapp.tests.vendor
shows that the app is installed.
android.permission.BIND_IMS_SERVICE is in the installed permissions list
android.permission.MANAGE_USE is not in the installed permissions list,
but is in the requested permissions list.

Change-Id: I196375aaaa9ea3a2ba15686ef08cf3f70ade7046
2017-11-30 14:41:55 +09:00
TreeHugger Robot
fb19b383bf Merge "Fix horizontal position of tooltip in a Dialog" 2017-11-29 23:51:38 +00:00
TreeHugger Robot
229f0d0305 Merge "Don't generate irrelevant a11y events - framework" 2017-11-29 20:56:37 +00:00
Sudheer Shanka
9fdbc957c6 Merge "Track some event history and include it in netpolicy dump." 2017-11-29 18:35:39 +00:00
Mike Digman
241d98785a Merge "Add route for rotation suggestions from StatusBar to CommandQueue" 2017-11-29 18:10:06 +00:00
Vladislav Kaznacheev
bdd2c25ef6 Fix horizontal position of tooltip in a Dialog
When calculating the horizontal offset, use the top level view's width
instead of getWindowVisibleDisplayFrame (which is misleading for Dialog
windows).

Bug: 69911773
Test: manual
Change-Id: I040917d5beb123cc137da5a0c926a45a12e66234
2017-11-29 09:30:11 -08:00
TreeHugger Robot
f86d375437 Merge "Fix user color overlay is not applied" 2017-11-29 11:13:15 +00:00
Svet Ganov
8ddfb4794f Don't generate irrelevant a11y events - framework
Now before we fire an a11y event we check if this event has an
observer. As a bonus we don't push the state to clients if the
dynamic service config did not change.

Test: cts-tradefed run cts-dev -m CtsAccessibilityServiceTestCases

bug:69427760

Change-Id: Ie208e13b8557bb7a120198a43efcb79c2752f5db
2017-11-28 17:58:38 -08:00
Andrii Kulian
4d26c21a82 Merge changes from topic "lifecycle_transaction_base"
* changes:
  Add transaction unit tests
  Add basic lifecycle transaction containers
2017-11-28 20:47:34 +00:00
Sudheer Shanka
352dc57186 Track some event history and include it in netpolicy dump.
Bug: 66921847
Test: manual
Change-Id: I0c473790f83076def807308fe44db9cb9365769e
2017-11-28 11:33:43 -08:00
Tony Mak
213955e562 Fix user color overlay is not applied
Resource overlay is now done in runtime with non-system resources object.
Amend getDefaultUserIcon to take resources object as parameter.

BUG: 69355037
Test: Factory reset, verify that overlayed color is used in multiple
places, including keyguard, the bar under quick settings and Settings app.

Change-Id: I20b0527bdcb2eb38e8bea6a05f53eea1edcba932
2017-11-28 07:47:19 +00:00
Mike Digman
93f0834976 Add route for rotation suggestions from StatusBar to CommandQueue
Test: usused pipe
Change-Id: I7a4131f8f99edbc33f8d22eda3e7a6c97b8530bf
2017-11-27 18:42:15 -08:00
Andrii Kulian
6b9d3a1400 Add transaction unit tests
Bug: 64797980
Test: android.app.servertransaction.ClientTransactionTests
Test: android.app.servertransaction.TransactionParcelTests
Change-Id: I108bacc819e9d43d0a2f5a30338ae88674a53239
2017-11-27 18:15:49 -08:00
Ahmed ElArabawy
ddd096924e Add Multicast wakelock stats in battery-stats dump
This commit adds the statistics for multicast wakelocks (count/time)
in dump of battery-stats.
This enables debugging of power issues due to extensive wakeup of host
processor due to arrival of multicast packets, and help identify the
blamed application

Bug: 33649966
Test: Manual Test
Change-Id: I882f945dd36fa2881c59776b4954017bf3c76cd7
Signed-off-by: Ahmed ElArabawy <arabawy@google.com>
2017-11-27 14:59:44 -08:00
Neil Fuller
f79a0db368 Merge "Fix checkapi for OpenJDK 9 builds" 2017-11-24 19:46:00 +00:00
Neil Fuller
57157fb310 Fix checkapi for OpenJDK 9 builds
This change explitly hides com.android.okhttp
from doclava. The public.txt generation was
previously relying on a package.html in
com.android to hide all subpackages, which
doesn't work with javadoc 9.

Test: make droid (with both OpenJDK 8 and OpenJDK 9)
Bug: 69709687
Change-Id: If61b69f913be044adb4cd34867459bde6330ea2c
2017-11-24 16:27:10 +00:00
Andrei Stingaceanu
d6644dcfea [Magnifier - 10] Make it public
* moves the Magnifier from com.android.internal.widget to
  android.widget
* removes useless public getters; useless for now because we have
  no magnifier configuration but the hardcoded one

Bug: 67839742
Bug: 63531115
Test: bit CtsWidgetTestCases:android.widget.cts.MagnifierTest
Change-Id: Ie6f474c4c781038650007a15937d61c650ee5fdd
2017-11-24 11:25:25 +00:00
Adrian Roos
e99bc0501a WM: Move WindowManagerPolicy, DisplayFrames and WindowManagerInternal into services
Splits WindowManagerPolicy into a framework and a services part, preventing concepts that are
internal to the window manager from leaking out into the framework.

Test: make droid
Change-Id: I7b6a54f55f76f6fbb5f27090981b8f1d4d8be88b
2017-11-23 17:23:26 +01:00
Jeff Sharkey
b8b579e1b8 Emit all APIs using Predicates.
Generate APIs using updated doclava.

Test: manual inspection of API text files
Bug: 69505783
Change-Id: I2efd22998a64ebb57588b073c4a591242f4aef91
2017-11-22 12:34:08 -07:00
TreeHugger Robot
f8d6392430 Merge "Output doze mode power in BatteryStats" 2017-11-22 02:55:50 +00:00
TreeHugger Robot
911fbd2313 Merge "Special handling of processes with recent tasks." 2017-11-21 20:36:28 +00:00
TreeHugger Robot
9253eeadbd Merge "The pm command is no more." 2017-11-21 20:31:47 +00:00
Dianne Hackborn
1704e3cf0c The pm command is no more.
It is now just a shell of itself. :)

Also brings in a few fixes to never try to open files from the system
process.

Test: manual
Change-Id: Ia8187196af597046fd2e7092dbf19ce1dc1ea457
2017-11-21 10:17:14 -08:00
TreeHugger Robot
253063a72d Merge "Smooth scroll RecyclerView on a11y ACTION_SCROLL_*" 2017-11-21 00:17:56 +00:00
Dianne Hackborn
68a0633ea9 Special handling of processes with recent tasks.
As the startup time of application processes has increased,
it is becoming more useful to try to keep around the process
for a recently used app, even if there are no longer any
actively running activities in it.  (For example, if you backed
out of the root activity.)

This change implements that behavior, keeping track of any recent
task entries that a process represents the root activity for,
and classififying them under a new cached proc state that is
managed the same as a cached activity.

Test: manual
Bug: 69386069
Change-Id: I430741646478763fd85b33a5384278ece831b2c3
2017-11-20 14:35:15 -08:00
Andrei Stingaceanu
f1f320c81e Merge "[Magnifier - 8] SurfaceView support and invalidate revival" 2017-11-20 13:34:46 +00:00
Andrei Stingaceanu
41589fa83d [Magnifier - 8] SurfaceView support and invalidate revival
It turns out that the auto-invalidate at a defined time,
practically polling, is not a safe way to update content
and also has more chances of producing poor quality so
temporary bring back update() and keep it hidden as the
plan is to have direct update listeners from the graphics
stack in the near future. This solution works well for
TextView, WebView and Chrome.

Added support for SurfaceView (used by Chrome).

Editor adds an onDrawListener to the TextView's tree observer
which posts to Magnifier update. This makes sure the
absolutely everytime anything changes in the view hierarchy
update() will be posted (after the actual drawing).

Bug: 63531115
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: manual test that shows the magnifier working
Change-Id: If1b858d793c7cc338d23a850051022768a3f1e40
2017-11-20 10:50:00 +00:00
TreeHugger Robot
fb5b96b4af Merge "Follow-up for Ife38c2cd94ac9902911b005dbbca8b0d0a62e6d7" 2017-11-17 21:41:59 +00:00
Mike Ma
15313c9287 Output doze mode power in BatteryStats
Bug: 69112503
Change-Id: I8d322e5c54fd9042dc26e057528fb479a46be402
Test: local & manual
2017-11-17 10:36:55 -08:00
Evan Rosky
9352e47db4 Merge "Add "KeyFallback" handling ability to Views" 2017-11-16 21:55:03 +00:00
Makoto Onuki
3aaed2912b Follow-up for Ife38c2cd94ac9902911b005dbbca8b0d0a62e6d7
Address review comments on the previous CL.
(Plus a couple bug fixes.)

Test: atest BatterySaverPolicyTest
Test: manual test
Bug: 68769804
Change-Id: If2de9148d1b8175a9f0d66bc3a7ecd02ce7a620b
2017-11-15 18:14:32 -08:00
Winson Chung
e210468aa0 Move assist data receiver interface to accessible namespace
- Also adding bundle options to pass to the recents component that is
  launched through startRecentsActivity()

Bug: 67864419
Test: Everything builds, existing tests pass
Test: go/wm-smoke
Change-Id: Ie9ee472efb132add69b8bc10798dc5214d1fa1e2
2017-11-14 12:39:21 -08:00