OSDN Git Service

android-x86/frameworks-base.git
7 years agoRevert "Handle case when snapshot dimensions don't match"
Jason Monk [Thu, 6 Apr 2017 18:28:19 +0000 (18:28 +0000)]
Revert "Handle case when snapshot dimensions don't match"

This reverts commit aea6b74e17a0f7b105999adad50dd20eac17df35.
Bug: 36991071
Bug: 36703868
Change-Id: Ie71992144e78a6580bfce17dfdf20396af80eacd

7 years agoHandle case when snapshot dimensions don't match
Jorim Jaggi [Tue, 21 Mar 2017 16:36:26 +0000 (17:36 +0100)]
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

7 years agoRevert "Temporarily bg-whitelist the default container package-cleaning service"
Jorim Jaggi [Mon, 3 Apr 2017 12:40:39 +0000 (14:40 +0200)]
Revert "Temporarily bg-whitelist the default container package-cleaning service"

Causes bootloop.

This reverts commit f16e7423c79c4ccccf43265a5b1966eb8e7f7be7.

7 years agoMerge "Revert "Whitelist ManagedProvisioning from bg check"" into oc-dev
TreeHugger Robot [Mon, 3 Apr 2017 11:06:53 +0000 (11:06 +0000)]
Merge "Revert "Whitelist ManagedProvisioning from bg check"" into oc-dev

7 years agoMerge "Prevent NPE when draw is called without bounds being set Test: unit test insid...
TreeHugger Robot [Mon, 3 Apr 2017 09:52:13 +0000 (09:52 +0000)]
Merge "Prevent NPE when draw is called without bounds being set Test: unit test inside AdaptiveIconDrawableTest.java" into oc-dev

7 years agoMerge "Lower-level user enumeration; fix disabled bug." into oc-dev
TreeHugger Robot [Mon, 3 Apr 2017 08:36:04 +0000 (08:36 +0000)]
Merge "Lower-level user enumeration; fix disabled bug." into oc-dev

7 years agoMerge "We really want f_frsize and f_bavail." into oc-dev
TreeHugger Robot [Mon, 3 Apr 2017 07:37:44 +0000 (07:37 +0000)]
Merge "We really want f_frsize and f_bavail." into oc-dev

7 years agoMerge "Camera: add batching support to HAL1 recording path" into oc-dev
TreeHugger Robot [Mon, 3 Apr 2017 07:34:01 +0000 (07:34 +0000)]
Merge "Camera: add batching support to HAL1 recording path" into oc-dev

7 years agoPrevent NPE when draw is called without bounds being set
Hyunyoung Song [Mon, 3 Apr 2017 07:23:49 +0000 (00:23 -0700)]
Prevent NPE when draw is called without bounds being set
Test: unit test inside AdaptiveIconDrawableTest.java

Change-Id: Ic3260ce9c6bae595c7eba7be1cd7ae249939a1cf

7 years agoMerge "Process FuseAppLoop messages in Handler.Callback" into oc-dev
TreeHugger Robot [Mon, 3 Apr 2017 06:54:59 +0000 (06:54 +0000)]
Merge "Process FuseAppLoop messages in Handler.Callback" into oc-dev

7 years agoLower-level user enumeration; fix disabled bug.
Jeff Sharkey [Mon, 3 Apr 2017 05:42:17 +0000 (23:42 -0600)]
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

7 years agoWe really want f_frsize and f_bavail.
Jeff Sharkey [Mon, 3 Apr 2017 05:24:40 +0000 (23:24 -0600)]
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

7 years agoProcess FuseAppLoop messages in Handler.Callback
Daichi Hirono [Mon, 3 Apr 2017 04:18:40 +0000 (13:18 +0900)]
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

7 years agoEnforce PACKAGE_USAGE_STATS for usage data.
Jeff Sharkey [Fri, 31 Mar 2017 20:08:23 +0000 (14:08 -0600)]
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

7 years agoConsistent dump() permission checking.
Jeff Sharkey [Fri, 31 Mar 2017 20:08:23 +0000 (14:08 -0600)]
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

7 years agoMerge "Override bidi property of new emojis" into oc-dev
TreeHugger Robot [Mon, 3 Apr 2017 00:21:50 +0000 (00:21 +0000)]
Merge "Override bidi property of new emojis" into oc-dev

7 years agoCamera: add batching support to HAL1 recording path
Yin-Chia Yeh [Wed, 22 Mar 2017 01:48:44 +0000 (18:48 -0700)]
Camera: add batching support to HAL1 recording path

Test: Angler HAL1 + batching normal recording mode
Bug: 35997432
Change-Id: Ibe82e7fed8d6e57291e0c009fb26ce156e66eee7

7 years agoMerge "move network notification IDs to central registry" into oc-dev
Chris Wren [Sat, 1 Apr 2017 16:15:30 +0000 (16:15 +0000)]
Merge "move network notification IDs to central registry" into oc-dev

7 years agoMerge changes from topic 'bt5-cherry-pickery-1' into oc-dev
Jakub Pawlowski [Sat, 1 Apr 2017 15:28:29 +0000 (15:28 +0000)]
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")

7 years agoBluetooth 5 advertising duration refactoring (4/4)
Jakub Pawlowski [Fri, 31 Mar 2017 02:10:08 +0000 (19:10 -0700)]
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)

7 years agoBluetooth LE Advertising minor improvements
Jakub Pawlowski [Thu, 30 Mar 2017 18:19:24 +0000 (11:19 -0700)]
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)

7 years agoFix advertise data size estimation
Jakub Pawlowski [Fri, 31 Mar 2017 23:49:13 +0000 (16:49 -0700)]
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)

7 years agoHide periodic scanning
Jakub Pawlowski [Thu, 30 Mar 2017 00:00:44 +0000 (17:00 -0700)]
Hide periodic scanning

Bug: 30622771
Test: manual
Change-Id: I5d786b13cf99287732e16769e2563ac7c4fe715c
(cherry picked from commit 63fad69a19bbfe78e64d56c9d775ddf6d7cd84c9)

7 years agoBluetooth API spelling fixes ("wether" -> "whether")
Jakub Pawlowski [Thu, 23 Mar 2017 05:44:09 +0000 (22:44 -0700)]
Bluetooth API spelling fixes ("wether" -> "whether")

Bug: 30622771
Test: manual
Change-Id: I01c8b18d0057f2fd6e477ce2ca0b779321b6c0e6
(cherry picked from commit 08ed924d8922eec0555f6a860d80e6e2770c8a2d)

7 years agoMerge "Revert "Layoutlib changes to support the new ResourceUrl"" into oc-dev
TreeHugger Robot [Sat, 1 Apr 2017 05:31:01 +0000 (05:31 +0000)]
Merge "Revert "Layoutlib changes to support the new ResourceUrl"" into oc-dev

7 years agoMerge changes from topic 'bitmapfactory-options-outdecodecolorspace' into oc-dev
TreeHugger Robot [Sat, 1 Apr 2017 04:17:41 +0000 (04:17 +0000)]
Merge changes from topic 'bitmapfactory-options-outdecodecolorspace' into oc-dev

* changes:
  Documentation for PorterDuffXfermode
  Query color space before decoding a bitmap

7 years agoMerge "Fix tuner sub-screens attach" into oc-dev
TreeHugger Robot [Sat, 1 Apr 2017 04:16:36 +0000 (04:16 +0000)]
Merge "Fix tuner sub-screens attach" into oc-dev

7 years agoMerge "Bluetooth: Add additional BluetoothSocket logging to root cause errors" into...
TreeHugger Robot [Sat, 1 Apr 2017 03:38:07 +0000 (03:38 +0000)]
Merge "Bluetooth: Add additional BluetoothSocket logging to root cause errors" into oc-dev

7 years agoMerge "Handle disabled packages as removed." into oc-dev
TreeHugger Robot [Sat, 1 Apr 2017 03:16:35 +0000 (03:16 +0000)]
Merge "Handle disabled packages as removed." into oc-dev

7 years agoMerge "Add TYPE_PREVIEW in the javadoc of Channels.COLUMN_TYPE" into oc-dev
TreeHugger Robot [Sat, 1 Apr 2017 03:01:00 +0000 (03:01 +0000)]
Merge "Add TYPE_PREVIEW in the javadoc of Channels.COLUMN_TYPE" into oc-dev

7 years agoMerge changes from topic 'fix_activity_changed_cb-oc-dev_style_things' into oc-dev
TreeHugger Robot [Sat, 1 Apr 2017 02:52:08 +0000 (02:52 +0000)]
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.

7 years agoMerge "Created an HtmlInfo object on ViewStructure." into oc-dev
TreeHugger Robot [Sat, 1 Apr 2017 02:33:56 +0000 (02:33 +0000)]
Merge "Created an HtmlInfo object on ViewStructure." into oc-dev

7 years agoMerge "Add documentation about Android TV devices may not support the alarm intents...
TreeHugger Robot [Sat, 1 Apr 2017 02:28:45 +0000 (02:28 +0000)]
Merge "Add documentation about Android TV devices may not support the alarm intents." into oc-dev

7 years agoDocumentation for PorterDuffXfermode
Romain Guy [Sat, 1 Apr 2017 01:56:37 +0000 (18:56 -0700)]
Documentation for PorterDuffXfermode

It tooks 10 years, but better late than never!

Bug: 32984164
Test: Compiled documentation and checked in Chrome
Change-Id: I6dfd7fba6d3077f8c774b203589083bdbc15f9d2

7 years agoMerge "CTS doesn't like swiping." into oc-dev
TreeHugger Robot [Sat, 1 Apr 2017 01:44:24 +0000 (01:44 +0000)]
Merge "CTS doesn't like swiping." into oc-dev

7 years agoOverride bidi property of new emojis
Roozbeh Pournader [Sat, 1 Apr 2017 01:30:28 +0000 (18:30 -0700)]
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

7 years agoMerge "Be more lenient about live wallpaper unavailability" into oc-dev
TreeHugger Robot [Sat, 1 Apr 2017 01:01:51 +0000 (01:01 +0000)]
Merge "Be more lenient about live wallpaper unavailability" into oc-dev

7 years agoMerge "Import translations. DO NOT MERGE" into oc-dev
TreeHugger Robot [Sat, 1 Apr 2017 00:56:36 +0000 (00:56 +0000)]
Merge "Import translations. DO NOT MERGE" into oc-dev

7 years agoMerge "Add SUBSTITUTE_NOTIFICATION_APP_NAME pregrant for Telecom." into oc-dev
Tyler Gunn [Sat, 1 Apr 2017 00:54:21 +0000 (00:54 +0000)]
Merge "Add SUBSTITUTE_NOTIFICATION_APP_NAME pregrant for Telecom." into oc-dev

7 years agoAdd SUBSTITUTE_NOTIFICATION_APP_NAME pregrant for Telecom.
Tyler Gunn [Sat, 1 Apr 2017 00:50:56 +0000 (17:50 -0700)]
Add SUBSTITUTE_NOTIFICATION_APP_NAME pregrant for Telecom.

Test: Manual
Bug: 36817809
Change-Id: I2d7439e3d0040b617a842812b6ae8bda3c32f1ee

7 years agoMerge "Removing unnecessary permission." into oc-dev
Winson Chung [Sat, 1 Apr 2017 00:42:51 +0000 (00:42 +0000)]
Merge "Removing unnecessary permission." into oc-dev

7 years agoMerge "Fixing rotation issues." into oc-dev
TreeHugger Robot [Sat, 1 Apr 2017 00:41:21 +0000 (00:41 +0000)]
Merge "Fixing rotation issues." into oc-dev

7 years agoMerge "Use correct binding flags when reconnecting to IME" into oc-dev
TreeHugger Robot [Sat, 1 Apr 2017 00:06:57 +0000 (00:06 +0000)]
Merge "Use correct binding flags when reconnecting to IME" into oc-dev

7 years agoMerge "Use variable fonts for Noto Sans Khmer" into oc-dev
TreeHugger Robot [Sat, 1 Apr 2017 00:00:48 +0000 (00:00 +0000)]
Merge "Use variable fonts for Noto Sans Khmer" into oc-dev

7 years agoHandle disabled packages as removed.
Makoto Onuki [Fri, 31 Mar 2017 23:58:26 +0000 (16:58 -0700)]
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

7 years agoMerge "Moar pre-partitioning refactoring." into oc-dev
TreeHugger Robot [Fri, 31 Mar 2017 23:51:58 +0000 (23:51 +0000)]
Merge "Moar pre-partitioning refactoring." into oc-dev

7 years agoMerge changes from topic 'launch-2d-activities-vr' into oc-dev
TreeHugger Robot [Fri, 31 Mar 2017 23:48:18 +0000 (23:48 +0000)]
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

7 years agoAdd documentation about Android TV devices may not support the alarm
Daniel Cardenas [Fri, 31 Mar 2017 23:29:11 +0000 (16:29 -0700)]
Add documentation about Android TV devices may not support the alarm
intents.

Bug: 36003137

Test: Build
Change-Id: Ia469f6e066c7aa9ed1ebcda3ea12fb3254654fb6

7 years agoMerge "Implement issue #36590595: Add ability to associated a ClipData with JobInfo...
TreeHugger Robot [Fri, 31 Mar 2017 23:21:07 +0000 (23:21 +0000)]
Merge "Implement issue #36590595: Add ability to associated a ClipData with JobInfo" into oc-dev

7 years agoMerge "QS: Add transient icon for hotspot" into oc-dev
TreeHugger Robot [Fri, 31 Mar 2017 23:18:40 +0000 (23:18 +0000)]
Merge "QS: Add transient icon for hotspot" into oc-dev

7 years agoMerge "Ensure we show the PiP menu in response to KEYCODE_WINDOW." into oc-dev
TreeHugger Robot [Fri, 31 Mar 2017 23:07:20 +0000 (23:07 +0000)]
Merge "Ensure we show the PiP menu in response to KEYCODE_WINDOW." into oc-dev

7 years agoMerge "Import translations. DO NOT MERGE" into oc-dev
TreeHugger Robot [Fri, 31 Mar 2017 23:06:55 +0000 (23:06 +0000)]
Merge "Import translations. DO NOT MERGE" into oc-dev

7 years agoSwitch ActivityRecord to use static imports.
Ruben Brunk [Tue, 28 Mar 2017 03:26:17 +0000 (20:26 -0700)]
Switch ActivityRecord to use static imports.

- Per comments from ogunwale,jjaggi on ag/2016938, static imports
  are preferred when possible, and are part of Android's tacit style guide.

Bug: 36662390
Test: Covered by existing unit tests.

Change-Id: Ic3897dd7a4a9cb665fc3d8c7a171f74494f02a2e

7 years agoMerge "Import translations. DO NOT MERGE" into oc-dev
TreeHugger Robot [Fri, 31 Mar 2017 23:04:18 +0000 (23:04 +0000)]
Merge "Import translations. DO NOT MERGE" into oc-dev

7 years agoFix configuration change state transitions.
Ruben Brunk [Thu, 23 Mar 2017 05:03:25 +0000 (22:03 -0700)]
Fix configuration change state transitions.

- Do not ever do onDestroy/onCreate cycle for VR activities when
  configuration is changed due to VR mode UI change.
- Do not gate on global configuration change check, as updates
  to the global UI mode configuration can race with activity
  lifecycle changes.

Bug: 36491752
Bug: 36515684

Test: Manually checked activity lifecycle for pre-O, O VR apks.

Change-Id: Ic2739c6e78c1bdfe876bf1302cd0adeaadece15c

7 years agoMerge "Import translations. DO NOT MERGE" into oc-dev
TreeHugger Robot [Fri, 31 Mar 2017 23:01:28 +0000 (23:01 +0000)]
Merge "Import translations. DO NOT MERGE" into oc-dev

7 years agoBluetooth: Add additional BluetoothSocket logging to root cause errors
Ajay Panicker [Tue, 28 Mar 2017 21:28:27 +0000 (14:28 -0700)]
Bluetooth: Add additional BluetoothSocket logging to root cause errors

Bug: 34780400
Test: Code still compiles
Change-Id: I166842ecc6889f9ea403e7aa3678ed818cd80968

7 years agoMerge "Import translations. DO NOT MERGE" into oc-dev
TreeHugger Robot [Fri, 31 Mar 2017 22:23:54 +0000 (22:23 +0000)]
Merge "Import translations. DO NOT MERGE" into oc-dev

7 years agoRemoving unnecessary permission.
Winson Chung [Fri, 31 Mar 2017 19:48:28 +0000 (12:48 -0700)]
Removing unnecessary permission.

Bug: 36507456
Test: android.server.cts.ActivityManagerPinnedStackTests
Test: #testFinishPipActivityWithTaskOverlay
Change-Id: I351b7afd648ceb0a200c01fa318c9a56dbe64a96

7 years agoFixing rotation issues.
Winson Chung [Fri, 31 Mar 2017 01:15:30 +0000 (18:15 -0700)]
Fixing rotation issues.

- Ensuring that we can update the stack bounds of non-docked stacks upon
  rotation while split screen is enabled (previously disabled)
- Fix issue where subsequent bounds calculations were using the animation
  target bounds from the prior orientation

Bug: 36657966
Test: android.server.cts.ActivityManagerPinnedStackTests
Change-Id: I810e35f907721ef5c781b914adac3273ea8da5c8

7 years agoBe more lenient about live wallpaper unavailability
Christopher Tate [Fri, 31 Mar 2017 19:28:30 +0000 (12:28 -0700)]
Be more lenient about live wallpaper unavailability

- Give the app 5 more seconds to restart following a crash
- Presume that system-default wallpapers are robust, and don't fall back
  to showing nothing at all if timing or update problems arise
- Improve logging about static imagery handling during boot
- For now, turn on a bit more logging about wallpaper activity

Bug 36573894
Bug 34979999
Test: manual

Change-Id: I787a351f1251b83451d55bb98a4e0de9ce17836a

7 years agoMerge "Add feature constants in Call Log provider to identify HD and WIFI calls....
Tyler Gunn [Fri, 31 Mar 2017 20:14:53 +0000 (20:14 +0000)]
Merge "Add feature constants in Call Log provider to identify HD and WIFI calls." into oc-dev

7 years agoMerge "Add 'am start-foreground-service' shell command" into oc-dev
TreeHugger Robot [Fri, 31 Mar 2017 20:14:46 +0000 (20:14 +0000)]
Merge "Add 'am start-foreground-service' shell command" into oc-dev

7 years agoAdd feature constants in Call Log provider to identify HD and WIFI calls.
BIN ZHOU [Fri, 31 Mar 2017 16:54:04 +0000 (11:54 -0500)]
Add feature constants in Call Log provider to identify HD and WIFI calls.

Makes use of existing features column in the provider.

Test: Manual
Bug: 35359461
Change-Id: I405893771a2dac2bb25a54065238917ac2d515c8

7 years agoUse correct binding flags when reconnecting to IME
Yohei Yukawa [Thu, 30 Mar 2017 22:57:02 +0000 (15:57 -0700)]
Use correct binding flags when reconnecting to IME

Since ICS MR-1 [1], InputMethodManagerService (IMMS) establishes two
connections to an IME: one is for general connection and the other to
allow the system to adjust the IME's performance characteristics much
more like a foreground activity. The tricky point is that the former
connection can be re-connected not only IMMS#startInputInnerLocked() in
but also in IMMS#showCurrentInputLocked().

It turns out that some previous attempts to adjust BIND_ flags for the
former connection [2][3] were not applied to
IMMS#showCurrentInputLocked().  This CL addresses that inconsistency by
make it clear that IMMS establishes up to connections to the IME.

 [1]: Id1f73de66dc93d63212183958a72119ad174318b
      2c84cfc001fb92a71811bf7384b7f865ff31ff9d
 [2]: I1724113f42abe7862e8aecb6faae5a7620245e89
      c8230519728b14065effd3b7d4eca273ff86160c
 [3]: Ie5793fd9b40d980fa18f80246326511ed6ae0597
      f0f94d129b6eb3c48624e915898d86d4f2de59ff

Test: Manuall tested as follows.
      1. Build and flash an OS image.
      2. Complete the setup wizard (if any).
      3. tapas LatinIME && make -j
      4. adb install -r out/target/product/generic/system/app/LatinIME/LatinIME.apk
      5. Run a test program that keeps calling IMM#showSoftInput()
      6. adb shell ime enable com.android.inputmethod.latin/.LatinIME
      7. adb shell ime set com.android.inputmethod.latin/.LatinIME
      8. adb shell dumpsys activity processes android
         Make sure that there is a ConnectionRecord to
         com.android.inputmethod.latin that has "CR !FG UI !VIS" bits.
      9. adb install -r out/target/product/generic/system/app/LatinIME/LatinIME.apk
     10. adb shell dumpsys activity processes android
         Make sure that there is a ConnectionRecord to
         com.android.inputmethod.latin that has "CR !FG UI !VIS" bits.
Fixes: 36727763
Change-Id: Ib7fa34b21e1fb8bb5b19a9b08e36d0565f3dd266

7 years agoMerge "restore the title string un UsbDeviceManager" into oc-dev
Chris Wren [Fri, 31 Mar 2017 19:49:04 +0000 (19:49 +0000)]
Merge "restore the title string un UsbDeviceManager" into oc-dev

7 years agoMerge "Include likely IMEs in ANR dumping" into oc-dev
Brian Carlstrom [Fri, 31 Mar 2017 19:46:48 +0000 (19:46 +0000)]
Merge "Include likely IMEs in ANR dumping" into oc-dev

7 years agoMerge "Add null check to InputMonitor.notifyANR" into oc-dev
Brian Carlstrom [Fri, 31 Mar 2017 19:46:13 +0000 (19:46 +0000)]
Merge "Add null check to InputMonitor.notifyANR" into oc-dev

7 years agorestore the title string un UsbDeviceManager
Chris Wren [Fri, 31 Mar 2017 19:37:45 +0000 (15:37 -0400)]
restore the title string un UsbDeviceManager

Bug: 32584866
Test: make
Change-Id: I4e4dea064a1af194db5660b0765cc4c4b666584a

7 years agoUse variable fonts for Noto Sans Khmer
Jungshik Shin [Fri, 17 Mar 2017 21:56:17 +0000 (14:56 -0700)]
Use variable fonts for Noto Sans Khmer

Update fonts.xml to use NotoSansKhmer-VF.ttf.

The weight range of Khmer is also extended to have 9 weight instances
(three more than Roboto with 200, 600 and 800).

The width range for Khmer is left alone partly because of an apparent
lack of support in fonts.xml for non-normal width fallback fonts.

Note that Noto Sans Khmer UI is left alone because of a baseline issue.

BUG: 22667753
Test: See the QA instruction in comment 10 of the bug.
Test: fontchain_lint
Change-Id: Idf6d4fec86822663ac08feb8979edacbc6c709a0

7 years agoMerge "Update default max time of waiting for network state to get updated." into...
Sudheer Shanka [Fri, 31 Mar 2017 19:03:07 +0000 (19:03 +0000)]
Merge "Update default max time of waiting for network state to get updated." into oc-dev

7 years agoMerge "Introduce Authentication Failure reason codes" into oc-dev
Sohani Rao [Fri, 31 Mar 2017 18:51:12 +0000 (18:51 +0000)]
Merge "Introduce Authentication Failure reason codes" into oc-dev

7 years agoMerge "Add flags for quick viewer to indicate capabilities of a document." into oc-dev
Garfield Tan [Fri, 31 Mar 2017 18:04:49 +0000 (18:04 +0000)]
Merge "Add flags for quick viewer to indicate capabilities of a document." into oc-dev

7 years agomove network notification IDs to central registry
Chris Wren [Fri, 31 Mar 2017 17:52:39 +0000 (13:52 -0400)]
move network notification IDs to central registry

Bug: 36808999
Test: make
Change-Id: I34bafa9ce69fc6913a6b4a5935cafd8979d0193b

7 years agoMerge "SettingsLib: wifi: encapsulate Passpoint configuration in AccessPoint" into...
TreeHugger Robot [Fri, 31 Mar 2017 17:54:13 +0000 (17:54 +0000)]
Merge "SettingsLib: wifi: encapsulate Passpoint configuration in AccessPoint" into oc-dev

7 years agoSettingsLib: wifi: encapsulate Passpoint configuration in AccessPoint
Peter Qiu [Tue, 14 Mar 2017 22:51:22 +0000 (15:51 -0700)]
SettingsLib: wifi: encapsulate Passpoint configuration in AccessPoint

The configurations that are managed by "Saved Networks" page are
centered around the abstraction of AccessPoint.  Since we will
need to manage Passpoint configuration in the "Saved Networks"
(for configuration removal), encapsulate necessary information
in an AccessPoint for a Passpoint configuration.

Bug: 34207710
Test: manual test
Test: runtest --path
      frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/AccessPointTest.java
Change-Id: Ide556f5ec6c4ef9e1f82016efe17dc9860f298de

7 years agoQS: Add transient icon for hotspot
Jason Monk [Fri, 31 Mar 2017 17:19:26 +0000 (13:19 -0400)]
QS: Add transient icon for hotspot

Will make the loading time more clear.

Test: visual
Bug: 32270851
Change-Id: I0ea7591da132ff65fb7fc16b03b2891891e66598

7 years agoEnsure we show the PiP menu in response to KEYCODE_WINDOW.
Winson Chung [Thu, 30 Mar 2017 21:44:52 +0000 (14:44 -0700)]
Ensure we show the PiP menu in response to KEYCODE_WINDOW.

Bug: 36687605
Test: android.server.cts.ActivityManagerPinnedStackTests
Test: #testWindowButtonEntersPip
Change-Id: I0bb35fd666eb6a438e4676267f6726b44bffb3db

7 years agoImplement issue #36590595: Add ability to associated a ClipData with JobInfo
Dianne Hackborn [Thu, 30 Mar 2017 20:49:13 +0000 (13:49 -0700)]
Implement issue #36590595: Add ability to associated a ClipData with JobInfo

Yum!

Also needed to have a Context.revokeUriPermission() variant that is sane,
so reasonable CTS tests can be written.

Test: new ClipDataJobTest added.

Change-Id: Ia3135ea788a6e32c971bae7dab3a844d0ef4139c

7 years agoMerge "A11y: Prefer EXTRA_TITLE to ticker for status bar icon content description...
Adrian Roos [Fri, 31 Mar 2017 17:31:45 +0000 (17:31 +0000)]
Merge "A11y: Prefer EXTRA_TITLE to ticker for status bar icon content description" into oc-dev

7 years agoMerge "Update PIP dismiss to show scrim + info text at the bottom of the screen"...
Mady Mellor [Fri, 31 Mar 2017 17:27:36 +0000 (17:27 +0000)]
Merge "Update PIP dismiss to show scrim + info text at the bottom of the screen" into oc-dev

7 years agoMoar pre-partitioning refactoring.
Felipe Leme [Fri, 31 Mar 2017 15:23:06 +0000 (08:23 -0700)]
Moar pre-partitioning refactoring.

On ViewState: split value into mCurrentValue and mAutofilledValue.
On Session: replacing mAutofilledDataset by mDatasetWaitingAuth and
            ViewState.getAutofilledValue() (mAutofilledDataset is still needed,
    but will be removed in the first partitioning CL).

Also fixed a missed 'return' on TimePicker.autofill()

Bug: 35707731
Test: CtsAutoFillServiceTestCases pass

Change-Id: Icc32701ae3e499a77d99e6ae1daa7d070a3df631

7 years agoMerge "standardize system notification IDs" into oc-dev
Chris Wren [Fri, 31 Mar 2017 17:09:42 +0000 (17:09 +0000)]
Merge "standardize system notification IDs" into oc-dev

7 years agoAdd null check to InputMonitor.notifyANR
Brian Carlstrom [Fri, 31 Mar 2017 07:24:18 +0000 (00:24 -0700)]
Add null check to InputMonitor.notifyANR

Followup to 7402ddf9b45efc9616676205534ce7b4fc3a13e6

Test: Start IME, induce ANR in Settings, verify /data/anr/traces.txt
Change-Id: I4ad1d48cc73ca1a4332414ff50a160c67979feef
Fixes: 36730136

7 years agoMerge "Rename badge icon method" into oc-dev
Julia Reynolds [Fri, 31 Mar 2017 16:33:56 +0000 (16:33 +0000)]
Merge "Rename badge icon method" into oc-dev

7 years agoMerge "Prevent arrow keys from leaving editable TextViews" into oc-dev
Evan Rosky [Fri, 31 Mar 2017 16:27:52 +0000 (16:27 +0000)]
Merge "Prevent arrow keys from leaving editable TextViews" into oc-dev

7 years agoQuery color space before decoding a bitmap
Romain Guy [Thu, 30 Mar 2017 19:35:26 +0000 (12:35 -0700)]
Query color space before decoding a bitmap

This follows the pattern established by other "out" fields
in BitmapFactory.Options

Bug: 32984164
Test: CtsGraphicsTestCases

Change-Id: Ie72e47338b578b41c550453e2698d2d49eddf6da

7 years agoCTS doesn't like swiping.
Jeff Sharkey [Fri, 31 Mar 2017 15:45:46 +0000 (09:45 -0600)]
CTS doesn't like swiping.

It sounds like CTS prefers having the "none" lockscreen instead of
a "swipe" lockscreen, so give it what it wants.  This brings us back
to matching the original behavior of the NYC test.

Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.DirectBootHostTest#testDirectBootNative
Bug: 36789738
Change-Id: Ibc392362dda22b3df0bc98aa525c65fe70eeb861

7 years agostandardize system notification IDs
Chris Wren [Mon, 27 Mar 2017 19:01:44 +0000 (15:01 -0400)]
standardize system notification IDs

All the trivial cases, plus some fixes to try to
mitigate collisions with the complex ones.

Complex services to follow in another CL,

Bug: 32584866
Test: make framework services
Change-Id: Ie9663600171d8ede11676e9d66f009dbb06def03

7 years agoAllow shell uid to access Vr APIs
Karthik Ravi Shankar [Sun, 26 Mar 2017 09:56:44 +0000 (02:56 -0700)]
Allow shell uid to access Vr APIs

Some of the Vr APIs in VrManagerService need to be accessed via shell to
be used for testing and for easy access. Add
android.permission.RESTRICTED_VR_ACCESS to shell uid.

Bug: 36071574
Test: adb shell vr set-persistent-vr-mode-enabled true
      adb shell dumpsys vrmanager
      >> Persistent VR mode is currently: enabled
      adb shell vr set-persistent-vr-mode-enabled false
      adb shell dumpsys vrmanager
      >> Persistent VR mode is currently: disabled

Change-Id: I486fa19f93d5c6999aa479fdf7e5f2f48f765240
Signed-off-by: Karthik Ravi Shankar <karthikrs@google.com>
7 years agoAdd vr persistent mode enable/disable
Karthik Ravi Shankar [Sun, 26 Mar 2017 09:46:48 +0000 (02:46 -0700)]
Add vr persistent mode enable/disable

Persistent vr mode toggle control is needed sometimes from command line.
This also adds the infrastructure for future vr commands.

Bug: 36071574
Test: adb shell vr set-persistent-vr-mode-enabled true
      adb shell dumpsys vrmanager
      >> Persistent VR mode is currently: enabled
      adb shell vr set-persistent-vr-mode-enabled false
      adb shell dumpsys vrmanager
      >> Persistent VR mode is currently: disabled

Change-Id: I47a858e0696a907e746d50e2c6ca3d18197864a7
Signed-off-by: Karthik Ravi Shankar <karthikrs@google.com>
7 years agoLaunch 2D activities in VR mode
Karthik Ravi Shankar [Thu, 9 Mar 2017 02:30:19 +0000 (18:30 -0800)]
Launch 2D activities in VR mode

When in VR mode, launch all activities into the virtual display ID as
provided by the Compatibility display. This includes two cases -

- New activity launches
- Existing activity in the background.

Testing Done: Tested with PlanarVirtualDisplay app and Settings,
Calculator and GestureApp with different intent flags.

Bug: 36071574
Bug: 36071445
Test: android.server.cts.ActivityManagerDisplayTests
Test: #testVrActivityLaunch
Test: #testVrActivityReLaunch

Change-Id: Ic590a7cbd6f9b339dc83b22a8ffb1252219ef22e
Signed-off-by: Karthik Ravi Shankar <karthikrs@google.com>
7 years agoFix tuner sub-screens attach
Jason Monk [Fri, 31 Mar 2017 15:30:14 +0000 (11:30 -0400)]
Fix tuner sub-screens attach

Seems that when preferences are attached has changed, so we need to
make sure any sub preference screense explicitly own their preferences.

Test: manual
Change-Id: Id28c30367417fc7dbe74c3970a8e19a031ea6d8d
Fixes: 36766199

7 years agoMerge "IGnssDebug.hal change field outputs for dump()" into oc-dev
Wyatt Riley [Fri, 31 Mar 2017 15:28:16 +0000 (15:28 +0000)]
Merge "IGnssDebug.hal change field outputs for dump()" into oc-dev

7 years agoCorrects CompactExtractEditLayout to account for systemWindowInsetBottom am: d1a0d19794
Mark Renouf [Fri, 31 Mar 2017 15:20:24 +0000 (15:20 +0000)]
Corrects CompactExtractEditLayout to account for systemWindowInsetBottom am: d1a0d19794
am: 8f9a6c3e89

Change-Id: I10087b9982b3eceb200b447d4faecad4eb8d19fe

7 years agoCorrects CompactExtractEditLayout to account for systemWindowInsetBottom
Mark Renouf [Fri, 31 Mar 2017 15:15:49 +0000 (15:15 +0000)]
Corrects CompactExtractEditLayout to account for systemWindowInsetBottom
am: d1a0d19794

Change-Id: Ia0bdc13ac2e8f3e65aaa38a64b4af9409ffeaa21

7 years agoMerge "Self Managed CS Implementation" into oc-dev
Tyler Gunn [Fri, 31 Mar 2017 15:06:42 +0000 (15:06 +0000)]
Merge "Self Managed CS Implementation" into oc-dev

7 years agoMerge "Split scroll factor into a 2d float." into oc-dev
TreeHugger Robot [Fri, 31 Mar 2017 14:54:41 +0000 (14:54 +0000)]
Merge "Split scroll factor into a 2d float." into oc-dev

7 years agoRevert "Layoutlib changes to support the new ResourceUrl"
Diego Perez [Fri, 24 Mar 2017 11:26:48 +0000 (11:26 +0000)]
Revert "Layoutlib changes to support the new ResourceUrl"

This reverts commit 9fb4d6876a78fb336cb3650aca84bce723f96ecb.

Test: N/A
Change-Id: I57a09c6f011b8d8c9c2d054b03536e0a6fcc5688
(cherry picked from commit a4e82144b26ee50fca2739abc4f6c7111dc2f3cb)

7 years agoMerge "Fix BackupManagerMonitor wrapping in RestoreSession" into oc-dev
Anton Philippov [Fri, 31 Mar 2017 10:43:23 +0000 (10:43 +0000)]
Merge "Fix BackupManagerMonitor wrapping in RestoreSession" into oc-dev