312426 Commits

Author SHA1 Message Date
TreeHugger Robot
0c224f9674 Merge "Revert "Whitelist ManagedProvisioning from bg check"" into oc-dev 2017-04-03 11:06:59 +00:00
TreeHugger Robot
891e03203c Merge "Prevent NPE when draw is called without bounds being set Test: unit test inside AdaptiveIconDrawableTest.java" into oc-dev 2017-04-03 09:52:19 +00:00
TreeHugger Robot
713b7c6b53 Merge "Lower-level user enumeration; fix disabled bug." into oc-dev 2017-04-03 08:36:09 +00:00
TreeHugger Robot
fd463121c6 Merge "We really want f_frsize and f_bavail." into oc-dev 2017-04-03 07:37:49 +00:00
TreeHugger Robot
e1df48d3a0 Merge "Camera: add batching support to HAL1 recording path" into oc-dev 2017-04-03 07:34:06 +00:00
Hyunyoung Song
55211c032c Prevent NPE when draw is called without bounds being set
Test: unit test inside AdaptiveIconDrawableTest.java

Change-Id: Ic3260ce9c6bae595c7eba7be1cd7ae249939a1cf
2017-04-03 00:23:49 -07:00
TreeHugger Robot
cb9ceb3fd4 Merge "Process FuseAppLoop messages in Handler.Callback" into oc-dev 2017-04-03 06:55:04 +00:00
Jeff Sharkey
8231146d4e Lower-level user enumeration; fix disabled bug.
UserManager may not have been started yet, so discover users by
looking at filesystem.

Fix disabled bug where default should be "false."

Test: builds, boots
Bug: 36794413
Change-Id: If91fd27b955175072228a93aab4b8ac3b27df0bf
2017-04-02 23:42:29 -06:00
Jeff Sharkey
dafb17e7eb We really want f_frsize and f_bavail.
It's confusing, but f_bsize is not the value you're looking for; the
real block size is f_frsize.  Fix all those bugs.

Also, the vast majority of clients are interested in the usable
disk space, not including reserved space.

Test: builds, boots
Bug: 36840579
Change-Id: Ib1470389afd49c14cab62282ec1e978ebb2c4791
2017-04-02 23:33:38 -06: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
6df866a851 Enforce PACKAGE_USAGE_STATS for usage data.
Some system services are offering package usage data through both
public/system APIs and through dump() calls.  In principle, usage
data hould always be protected with PACKAGE_USAGE_STATS, so start
enforcing that.  (Otherwise if a user blocked PACKAGE_USAGE_STATS
access to an app, that app could still obtain the data via dump()
if they held the DUMP permission.)

Bottom line, let's respect the user's wishes.

Protecting the entire output like this is pretty blunt, but future
CLs can add more nuance to the output if desired.

Test: cts-tradefed run commandAndExit cts-dev -m CtsSecurityTestCases -t android.security.cts.ServicePermissionsTest
Bug: 32806790
Change-Id: I46173562713bea7d89e12a4313c78eb52ea8d77d
2017-04-02 22:29:07 -06: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
TreeHugger Robot
21a5edcc24 Merge "Override bidi property of new emojis" into oc-dev 2017-04-03 00:21:55 +00:00
Jesse Evans
13be12e314 Adds appropriate filtering for instant apps
Adds a new filter that includes downloaded and launcher apps, as well
as instant apps, and ensured that instant apps do not appear where
they previously were not expected (downloaded and launcher apps).

Test: Added testing for the existing filter and the new one.

Bug: 36515324
Change-Id: I7ef94442bae14ee18d4b4d70f04f9bf62af9eff8
(cherry picked from commit a4e0356ed48021c353a6964ec8ea4c6b55006282)
2017-04-02 16:10:22 +00:00
Yin-Chia Yeh
19ddea90c1 Camera: add batching support to HAL1 recording path
Test: Angler HAL1 + batching normal recording mode
Bug: 35997432
Change-Id: Ibe82e7fed8d6e57291e0c009fb26ce156e66eee7
2017-04-01 13:14:20 -07:00
Chris Wren
fb54aee325 Merge "move network notification IDs to central registry" into oc-dev 2017-04-01 16:15:34 +00:00
Jakub Pawlowski
187e0108ff Merge changes from topic 'bt5-cherry-pickery-1' into oc-dev
* changes:
  Bluetooth 5 advertising duration refactoring (4/4)
  Bluetooth LE Advertising minor improvements
  Fix advertise data size estimation
  Hide periodic scanning
  Bluetooth API spelling fixes ("wether" -> "whether")
2017-04-01 15:28:34 +00:00
Jakub Pawlowski
260846b31b Bluetooth 5 advertising duration refactoring (4/4)
Expose both duration and maximum extended advertising events to limit
advertising time.

Test: manual
Bug: 30622771
Change-Id: I44df300995ef985526b93f8c24389775720b3432
(cherry picked from commit 5a355610fe6ac0460f7130375de97b4d7bae7ba4)
2017-03-31 22:47:19 -07:00
Jakub Pawlowski
d89e4ba357 Bluetooth LE Advertising minor improvements
This patch adds some additional error checking for the advertising set
parameters, and some more comments.

Test: manual
Bug: 30622771
Change-Id: I87bd44f4179ef63694ad3ed656dc2acc52e40f1e
(cherry picked from commit f4ed33f5fa6ffa3bda6faff773a3fb90b16a760c)
2017-03-31 22:47:18 -07:00
Jakub Pawlowski
66bf1bd18b Fix advertise data size estimation
UUID in service data field can be 2, 4, or 16 bytes long.

Test: manual
Bug: 36553478
Change-Id: Ib5ba2d16065496ca311e8642a15a7ea6bc84d4c1
(cherry picked from commit 72e9e9f81504559ca18b71358203b1b39d9f0581)
2017-03-31 22:47:18 -07:00
Jakub Pawlowski
a537b3f1f8 Hide periodic scanning
Bug: 30622771
Test: manual
Change-Id: I5d786b13cf99287732e16769e2563ac7c4fe715c
(cherry picked from commit 63fad69a19bbfe78e64d56c9d775ddf6d7cd84c9)
2017-03-31 22:47:17 -07:00
Jakub Pawlowski
f752ace75a Bluetooth API spelling fixes ("wether" -> "whether")
Bug: 30622771
Test: manual
Change-Id: I01c8b18d0057f2fd6e477ce2ca0b779321b6c0e6
(cherry picked from commit 08ed924d8922eec0555f6a860d80e6e2770c8a2d)
2017-03-31 22:47:16 -07:00
TreeHugger Robot
28119285e8 Merge "Revert "Layoutlib changes to support the new ResourceUrl"" into oc-dev 2017-04-01 05:31:05 +00:00
Bryce Lee
7566d76c61 Add app bounds to configuration.
The system previously overrode the display size for a specific scope
(task/activity/etc.) by setting the associated Configuration's
screenWidthDp/screenHeightDp. This leads to two issues. First, the
conversion of screen size from pixels to display independent pixels
and then upconverting later on leads to rounding errors. Secondly,
the screenWidthDp and screenHeightDp values account for insets, such
as the status bar. These however are not reflected in the display
size when returned from Display#getMetrics/getSize.

This changelist addresses the issue by adding a Rect value to
Configuration which stores the app display bounds. This is always set
at the display level and overridden as appropriate. As the proper
app insets are accounted for at the root configuration, all overrides
(outside of specific exceptions) are the result of the intersection
between the requested bound and the parent bound.

Change-Id: I2c4fcd0bee92af12aabbca258de05b4ec061d0e1
Fixes: 34338931
Bug: 36812336
Bug: 36676979
Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test CtsAppTestCases android.app.cts.AspectRatioTests
Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test CtsServicesHostTestCases android.server.cts.ActivityManagerDisplayTests
Test: bit FrameworksServicesTests:com.android.server.wm.AppBoundsTests
2017-03-31 21:34:30 -07:00
TreeHugger Robot
81b292abdf Merge changes from topic 'bitmapfactory-options-outdecodecolorspace' into oc-dev
* changes:
  Documentation for PorterDuffXfermode
  Query color space before decoding a bitmap
2017-04-01 04:17:48 +00:00
TreeHugger Robot
2579ec1b6d Merge "Fix tuner sub-screens attach" into oc-dev 2017-04-01 04:16:40 +00:00
TreeHugger Robot
2178f39eea Merge "Bluetooth: Add additional BluetoothSocket logging to root cause errors" into oc-dev 2017-04-01 03:38:11 +00:00
TreeHugger Robot
2f8f5ffc4b Merge "Handle disabled packages as removed." into oc-dev 2017-04-01 03:16:38 +00:00
TreeHugger Robot
0a198d1034 Merge "Add TYPE_PREVIEW in the javadoc of Channels.COLUMN_TYPE" into oc-dev 2017-04-01 03:01:04 +00:00
TreeHugger Robot
b9dedd43cf Merge changes from topic 'fix_activity_changed_cb-oc-dev_style_things' into oc-dev
* changes:
  Switch ActivityRecord to use static imports.
  Fix configuration change state transitions.
2017-04-01 02:52:11 +00:00
TreeHugger Robot
4d558930c8 Merge "Created an HtmlInfo object on ViewStructure." into oc-dev 2017-04-01 02:34:03 +00:00
TreeHugger Robot
e3ad0267ca Merge "Add documentation about Android TV devices may not support the alarm intents." into oc-dev 2017-04-01 02:28:49 +00:00
Andrii Kulian
a95bfff746 Fix some WM unit tests
WindowFrameTests#testLayoutNonfullscreenTask and
sizes because test assumed that frame for window was always
bigger than screen size. Now we calculate all frames relative
to real display size.

TestWindowManagerPolicy used in WM unit tests reported incorrect
value from rotationHasCompatibleMetricsLw(), which lead to
DisplayContent#mAltOrientation set to "true" after any rotation
and resulted in shrinked display metrics.

DisplayContentTests#testDefaultDisplayOverrideConfigUpdate was
not restoring the config applied to default display because
it was trying update values in config from non-empty to empty,
which is considered a no-diff.

Test: com.android.server.wm.WindowFrameTests
Test: #testCalculatePolicyCrop
Test: #testLayoutNonfullscreenTask
Test: com.android.server.wm.AppWindowTokenTests
Test: #testLandscapeSeascapeRotationByApp
Test: com.android.server.wm.DisplayContentTests
Test: #testDefaultDisplayOverrideConfigUpdate
Change-Id: Ia0ed46307f67f6b47859209ebcf13253b59b8002
2017-03-31 19:00:57 -07:00
Romain Guy
c7dacca008 Documentation for PorterDuffXfermode
It tooks 10 years, but better late than never!

Bug: 32984164
Test: Compiled documentation and checked in Chrome
Change-Id: I6dfd7fba6d3077f8c774b203589083bdbc15f9d2
2017-03-31 18:56:37 -07:00
TreeHugger Robot
24ced03e01 Merge "CTS doesn't like swiping." into oc-dev 2017-04-01 01:44:29 +00:00
Roozbeh Pournader
ce93f31035 Override bidi property of new emojis
In BidiFormatter and AndroidBidi, treat emojis new to
Unicode 10.0/Emoji 5 as bidi class ON.

Test: Manual
Bug: 32952475
Change-Id: I1a40c6ee2b6e9d91c9d1e5b64faca6d16301fe93
2017-03-31 18:34:58 -07:00
TreeHugger Robot
8371f96e99 Merge "Be more lenient about live wallpaper unavailability" into oc-dev 2017-04-01 01:01:55 +00:00
Dianne Hackborn
9484603c0f Framework support to improve bg check CTS tests.
(Finally) introduce a new ServiceConnection callback to
tell you when the binding has died.  This allows you to robustly
have a weak service monitoring, and also is an easy way to find
out about breakages due to app updates etc.

Also clean up some debug output.

Test: moved to own suite and ran them.

Change-Id: I526cc00816c384fa9eb1312b92406f38085cbff9
2017-03-31 17:58:38 -07:00
TreeHugger Robot
3d1d01a708 Merge "Import translations. DO NOT MERGE" into oc-dev 2017-04-01 00:56:40 +00:00
Tyler Gunn
07891b13f1 Merge "Add SUBSTITUTE_NOTIFICATION_APP_NAME pregrant for Telecom." into oc-dev 2017-04-01 00:54:25 +00:00
Tyler Gunn
e0d00e65ce Add SUBSTITUTE_NOTIFICATION_APP_NAME pregrant for Telecom.
Test: Manual
Bug: 36817809
Change-Id: I2d7439e3d0040b617a842812b6ae8bda3c32f1ee
2017-03-31 17:50:56 -07:00
Winson Chung
26437c0f22 Merge "Removing unnecessary permission." into oc-dev 2017-04-01 00:42:54 +00:00
TreeHugger Robot
435da2c435 Merge "Fixing rotation issues." into oc-dev 2017-04-01 00:41:25 +00:00
TreeHugger Robot
13df64aa8e Merge "Use correct binding flags when reconnecting to IME" into oc-dev 2017-04-01 00:07:00 +00:00
Winson Chung
5af42fc305 Ensuring multi-window callbacks contain new configuration and are in order
- This CL has two main changes:
  1) It modifies the activity multi-window and picture-in-picture mode
     changed callbacks to provide the configuration of the activity with
     the mode applied.
  2) It modifies the order in which the multi-window and picture-in-picture
     mode callbacks are made, to ensure that when going in and out of
     picture-in-picture: first PiP, then MW, and then the config change.
- Previously, the ordering of the two callbacks was inconsistent.  When
  calling moveActivityToPinnedStack(), we reparent the task into the pinned
  stack (triggering the picture-in-picture mode change), followed by the
  resize animation (causes configuration changes).  Inversely, when we
  expand the task to fullscreen (and not just remove it), we run the
  animation first, which resizes the task to the final size (causes
  configuration changes) then reparent after the animation completes
  (triggering the picture-in-picture mode change).

  In this CL, we ensure that for both the transition in and out of PiP, we
  defer to the bounds animation to trigger the PiP mode change.  Normal
  calls to reparent or adding a new task are unchanged.  When the PiP
  mode change is called from the animation, it provides the final target
  bounds which we use to calculate the target configuration of the activity
  for the callback.  If the bounds animation is interrupted, an update will
  also be scheduled if we change the fullscreen state we are animating to.

  To work around the issue where we are scheduling MW/PiP mode changes in
  both the animation and the configuration change, we also now keep track
  of each state internally in the ActivityRecord.

Bug: 36099777
Test: android.server.cts.ActivityManagerPinnedStackTests
Test: #testConfigurationChangeOrderDuringTransition

Change-Id: I03513bc3a4d4a72c250983f22f079ce9d7a2cb40
Signed-off-by: Winson Chung <winsonc@google.com>
2017-03-31 17:04:26 -07:00
TreeHugger Robot
f9f1f1c1c3 Merge "Use variable fonts for Noto Sans Khmer" into oc-dev 2017-04-01 00:00:52 +00:00
Stephen Chen
aed318ef07 Add friction icon for metered networks.
Bug:36100548
Test: manual inspection.
Change-Id: If7bad4028879a5cc6176cfe189b91f4756114612
2017-03-31 16:58:38 -07:00
Makoto Onuki
82fb2eb057 Handle disabled packages as removed.
Bug 36600272
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: I272334cef00337d5ba01ce4b878c799d9476432f
2017-03-31 16:58:26 -07:00
TreeHugger Robot
92f76ba958 Merge "Moar pre-partitioning refactoring." into oc-dev 2017-03-31 23:52:02 +00:00
TreeHugger Robot
f04d039584 Merge changes from topic 'launch-2d-activities-vr' into oc-dev
* changes:
  Allow shell uid to access Vr APIs
  Add vr persistent mode enable/disable
  Launch 2D activities in VR mode
2017-03-31 23:48:22 +00:00