400193 Commits

Author SHA1 Message Date
Jeff Sharkey
4260098e02 Merge "Filter volumes to only those the caller can see." 2019-01-21 00:54:31 +00:00
Jeff Sharkey
3036089cfa Filter volumes to only those the caller can see.
Don't return volumes that caller can't actually use.  Also add feature
to indicate that device supports "virtual disk" feature to verify
secondary external storage behaviors.

Bug: 117932814
Test: atest MediaProviderTests
Test: atest cts/tests/tests/media/src/android/media/cts/MediaScanner*
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: I66091c532ab5dac5032a82b136c590ac5a2a983a
2019-01-20 14:57:38 -07:00
Jeff Sharkey
ef033dada9 Merge "Better volume name argument checking." 2019-01-20 21:52:00 +00:00
Jeff Sharkey
8559e65694 Better volume name argument checking.
Bug: 117932814
Test: atest MediaProviderTests
Test: atest cts/tests/tests/media/src/android/media/cts/MediaScanner*
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: I799d04a30e5328c1b9266357f192a3e65e24a28d
2019-01-20 11:37:03 -07:00
Jeff Sharkey
f4246a1c17 Merge "Better scanning of secondary storage volumes." 2019-01-20 17:55:05 +00:00
Yohei Yukawa
7276946b92 Use setTextOperationUser() in KeyguardPasswordView and RemoteInputView
Android implements many complex text-related operations as per-user
out-of-process services. Notable examples are:

  * InputMethodServices
  * SpellCheckerService
  * TextClassifierService
  * AutofillService

For service client processes to connect to the right user's services
often the system assumes that a process that runs as user X should
connect to services that run as user X.  While this approach works for
most of cases, there is at least one exception, System UI, which
always runs as the primary user (unless the device enables special
mode e.g. UserManager.isSplitSystemUser()) no matter who is the
current foreground user.

In order to deal with this special case, we recently introduced an
@hide API TextView#setTextOperationUser() [1] to centralize cross-user
special logic inside TextView.  With this CL, KeyguardPasswordView and
RemoteInputView actually start calling it.

Note that TextView#setTextOperationUser() already takes care of IMEs
and SpellCheckers hence those two operations start working as expected
with this CL.  Once TextView#setTextOperationUser() start taking care
of other operations such as text classification and clipboard,
KeyguardPasswordView and RemoteInputView will be automatically taken
care of with no code change.

 [1]: I6d11e4d6a84570bc2991a8552349e8b216b0d139
      401e3d4c842ce86569de4477138137dc07a6aa6f

Fix: 120744418
Fix: 123043618
Test: atest SystemUITests
Test: Manually tested Bug 120744418 scenario as follows.
  1. Build and flash an AOSP build
  2. adb root
  3. adb shell setprop persist.debug.per_profile_ime 1
  4. adb reboot
  5. Install Test DPC
  6. Enable managed profile with Test DPC
  7. make -j SoftKeyboard
  8. adb install -r $OUT/system/app/SoftKeyboard/SoftKeyboard.apk
  9. adb shell ime enable com.example.android.softkeyboard/.SoftKeyboard
 10. adb shell ime set com.example.android.softkeyboard/.SoftKeyboard
 11. make -j EditTextVariations
 12. adb install -r $ANDROID_TARGET_OUT_TESTCASES/EditTextVariations/EditTextVariations.apk
 13. adb shell am start --user 0 \
     -n com.android.inputmethod.tools.edittextvariations/.EditTextVariations
 14. Tap the menu icon on the EditTextVariations then click "Direct Reply"
 15. adb shell am start --user 10 \
     -n com.android.inputmethod.tools.edittextvariations/.EditTextVariations
 16. Tap the menu icon on the EditTextVariations then click "Direct Reply"
 17. Open notification shade.
 18. Tap reply icon on "Message from UserHandle{0}".
 19. Make sure that SoftKeyboard Sample IME is shown.
 20. Tap reply icon on "Message from UserHandle{10}".
 21. Make sure that AOSP Keyboard is shown.
 22. Tap reply icon on "Message from UserHandle{0}" again.
 23. Make sure that SoftKeyboard Sample IME is shown again.
Test: Manually tested Bug 123043618 scenario as follows.
  1. Build and flash an AOSP build
  2. Create a secondary user then switch to it.
  3. make -j SoftKeyboard
  4. adb install -r $OUT/system/app/SoftKeyboard/SoftKeyboard.apk
  5. adb shell ime enable com.example.android.softkeyboard/.SoftKeyboard
  6. adb shell ime set com.example.android.softkeyboard/.SoftKeyboard
  7. make -j EditTextVariations
  8. adb install -r $ANDROID_TARGET_OUT_TESTCASES/EditTextVariations/EditTextVariations.apk
  9. adb shell am start \
     -n com.android.inputmethod.tools.edittextvariations/.EditTextVariations
 10. Tap the menu icon on the EditTextVariations then click "Direct Reply"
 11. Tap reply icon on "Message from UserHandle{10}".
 12. Make sure that SoftKeyboard Sample IME is shown.
 13. Type "ggggg" then hit the space key.
 14. Make sure that red underline is drawn under "ggggg"
 15. Make sure that AndroidSpellCheckerService runs as user 10.
Test: Manually tested multi-user scenario with per-profile mode as follows.
  1. Build and flash an AOSP build
  2. adb root
  3. adb shell setprop persist.debug.per_profile_ime 1
  4. adb reboot
  5. Create a secondary user then switch to it.
  6. make -j SoftKeyboard
  7. adb install -r $OUT/system/app/SoftKeyboard/SoftKeyboard.apk
  8. adb shell ime enable com.example.android.softkeyboard/.SoftKeyboard
  9. adb shell ime set com.example.android.softkeyboard/.SoftKeyboard
 10. make -j EditTextVariations
 11. adb install -r $ANDROID_TARGET_OUT_TESTCASES/EditTextVariations/EditTextVariations.apk
 12. adb shell am start \
     -n com.android.inputmethod.tools.edittextvariations/.EditTextVariations
 13. Tap the menu icon on the EditTextVariations then click "Direct Reply"
 14. Tap reply icon on "Message from UserHandle{10}".
 15. Make sure that SoftKeyboard Sample IME is shown.
 16. Type "ggggg" then hit the space key.
 17. Make sure that red underline is drawn under "ggggg"
 18. Make sure that AndroidSpellCheckerService runs as user 10.
 19. Set up a text screenlock.
 20. Turn off the display.
 21. Turn on the display.
 22. Make sure that SoftKeyboard Sample IME is shown.
Change-Id: Ibabe13e5b85e5bb91f9f8af6ec07c395c25c4393
2019-01-20 09:28:08 -08:00
TreeHugger Robot
03c5726d55 Merge "Import translations. DO NOT MERGE" 2019-01-20 16:07:20 +00:00
Nicolas Geoffray
c04c56abba Merge "Adjust to new OpenNativeLibrary API." am: 319157a906 am: 2fd0ea8fda
am: 15b0f45c49

Change-Id: Ia0d8baed4a5de3a1580832092e931165d9802605
2019-01-20 06:36:27 -08:00
Nicolas Geoffray
15b0f45c49 Merge "Adjust to new OpenNativeLibrary API." am: 319157a906
am: 2fd0ea8fda

Change-Id: I04472a29b7d900cf5d8980e3d1d5a82d7a8af2b8
2019-01-20 06:20:57 -08:00
Nicolas Geoffray
2fd0ea8fda Merge "Adjust to new OpenNativeLibrary API."
am: 319157a906

Change-Id: I0c5fb4e4c603ab10dfad2f5ca7a4b97710d51d57
2019-01-20 06:08:07 -08:00
Nicolas Geoffray
319157a906 Merge "Adjust to new OpenNativeLibrary API." 2019-01-20 13:58:49 +00:00
Bill Yi
fe61ec03da Import translations. DO NOT MERGE
Change-Id: I09b57bd36d71ceee1db3d4e15e0902e3939ee8c9
Auto-generated-cl: translation import
2019-01-20 01:54:46 -08:00
Tor Norbye
f6f46ce603 Merge "Update signature files to the new format" 2019-01-20 05:08:41 +00:00
Jeff Sharkey
1eda2caa98 Better scanning of secondary storage volumes.
There's been a long-standing bug where secondary external storage
volumes were being scanned into a single "external" database.  We've
had the logic in MediaProvider for a long time to support individual
databases on a per-UUID basis, but that regressed at some point.

This change revives that logic, which has the benefit of greatly
speeding up media scanning of secondary storage devices, since we can
preserve those databases instead of churning the primary "external"
database whenever they're ejected and reinserted.

Future work will clean up stale databases in the recently added idle
maintenance service.

Bug: 117932814, 122060093
Test: atest MediaProviderTests
Test: atest cts/tests/tests/media/src/android/media/cts/MediaScanner*
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: Ib48577a2146758acd882db0b1767e88f3a70247f
2019-01-19 17:27:16 -07:00
Philip P. Moltmann
6083d7fb7d Merge "Remove the option to disable SMS for Cell Broadcast Receiver" 2019-01-19 23:31:38 +00:00
Eric Laurent
de2a980547 Merge "audio: Add API for BT to query offload A2DP encoding formats" 2019-01-19 22:26:25 +00:00
Jeff Sharkey
7e14e72766 Merge "Return valid path for secondary storage devices." 2019-01-19 22:23:47 +00:00
Dario Freni
4d3deb815c Merge "Fix: PackageInfo for apex has wrong info" 2019-01-19 21:42:49 +00:00
Jeff Sharkey
f81494a161 Return valid path for secondary storage devices.
Bug: 122900949
Test: manual
Change-Id: I3ce5ca49720dc1854dd5207d29f59fa85821f23e
2019-01-19 13:26:20 -07:00
Tor Norbye
68ea0c3c13 Update signature files to the new format
The new format is described in tools/metalava/FORMAT.md.

Fixes: 116589402 Switch signature files over to the v2 format
Fixes: 112626813 Drop "synchronized" modifier from the signature format
Fixes: 122358225 Omit overriding methods that only differ in final [...]
Fixes: 73088715 API Review: Need doclava to output nullability
Fixes: 79739773 API Review: Metalava enforcing constants are constant
Exempt-From-Owner-Approval: Large-scale tooling change
Test: make sdk, make update-api, make checkapi
Change-Id: Ia248aece5250e84e47c815c601133b698bf644c2
2019-01-19 12:07:50 -08:00
Yohei Yukawa
401e3d4c84 Introduce @hide TextView#setTextOperationUser()
This CL introduces a unified way for framework developers to specify
whose components should be interacting with the given TextView.  An
important use case is the direct-reply UI notification hosted in
System UI, which always runs as user 0 no matter who is the current
user.

For instance, to let the given EditText interact with user 10's input
methods and spell checkers, you can call setTextOperationUser() as
follows.

  editText.setTextOperationUser(UserHandle.of(10));

In this way we can easily propergate the same user ID to other
components such as autofill and text classifer as necessary in the
future.

No one calls TextView#setTextOperationUser() yet hence there should be
no user-visible behavior change.

Bug: 120744418
Bug: 123043618
Test: spell checker still works
Test: atest CtsInputMethodTestCases CtsInputMethodServiceHostTestCases
Change-Id: I6d11e4d6a84570bc2991a8552349e8b216b0d139
2019-01-19 11:49:37 -08:00
TreeHugger Robot
329bc82c0f Merge "audio: Add API to handle active device change" 2019-01-19 19:39:24 +00:00
TreeHugger Robot
2d4677140c Merge "audio: Send A2DP codec to AudioSystem on connection state change" 2019-01-19 19:31:16 +00:00
Sudheer Shanka
7461df211d Merge "Create a new MOUNT_EXTERNAL_LEGACY storage mode." 2019-01-19 18:04:40 +00:00
Etan Cohen
0d2740ca69 Merge "[WIFI] Open up the getRandomizedMacAddress API" 2019-01-19 17:39:41 +00:00
Jeff Sharkey
62cb5ce251 Merge "Don't allow instant apps to access external storage." 2019-01-19 17:22:55 +00:00
TreeHugger Robot
5985ddbf13 Merge "Import translations. DO NOT MERGE" 2019-01-19 17:08:35 +00:00
Bill Yi
4a2aeaf807 [automerger skipped] Merge "Import translations. DO NOT MERGE" into pi-dev am: fccf9d031f -s ours
am: bd1f8940d6 -s ours
am skip reason: subject contains skip directive

Change-Id: I4e48864087c874114e582b7a15828a950498d1d6
2019-01-19 07:51:08 -08:00
Bill Yi
bd1f8940d6 [automerger skipped] Merge "Import translations. DO NOT MERGE" into pi-dev
am: fccf9d031f -s ours
am skip reason: subject contains skip directive

Change-Id: I4b66bd86ad4e12f743eefebf9b25e0f7115829fc
2019-01-19 07:44:59 -08:00
TreeHugger Robot
fccf9d031f Merge "Import translations. DO NOT MERGE" into pi-dev 2019-01-19 15:30:27 +00:00
Nandana Dutt
e0546e6b12 Merge "Pass in calling UID and package to dumpstate" am: bc6e433ae4 am: ae97716377
am: ec3ce57698

Change-Id: I70d120ed5666322fa75646c05c12a6dfd51ed1f3
2019-01-19 06:24:23 -08:00
Nandana Dutt
ec3ce57698 Merge "Pass in calling UID and package to dumpstate" am: bc6e433ae4
am: ae97716377

Change-Id: Ie1126fb68184c7789fe969b008ee1550d4424809
2019-01-19 06:11:19 -08:00
Bill Yi
104bb9b64e Import translations. DO NOT MERGE
Auto-generated-cl: translation import

Bug: 64712476
Change-Id: I2f3f1646e9214c754874bd2a4c3642682fd5b204
2019-01-19 06:04:11 -08:00
Nandana Dutt
ae97716377 Merge "Pass in calling UID and package to dumpstate"
am: bc6e433ae4

Change-Id: I1bf6f1053d088af55d35164207e5167c806db686
2019-01-19 05:59:00 -08:00
Treehugger Robot
bc6e433ae4 Merge "Pass in calling UID and package to dumpstate" 2019-01-19 13:48:29 +00:00
Bill Yi
31d1568da8 Import translations. DO NOT MERGE
Change-Id: Ia9c416df379a7db8d471cfb6620a3c296c695085
Auto-generated-cl: translation import
2019-01-19 05:44:54 -08:00
TreeHugger Robot
f94673a7cf Merge "Pass correct realCallingUid to startActivity() if provided by PendingIntentRecord#sendInner()" 2019-01-19 10:25:15 +00:00
TreeHugger Robot
63322066aa Merge "Add setting for WifiController to set recovery min delay" 2019-01-19 07:32:06 +00:00
Jordan Liu
2b804df24b Merge "Trigger PhoneStateListener onCallAttributesChanged" am: cd4ca49b18 am: bbd7b9170a
am: 3be2df7b4f

Change-Id: Id1a5684693554f10159f90f607c7a4f7ad1e3d51
2019-01-18 23:30:22 -08:00
TreeHugger Robot
a8061c94ab Merge "Add explicit subscription id support to DataUsageController" 2019-01-19 07:17:33 +00:00
Jordan Liu
3be2df7b4f Merge "Trigger PhoneStateListener onCallAttributesChanged" am: cd4ca49b18
am: bbd7b9170a

Change-Id: Iefb3d9845b95e22f45ecfeb47f770b708951438a
2019-01-18 23:13:05 -08:00
Jordan Liu
bbd7b9170a Merge "Trigger PhoneStateListener onCallAttributesChanged"
am: cd4ca49b18

Change-Id: Ia0729cbae8047cfb866d4c605d0030ddf34060b7
2019-01-18 23:02:44 -08:00
TreeHugger Robot
84686f1140 Merge "Resolve all browsers even if there is a default browser." 2019-01-19 06:55:12 +00:00
Treehugger Robot
cd4ca49b18 Merge "Trigger PhoneStateListener onCallAttributesChanged" 2019-01-19 06:49:09 +00:00
Hai Shalom
f1845027ca Merge changes from topic "isEasyConnectSupported"
* changes:
  [DPP] Rename isDppSupported to isEasyConnectSupported
  [DPP] Add more documentation about Easy-Connect (DPP)
2019-01-19 06:39:41 +00:00
TreeHugger Robot
6b0a91015b Merge "Allow each AppEntity to handle click events individually." 2019-01-19 05:57:25 +00:00
Jack Yu
936d5aa4b8 Merge "Revert "Supported data handover in DcTracker/DataConnection/ApnContext"" 2019-01-19 05:52:15 +00:00
Jack Yu
00338eada5 Revert "Supported data handover in DcTracker/DataConnection/ApnContext"
This reverts commit 1f30e7e59802a77b7561d949b71ebfc8b26f6e19.

Reason for revert: break build

Change-Id: If6b18622b2970b96921f11dc4c160f9d5026d5e3
2019-01-19 05:50:53 +00:00
Jeff Tinker
e607b5fb2d Merge "Add support for HDCP 2.3" 2019-01-19 05:48:02 +00:00
TreeHugger Robot
df61ea34d8 Merge "[view compilation] Add --compile-layouts flag to pm compile" 2019-01-19 05:47:45 +00:00