Commit Graph

8799 Commits

Author SHA1 Message Date
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
Kenny Guy
22bd044b0c New class to track brightness slider interactions.
Provides system apps with access to the users
brightness slider interactions and context from
when the brightness level was changed.

Test: runtest -c com.android.server.display.BrightnessTrackerTest frameworks-services

Change-Id: Ibdb3c78cb1d11887cb38b24c30754ff2e6f3bda8
2017-11-13 21:52:48 +00:00
David Chen
21582961d7 Tracks isolated uid's and their parent uid.
We push events from BatteryStatsImpl if an isolated uid is added or
removed and we have a custom rule in statsd to use these events to
update our uid map. In the future, we need to use this map to
convert all incoming uid's to their host uid.

Test: Added unit-test to UidMap_test.
Change-Id: I33c0451eb2c886161f22dd12e479d216fad0940d
2017-11-09 13:39:43 -08:00
Christine Franks
69dde2ed8d Merge "Rename NightDisplayController and -Service" 2017-11-09 17:50:11 +00:00
Ricky Wai
0aa3aef95f Hide NetworkStatsFactory class
Test: Able to compile
Change-Id: I37f385c773120405c437643b5de406772a684dcd
2017-11-09 15:22:59 +00:00
Ricky Wai
1a6e667cb6 Add Network security watchlist service
Network security watchlist service is a service to monitor all potential
harmful network traffic. By setting a network watchlist, any connections
that visit any site from watchlist will be logged.

Logs will be aggregated everyday and encoded using differential
privacy before exporting it from framework.

This feature is disabled now, run "setprop ro.network_watchlist_enabled true" to enable it.

All network events are handled in an async bg thread, it should not
cause any delay in netd. Also, it uses the hooks in enterprise network logging,
so we can run netd_benchmark to measure the impact to netd.

Here are the things not included in this CL:
- ConfigUpdater to get and set watchlist
- Differential privacy encoding logic and reporting
- CTS
- Memory and performance optimization for internal watchlist data structure

Test: manual - turn on the feature, hard code a watchlist xml, process
that visited that domain is being logged in sqlite.
Test: run netd_benchmark - seems no obvious performance change.
Test: bit FrameworksCoreTests:android.net.NetworkWatchlistManagerTests
Test: runtest frameworks-net
Test: runtest frameworks-services -p com.android.server.net.watchlist

Bug: 63908748

Change-Id: I09595178bac0070a867bc5e0501a7bf2c840e398
2017-11-08 18:57:46 +00:00
Christine Franks
5397f0353a Rename NightDisplayController and -Service
Bug: 68258004
Test: make -j100 && runtest -x
frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/AutoTileManagerTest.java
&& runtest -c com.android.server.ColorDisplayServiceTest
frameworks-services
Change-Id: I2b89942bd412e4d6958e65b62bc345fb1e60176f
2017-11-08 10:29:01 -08:00
Selim Cinek
c7b5f78765 Merge changes from topic "notification_messaging"
* changes:
  Fixed measuring of messages with excess space
  Fixed the handling of oneToOne conversations for certain apps
  Improved the messaging transformation
  Implemented animations for messaging changes
  Refactored clipping util to be used in core
  Improved the headsup notification for messages
  Redesigned the messaging style
  Fixed a bug where images weren't transforming properly
2017-11-07 18:42:24 +00:00
TreeHugger Robot
7fe465a9e7 Merge "SidekickService (base)" 2017-11-07 02:29:16 +00:00
Selim Cinek
dae97c94a1 Fixed measuring of messages with excess space
Sometimes the layout was measured too big, with additional
white space that wasn't needed because of the way excess
space was handled.

Test: manual write 3 single line messages and 2 two line
Bug: 63708826
Change-Id: I09e728e87e316cb770d5c65bf355a68848e58f0b
2017-11-06 16:22:09 -08:00
Selim Cinek
1d6b50eccf Improved the messaging transformation
The messaging layout now transforms smoothly between
the different views.

Test: manual, send messages really fast, expand, collapse
Bug: 63708826
Change-Id: I79da4092eb03fb41a1963b566602386b25141192
2017-11-06 16:22:08 -08:00
Selim Cinek
d3809996af Implemented animations for messaging changes
The animations for new messages coming in are now happening
more smoothly. They have proper appear and disappear
animations.

Test: manual, add new messages, observe animations
Bug: 63708826
Change-Id: I714e976cfee5c0a2c5187a5c3146a7530739f312
2017-11-06 16:22:08 -08:00
Selim Cinek
5ec560a12a Refactored clipping util to be used in core
We need the possibility to disable clipping
up a view hierarchy also in core, so I'm
moving it and refactoring it.

Test: expand, observe normal clipping
Bug: 63708826
Change-Id: I157395be8f2b7ac75afc0a3967cb0f2068a02fb6
2017-11-06 16:22:07 -08:00
Selim Cinek
e62255ccc5 Improved the headsup notification for messages
Previously the heads up notifications and also the collapsed versions were not
displaying in the new style.
They are now displayed in the new style of heads up notifications.

Test: add messaging notification in heads up
Bug: 63708826
Change-Id: I041584cd6ee740fd8c59f332f727ed83c89e777f
2017-11-06 16:22:07 -08:00
Selim Cinek
88188f2d62 Redesigned the messaging style
The layout now looks much more recognizable
as a messaging template and enables us to
prepare for more useful functionality.

Test: Send messages and observe display
Bug: 63708826
Change-Id: I896b3692a1e84976e8fd37cf37611ddb1d358fb9
2017-11-06 16:22:04 -08:00
Evan Rosky
5e29c076cb Add "KeyFallback" handling ability to Views
This gives any view the ability to receive unhandled KeyEvents.
The order of Views receiving fallback key events is inverse
drawing order: this means higher views will receive fallback
events first.

FallbackHandlers can be added to any view via
addKeyFallbackListener. Within a view, listeners are tapped
in reverse order (such that more-recently added listeners will
receive the event first).

Bug: 32722450
Test: Added a CTS test ViewTest#testKeyFallback
Change-Id: Ibfff4db70de8fb98db0035e5aeb09271be1574c6
2017-11-06 13:11:18 -08:00
Jeff Sharkey
8918298045 Narrower StrictMode defaults.
Until now, userdebug and eng builds have tracked StrictMode
violations on all system apps, including prebuilts that we have no
control over, which results in a lot of unactionable noise.

This CL narrows the set of enabled apps to only "bundled" system
apps, which gives us a much higher chance of burning these violations
down to 0 and keeping them there.  We don't have a good proxy for an
app being "bundled", so we detect it based on being in the "android."
or "com.android." package namespace.

Clean up the entire flow of applying StrictMode defaults to make it
much more human-readable.  This resulted in us fixing a bug where
StrictMode was never actually enabled for jank-sensitive threads in
system_server!

Relax I/O checks in a few places where we know we're interacting with
procfs or sysfs.  Add internal "allow" methods that avoid object
allocation by returning raw mask.

Test: cts-tradefed run commandAndExit cts-dev -m CtsOsTestCases -t android.os.cts.StrictModeTest
Bug: 68662870
Change-Id: I536e8934fbcdec14915fcb10995fc9704ea98b29
2017-11-03 17:36:35 -06:00
TreeHugger Robot
a779b40e3a Merge "Turn default gradient into solid black" 2017-11-02 22:06:43 +00:00
TreeHugger Robot
46fabf34ea Merge "Center align AoD2 notifications" 2017-11-02 20:54:16 +00:00
TreeHugger Robot
27d39bd77e Merge "Add support for minimized mode for right dock side for tablets (1/2)" 2017-11-02 18:43:18 +00:00
David Chen
c8a4324855 Adds pulling for network bytes for statsd.
Adds atoms to collect network bytes transmitted and received via wifi
and mobile data. We need to get the list of correct ifaces from
BatteryStats since NetworkStatsService only tracks the mobile ifaces.
We split the atoms so that we can also capture metrics sliced on
foreground and background since they are available from the kernel.
Also adds an atom for the Kernel Wakelocks.

Test: Manually tested with adb shell cmd stats pull-source after
modifying the StatsPullerManager.cpp

Change-Id: I9467afad799c6d97560e868f8625fefae5c2b5e1
2017-11-02 00:41:51 -07:00
Mike Ma
d2239828d6 Record proto to file in am instrument
Add an option -f to record instrumentdata proto produced by am instrument
to a file in addition to printing to stdout. Default path is
/sdcard/instrument-logs/log-yyyyMMdd-hhmmss-SSS.instrumentation_data_proto.
If the file exits, it will be deleted before writing. Path can be changed
via optional <FILE> argument after -f.
If -f and -m are both present, proto will be written to a file and print
to stdout.

Test: build, flash and run:
bit -bi FrameworksCoreTests
adb shell am instrument -w -r -f tmp/tmp.log \
-e class com.android.internal.os.BatteryStatsNoteTest \
com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner

Change-Id: Iabc320c066d5995eee842c26416623eeb3d403f4
2017-11-01 14:20:31 -07:00
Dianne Hackborn
ad5570f58d Merge "Fully implement "install" and "install-write" in PackageManagerShellCommand." 2017-10-31 19:55:42 +00:00
TreeHugger Robot
f30e0cfca0 Merge "Simple numbering system selector for LocalePicker." 2017-10-31 19:21:53 +00:00
Matthew Ng
f59a4132e8 Add support for minimized mode for right dock side for tablets (1/2)
Tablets have the ability to dock to the right side in landscape. This
change supports minimized mode for right dock side.

Test: run-test CtsActivityManagerDeviceTestCases
android.server.am.ActivityManagerDockedStackTests#
testMinimizedFromEachDockedSide
Change-Id: Ie879bdf7bf74226c0ceda9295f9de2004fd6a9b5
Fixes: 68017311
2017-10-31 11:03:48 -07:00
Dianne Hackborn
ca3872ce36 Fully implement "install" and "install-write" in PackageManagerShellCommand.
We can use the new mechanism to ask the calling shell to open
a file in order to implement the rest of these commands, allowing
you to give the path to an apk to install.  That API is thus
extended to allow you to open readable files, not just opening
file for writing.

Doing this however means we no longer can pass a file path to
AssetManager for the apk to parse, we only have an already open
fd for that.  Extending AssetManager to allow adding apks from
fds is not that hard, however, since the underlying zip library
already supports this.

This main thing this changes is in AssetManager.cpp where we
retrieve the open zip file for a particular apk that has been
added.  This used to look up the zip file by path every time
it was needed, but that won't work anymore now that we can have
things added by fd.  Instead, we keep track of each opened zip
in the AssetManager, so we can just directly retrieve it from
the asset_path representing the item that was added.  As a
side-effect, this means for normal paths we no longer need to
look up by name, but just have the opened zip file directly
accessible.  (This is probably good, but it does mean that we
no longer run the logic of seeing if the zip file's timestamp
has changed and re-opening it if it has.  We probably shouldn't
be relying on that for an active AssetManager anyway, and maybe
it is even good that we don't allow the zip file to change
under it?)

A follow-up change will finally remove the Pm.java implementation
and turn the pm "command" into a simple shell script that runs
cmd package.

Test: manual

Change-Id: Ie103e3bdaa5b706796cc329254f2638151a3924f
2017-10-31 10:54:31 -07:00
Chris Phoenix
10a4a64bcc SidekickService (base)
Test: builds; Sidekick watch face animates in Ambient
Change-Id: I5946dbf7194653ac4707b6c186b0a9197d125d5f
2017-10-31 16:02:41 +00:00
Tobias Thierer
e74399de6f Merge "OWNERS: Prefer Jeff Sharkey's @android.com account over @google.com" am: b519569eb3 am: 4f59edb63f
am: 60923f7860

Change-Id: I52d63eac03e32f6d020809cae2cecb7cad0154c0
2017-10-31 14:01:37 +00:00
Tobias Thierer
60923f7860 Merge "OWNERS: Prefer Jeff Sharkey's @android.com account over @google.com" am: b519569eb3
am: 4f59edb63f

Change-Id: If74e0f6783bb38c707a3575821255e8f1ec4d78f
2017-10-31 13:51:26 +00:00
Christine Franks
771cf3cc44 Merge "Respect legacy color mode settings" 2017-10-31 03:16:05 +00:00
Christine Franks
17947177b3 Respect legacy color mode settings
Bug: 68411440
Test: make -j100, verified starting with each of the three options.
Change-Id: I73e701a86733e0f8a5d017949052b16cdf58f398
2017-10-30 17:26:17 -07:00
TreeHugger Robot
15c45c854e Merge "Fix StateMachine init/quit race." 2017-10-30 22:57:47 +00:00
Igor Viarheichyk
025402c5e9 Simple numbering system selector for LocalePicker.
This change introduces minimal changes needed to support selection
of locales with BCP 47 numbering system specification. Two level
selection (Language/Region) schema remains, locales with numbering
systems appear in the region selection list and are displayed as
"region (numbering system)".

Bug: 18340949
Bug: 63754513
Test: manual, experimental UI for review.

Change-Id: I42691f3714c5e5c51fd8d96c034cc3a9f6be93dc
2017-10-30 14:35:06 -07:00