Commit Graph

12100 Commits

Author SHA1 Message Date
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
TreeHugger Robot
0fbd9d163b Merge "Support insets on secondary displays" 2017-11-14 02:59:12 +00:00
Calin Juravle
8971229afd Merge "Create secondary dex profiles relative to the provided dex path" 2017-11-14 01:30:10 +00:00
Wale Ogunwale
828ff7e3ef Support insets on secondary displays
Indroduced DisplayFrames object to track frames used to calculate
window insets per display vs. at a global level in PhoneWindowManager.

Bug: 64148922
Change-Id: I19f166920eba0a4f933a223a77e096bcc8dab0c1
Test: bit FrameworksServicesTests:com.android.server.wm.ScreenDecorWindowTests
Test: go/wm-smoke
2017-11-14 01:03:50 +00:00
TreeHugger Robot
29cd580e4a Merge "Deprecate framework Fragments and Loaders" 2017-11-13 22:34:34 +00:00
TreeHugger Robot
059004e27b Merge "Revert "Support insets on secondary displays"" 2017-11-13 21:43:56 +00:00
Ian Lake
0a1feb8192 Deprecate framework Fragments and Loaders
Redirect developers to use the Support Library
versions of Fragments and Loaders to ensure that
they get consistent behavior across versions of
Android and all devices as well as access to
Lifecycle improvements.

Test: Confirmed APIs deprecated in current.txt
BUG: 68381801
Change-Id: I58ec599e557fc93c8547c45ba7c9ced96b0c8616
2017-11-13 10:55:59 -08:00
Wale Ogunwale
7bb06e012a Revert "Support insets on secondary displays"
This reverts commit 9bc2692939.

Change-Id: Ia065372e9e220e653b4729a290663c3536d99307
Fixes: 69241956
Bug: 64148922
2017-11-13 16:49:19 +00:00
TreeHugger Robot
3bba35111e Merge "Introduce CrossProfileApps API" 2017-11-13 06:43:44 +00:00
Wale Ogunwale
9bc2692939 Support insets on secondary displays
Indroduced DisplayFrames object to track frames used to calculate
window insets per display vs. at a global level in PhoneWindowManager.

Bug: 64148922
Test: bit FrameworksServicesTests:com.android.server.wm.ScreenDecorWindowTests
Test: go/wm-smoke
Change-Id: I4a668d6c2dd0bfa666cb6acecf663cf83545ea87
2017-11-10 04:57:30 -08:00
Jeff Sharkey
29862ccde0 Merge "Extend JobInfo to support NetworkRequest." 2017-11-10 00:11:58 +00:00
Jeff Sharkey
d0fff2eac4 Extend JobInfo to support NetworkRequest.
The current JobInfo.NETWORK_TYPE values offer basic network selection
ability, but more precise requirements continue to come up.  Instead
of creating more NETWORK_TYPE constants, add support for the existing
NetworkRequest object, which is the idiomatic way for an app to
express the type of network they'd like to use.

Move the implementation details of NETWORK_TYPE constants to use this
new NetworkRequest functionality.  Deprecate NETWORK_TYPE_METERED,
since the lack of the NOT_METERED capability doesn't imply that the
connection is metered.  (Apps using this API to get to a cellular
network should use TRANSPORT_CELLULAR instead.)

Add new SystemClock APIs that return java.time.Clock instances for
various Android-specific clocks.  This gives us a clean interface
(with negligible overhead) for swapping in artificial clocks for
testing purposes.

Improve JobStoreTest to validate new NetworkRequest features, and
add one last sanity check to assertTasksEqual() to compare raw
bits-on-wire, to catch people who forget to check new fields.  Watch
for IoThread to go idle to run tests faster.

Test: bit FrameworksServicesTests:com.android.server.job.
Bug: 67040695
Change-Id: I189e7602132a0ec26d2f0cc6dadc188664961a47
2017-11-09 13:23:31 -07:00
Ricky Wai
a3e562cd8f Merge "Add Network security watchlist service" 2017-11-09 13:35:12 +00:00
TreeHugger Robot
54e6fcdebf Merge changes Iae56bcd2,I5b2e37c3
* changes:
  Fixed logic issue with WC.supportsSplitScreenWindowingMode()
  Don't move home task forward in some cases.
2017-11-09 01:57:02 +00:00
TreeHugger Robot
dbc78eebd9 Merge "Allow standby timeouts to occur after usage" 2017-11-09 01:35:22 +00:00
TreeHugger Robot
bc1ca0d9bc Merge "Unhide MAKE_USER_EPHEMERAL" 2017-11-09 00:39:57 +00:00
Amith Yamasani
84cd7b7a9e Allow standby timeouts to occur after usage
And inform listeners when the bucket changes, not just when
going in and out of RARE bucket.
Avoid redundant callbacks when informing listeners.

Bug: 63527785
Test: runtest -x
frameworks/base/services/tests/servicestests/src/com/android/server/usage/AppStandbyControllerTests.java
Change-Id: Icd98d59f597147fbf8ea4bf44edf4b3b3d5c8e14
2017-11-08 15:06:10 -08:00
Wale Ogunwale
2b07da80e2 Fixed logic issue with WC.supportsSplitScreenWindowingMode()
A container can support split-screen windowing mode while in pinned or
freeform mode. However, there were some call-points that were using the
method to determine if the container is affected by the split-screen
stack resizing. So, just created a new method
ActivityStack.affectedBySplitScreenResize() for those.

Change-Id: Iae56bcd2cb696179dda39b77a69035d5f067a23d
Fixes: 68762925
Test: go/wm-smoke
Test: Manual steps from bug.
2017-11-08 14:52:40 -08: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
yuemingw
2280019d5a Fix cts failure for com.android.cts.devicepolicy.ManagedProfileTest#testParentProfileApiDisabled
Change-Id: Iba6078f06d7d251a12c530058d1f2ace78aa3e92
Fix: 68954948
Test: com.android.cts.devicepolicy.ManagedProfileTest#testParentProfileApiDisabled
2017-11-08 10:27:14 +00: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
Selim Cinek
f7409dbbb2 Fixed the handling of oneToOne conversations for certain apps
Certain apps were using specific white-spaces in order to get
an effect they wanted on the old messaging style. We're now
fixing that to ensure that the transition is smoothed

Test: manual send messages using multiple apps
Bug: 63708826
Change-Id: Ie8628c5b394b974f3dfcbbc6f26a7f50bc60a7b9
2017-11-06 16:22:08 -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
Calin Juravle
07e5fc46ea Create secondary dex profiles relative to the provided dex path
We previously used the realpath to simplify the validation and processing
in installd. However it ended up making things more complicated when
cleaning up the profiles, especially because of /data/user/0 symlinks to
/data/data/.

Instead of using the realpath of the dex file to compute the profile
location, use the file path as given. This makes things consistent with
DexManager registration and allows for easier dex file reconciliation in
the presence of symlinks.

Bug: 64460009
Test: manual
Change-Id: I2362f32a679324d4bc1e8a0fe83b5b17ee523e7a
2017-11-06 13:27:51 -08:00
TreeHugger Robot
a7d81598b5 Merge "Fix content observer in SliceView" 2017-11-06 14:47:14 +00:00
Jeff Sharkey
7370d8bd07 Merge changes I61178def,I536e8934
* changes:
  Flip feature flag to enable StrictMode defaults.
  Narrower StrictMode defaults.
2017-11-04 02:39:34 +00:00
TreeHugger Robot
8095edc17b Merge "Update shortcuts to match spec" 2017-11-04 00:29:43 +00: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
51c05d23b4 Merge "Fix BatteryManager.getIntProperty returns 0 as invalid value." 2017-11-03 21:11:47 +00:00
Mady Mellor
603e779aa5 Fix content observer in SliceView
showSlice was being called which would clear the content observer, instead
specify slice and reinflate within setSlice(uri) method.

Test: Have a slice, call notifyContentChanged on the uri, note that it
      updates

Change-Id: I5ce8af2867114b9d053f1623bc4a47dfabe961fc
2017-11-03 13:34:07 -07:00
Yifan Hong
b0f1352be1 Fix BatteryManager.getIntProperty returns 0 as invalid value.
Long.MIN_VALUE cast to Integer.MIN_VALUE always returns 0.

Change-Id: Ief7a1fd12a356c83a4ef3f28139c330034507dfa
Fixes: 37090343
Test: BatteryManagerTest
2017-11-03 19:26:06 +00:00
Amith Yamasani
4a76a3f32a Merge "Make CHANGE_APP_IDLE_STATE a system API" 2017-11-03 15:34:25 +00:00
Amith Yamasani
4470ab9c33 Make CHANGE_APP_IDLE_STATE a system API
Allows a privileged app to set standby bucket states for apps.

Bug: 63527785
Test: adb shell am set-standby-bucket com.example.foo 0
Change-Id: I613f8872ae816e39b167aad1c289187362aa6094
2017-11-02 21:12:18 -07:00
Winson Chung
84deaa29d4 Ensure closeSystemDialogs() is not oneway.
Bug: 68787785
Test: Launch overview with QS down
Change-Id: I136a3d2e45a91abe364027747bca03d4edb454c5
2017-11-02 15:57:28 -07:00
Andreas Gampe
9f4e7dbff8 Merge "Revert "Make CHANGE_APP_IDLE_STATE a system API"" 2017-11-02 22:45:16 +00:00
Mady Mellor
b367fb754a Update shortcuts to match spec
Necessary information for a shortcut is label, icon, intent. This alters
how that information is retrieved from a Slice and falls back to using
the app icon / title / intent if any of the information is missing from
the slice ensuring that there is always an actionable shortcut.

Also adds notion of HINT_HIDDEN, allowing apps to exclude parts of a slice
from being visible in a template, note when creating a shortcut HINT_HIDDEN
is ignored.

Test: Manual with SlicesApp, test different varients of having HINT_TITLE
      and not having HINT_TITLE on an action / icon / label as well as
      not having an icon / label / or action.
Bug: 68378574

Change-Id: I1de9e502204dfb7fd83a7ec7622e8fd464146cfd
2017-11-02 15:17:58 -07:00
Andreas Gampe
8948c79fe0 Revert "Make CHANGE_APP_IDLE_STATE a system API"
This reverts commit c433ee5451.

Fails on walleye with:

java.lang.IllegalStateException: Signature|privileged permissions not in privapp-permissions whitelist: {com.android.settings: android.permission.CHANGE_APP_IDLE_STATE, com.android.shell: android.permission.CHANGE_APP_IDLE_
STATE}

Bug: 63527785
Change-Id: I7a30615d20a6c22467a41d4b2d4f84f7702ce195
2017-11-02 21:58:15 +00:00
Steven Thomas
ec0aaa0650 Merge "On standalones, stay in vr mode until standby" 2017-11-02 21:14:15 +00:00
Amith Yamasani
68eec5cbee Merge "Make CHANGE_APP_IDLE_STATE a system API" 2017-11-02 19:49:06 +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
Amith Yamasani
c433ee5451 Make CHANGE_APP_IDLE_STATE a system API
Allows a privileged app to set standby bucket states for apps.

Bug: 63527785
Test: adb shell am set-standby-bucket com.example.foo 0
Change-Id: I069546555e1b370247f8cd45b2f4c32e6abe15ed
2017-11-02 17:14:49 +00:00
Steven Thomas
1356ec950f On standalones, stay in vr mode until standby
On standalones, stay in vr mode until the Power Policy Service notifies
us it has switched to standby mode.

We still have a few issues elsewhere in the code, so the "stay in vr
mode" functionality is only enabled if the system property
"persist.vr.use_standby_to_exit_vr_mode" is set to true, which you can
do like this:

$ adb shell setprop persist.vr.use_standby_to_exit_vr_mode true

Bug: 65248224

Test: - Confirmed on a standalone that doffing leaves us in vr mode for
5 minutes, then we get a notification that we've entered standby, and we
exit vr mode. Confirmed we enter vr mode again when we don the device.

- Confirmed no behavioral change on phones, as expected.

Change-Id: I41d62761fe8c2fc7630f0615732453669cb25f06
2017-11-01 17:58:52 -07:00
Lucas Dupin
80f05cee86 Merge "Fix slice permissions to allow uri grants" 2017-11-01 22:32:29 +00:00
Jason Monk
b40dad566a Fix slice permissions to allow uri grants
Also bypass when caller is self.

Test: bind own app's slice.
Bug: 68751119
Change-Id: I7b4b0f2a81bf6168cb81b03056c6b75e17808036
2017-11-01 16:14:01 -04:00
Tony Mak
1b708e68b3 Introduce CrossProfileApps API
CTS will be in next CL.
APIs for labels/ icons of profile switching are not implemented yet.

Test: Wrote a test app to play around the APIs
Test: bit FrameworksServicesTests:com.android.server.pm.crossprofile.CrossProfileAppsServiceImplTest
BUG: 67765768

Change-Id: I27714aa4a8d61c6df398cbc5112cb4c35316a3fb
2017-11-01 10:11:51 +00:00
Bryce Lee
e83f34cde7 Remove orientation restriction to only fullscreen activities.
This changelist removes checks that enforce that only fullscreen,
opaque activities may request orientation changes. An application
may itself be compatible with the change and update their SDK level.
However, it is possible they use a library that has not itself been
updated and still leverages this feature for non-fullscreen
activities.

Change-Id: Ie1d300e3531fc8c588d2124dea698e4a876713c2
Fixes: 68684796
Test: bit FrameworksServicesTests:com.android.server.wm.AppWindowTokenTests
2017-10-31 20:25:15 -07:00
Winson Chung
b43a529e5b Merge changes Icb5ea78e,I1cf97299
* changes:
  Move more calls to the lib.
  Migrating some animation spec logic to shared lib
2017-11-01 00:42:27 +00:00
TreeHugger Robot
aaad26df79 Merge "Allow dnd access for secondary users" 2017-10-31 20:17:35 +00:00
Charles He
11e7d7d650 Merge "AM: make LockTask truly multi-task-aware." 2017-10-31 20:08:56 +00:00