Commit Graph

82113 Commits

Author SHA1 Message Date
Guliz Tuncay
db18b5520f Merge "Multi-user aware TSMS" 2017-08-14 17:52:48 +00:00
Jeremy Joslin
ea58747371 Merge "Add permission checks to getActiveScorerPackage()." into oc-mr1-dev am: 66042e0caf
am: e5cdc925dd

Change-Id: I673af2506d51945dc02f484efe98facfbe99b943
2017-08-14 17:11:10 +00:00
Jeremy Joslin
e5cdc925dd Merge "Add permission checks to getActiveScorerPackage()." into oc-mr1-dev
am: 66042e0caf

Change-Id: I8a090f5dfbdc6d47de9838d8c8bf48f95d831531
2017-08-14 16:59:06 +00:00
TreeHugger Robot
66042e0caf Merge "Add permission checks to getActiveScorerPackage()." into oc-mr1-dev 2017-08-14 16:50:50 +00:00
Michal Karpinski
10a23a69bb Add extra about SDK version that system restore happened from to ACTION_SETTING_RESTORED intent am: 6135a26551
am: 1a7a743fea

Change-Id: If9b944d16dfc297f8cd0a3eded191170fd278b90
2017-08-14 13:28:57 +00:00
Michal Karpinski
1a7a743fea Add extra about SDK version that system restore happened from to ACTION_SETTING_RESTORED intent
am: 6135a26551

Change-Id: I25663df1efd88216b0bdbe22cc53aaaaf0d3dd75
2017-08-14 13:21:18 +00:00
Petar Šegina
e390cd0457 Merge "Add animation for Semantic Lift" 2017-08-14 11:47:34 +00:00
Michal Karpinski
6135a26551 Add extra about SDK version that system restore happened from
to ACTION_SETTING_RESTORED intent

Test: manual (system restore from N-MR1 and O)
Bug: 64232609
Change-Id: I142df7acb11309bc4f5f185e45a1f91f86d0334a
2017-08-14 11:22:15 +01:00
Jeff Sharkey
b358b9f673 Merge "Remove a bunch of deprecated @SystemApi." into oc-mr1-dev am: c2e09129e0
am: b2a9f55488

Change-Id: Ib7e00ad3b02bf62fad1cc32c9e6002b2b7a45369
2017-08-12 03:38:00 +00:00
Jeff Sharkey
b2a9f55488 Merge "Remove a bunch of deprecated @SystemApi." into oc-mr1-dev
am: c2e09129e0

Change-Id: I26089a2aef16845f2e2935e95810457e287bd0e1
2017-08-12 03:25:49 +00:00
Jeff Sharkey
c2e09129e0 Merge "Remove a bunch of deprecated @SystemApi." into oc-mr1-dev 2017-08-12 03:21:01 +00:00
Jeff Sharkey
f4b07b9ba4 Merge "Rename API to match StorageStats." into oc-mr1-dev am: 74f7a1425f
am: 6099e1c142

Change-Id: I8241dc312a087cb84e5d51fd6db5aeced5e87a2c
2017-08-12 01:15:43 +00:00
Jeff Sharkey
6099e1c142 Merge "Rename API to match StorageStats." into oc-mr1-dev
am: 74f7a1425f

Change-Id: I87815da4f2f96c476fcdfdb3361d0f43b895e909
2017-08-12 00:45:19 +00:00
Shuzhen Wang
2899ed6fda Merge "Camera2: Legacy: Add onRequestQueueEmpty callback" into oc-mr1-dev am: 4dde010145
am: 7ff3038385

Change-Id: I58077003219ed03ba08e5aab1475f2d46219825f
2017-08-12 00:29:10 +00:00
TreeHugger Robot
74f7a1425f Merge "Rename API to match StorageStats." into oc-mr1-dev 2017-08-12 00:16:43 +00:00
Sunny Goyal
89b36aead8 Merge "Promoting installExistingPackage to SystemApi" into oc-mr1-dev am: 6561f067bb
am: 675ae0a16f

Change-Id: I2306aa572a17ec637bdeca0f98ed4e07eb48622c
2017-08-12 00:14:04 +00:00
Sheng-Hao Tsao
b6109a64e2 Merge "Fix a bug that SurfaceView loses transformation" into oc-mr1-dev am: e22ecbdd61
am: 8bb38b555b

Change-Id: I700178674fa12d088bdf2b1bb67ea1f12fb33b53
2017-08-12 00:08:10 +00:00
Shuzhen Wang
7ff3038385 Merge "Camera2: Legacy: Add onRequestQueueEmpty callback" into oc-mr1-dev
am: 4dde010145

Change-Id: Ib2ea8e264fbb4a0833b2cae0f62c6485ea6f0613
2017-08-11 23:45:11 +00:00
Android Build Merger (Role)
3822c273dc Merge "Merge "Reland: PackageManager: update documentation for FEATURE_WIFI_PASSPOINT" into oc-mr1-dev am: 3df6be7875 am: de90ca8412" 2017-08-11 23:31:52 +00:00
Sunny Goyal
675ae0a16f Merge "Promoting installExistingPackage to SystemApi" into oc-mr1-dev
am: 6561f067bb

Change-Id: If6a3158d88f4ed1590931e0c70efbab3c9115e97
2017-08-11 23:31:29 +00:00
Roozbeh Pournader
c9c6ee667f Merge "Support multiple languages per font in fonts.xml" 2017-08-11 23:27:50 +00:00
Peter Qiu
c685c4d350 Merge "Reland: PackageManager: update documentation for FEATURE_WIFI_PASSPOINT" into oc-mr1-dev am: 3df6be7875
am: de90ca8412

Change-Id: Idace7218dc222d6edcebf77861f941a3684a3211
2017-08-11 23:27:24 +00:00
Sheng-Hao Tsao
8bb38b555b Merge "Fix a bug that SurfaceView loses transformation" into oc-mr1-dev
am: e22ecbdd61

Change-Id: I893e8346ce58b39f1e84a7e38af6a04f11f03800
2017-08-11 23:26:07 +00:00
Michal Karpinski
2acdbae855 Merge "Merge "Add "Threading" section to BackupAgent's class level javadoc" into oc-mr1-dev am: 5500732584" into oc-mr1-dev-plus-aosp
am: 3e7f323481

Change-Id: I6ab2c9d851ebfe46b7e62753f047ef2976524f6a
2017-08-11 22:53:04 +00:00
TreeHugger Robot
4dde010145 Merge "Camera2: Legacy: Add onRequestQueueEmpty callback" into oc-mr1-dev 2017-08-11 22:47:53 +00:00
Peter Qiu
de90ca8412 Merge "Reland: PackageManager: update documentation for FEATURE_WIFI_PASSPOINT" into oc-mr1-dev
am: 3df6be7875

Change-Id: Idc8943172f4540b1c7da47c6da24d5d1eed843a4
2017-08-11 22:35:10 +00:00
Guliz Tuncay
06a2624049 Multi-user aware TSMS
Currently, spell checker component can process requests only from the
foreground user's account and requests from background users are always
ignored. However, in order to fully realize the multi-user nature of
Android, most system services will need to truly support multiple users
simultaneously. With multi-user aware TSMS implemented, apps from
background users (other accounts and their work profiles) can also run
their spell checking jobs in batch, without the external device user
having to switch accounts for the spell checker to be enabled in that
account.

Bug: 63041121
Test: Manually as follows
Setup: Create a work profile and a secondary user
1. adb shell pm create-user --profileOf 0 --managed workprofile (userId 10)
2. adb shell am create-user seconrdaryuser1 (userId 11)
3. Build SampleSpellCheckerService, which is by default
    direct-boot unaware.
     package name: com.example.android.samplespellcheckerservice
     APK name: SampleSpellCheckerService_DBUnaware.apk
4. Also build a custom SampleSpellCheckerService by explicitly
     making '.SampleSpellCheckerService' direct-boot aware.
     package name: com.example.android.samplespellcheckerservice2
     APK name: SampleSpellCheckerService_DBAware.apk
5. adb install --user 0 -r SampleSpellCheckerService_DBUnaware.apk
6. adb install --user 10 -r SampleSpellCheckerService_DBUnaware.apk
7. adb install --user 11 -r SampleSpellCheckerService_DBUnaware.apk
8. adb install --user 0 -r SampleSpellCheckerService_DBAware.apk
9. adb install --user 10 -r SampleSpellCheckerService_DBAware.apk
10. adb install --user 11 -r SampleSpellCheckerService_DBAware.apk
11. make -j ApiDemos
12. adb install --user 0 -r $ANDROID_PRODUCT_OUT/data/app/ApiDemos/ApiDemos.apk
13. adb install --user 10 -r $ANDROID_PRODUCT_OUT/data/app/ApiDemos/ApiDemos.apk
14. adb install --user 11 -r $ANDROID_PRODUCT_OUT/data/app/ApiDemos/ApiDemos.apk
15. Make sure AOSP Keyboard (com.android.inputmethod.latin) is installed
for all users.

Test 1: Settings correctly updated for each user (Work profile's SC is
not bound to account and can be individually updated)
0. Complete Setup
1. adb shell am start-user 0
2. adb shell am start-user 10
3. adb shell am start-user 11
4. adb shell settings put --user 0 secure selected_spell_checker com.example.android.samplespellcheckerservice/.SampleSpellCheckerService
5. adb shell settings put --user 10 secure selected_spell_checker com.example.android.samplespellcheckerservice/.SampleSpellCheckerService
6. adb shell settings put --user 11 secure selected_spell_checker com.example.android.samplespellcheckerservice/.SampleSpellCheckerService
7. adb shell settings get --user 0 secure selected_spell_checker
         -> com.example.android.samplespellcheckerservice/.SampleSpellCheckerService
8. adb shell settings get --user 10 secure selected_spell_checker
         -> com.example.android.samplespellcheckerservice/.SampleSpellCheckerService
9. adb shell settings get --user 11 secure selected_spell_checker
         -> com.example.android.samplespellcheckerservice/.SampleSpellCheckerService
10. adb shell settings put --user 0 secure selected_spell_checker com.android.inputmethod.latin/.spellcheck.AndroidSpellCheckerService
11. adb shell settings get --user 0 secure selected_spell_checker
         -> com.android.inputmethod.latin/.spellcheck.AndroidSpellCheckerService
12. Repeat 8 & 9. Results should be the same.
13. adb shell settings put --user 10 secure selected_spell_checker com.android.inputmethod.latin/.spellcheck.AndroidSpellCheckerService
14. adb shell settings get --user 10 secure selected_spell_checker
         -> com.android.inputmethod.latin/.spellcheck.AndroidSpellCheckerService
15. adb shell settings get --user 0 secure selected_spell_checker
         -> com.android.inputmethod.latin/.spellcheck.AndroidSpellCheckerService
16. adb shell settings get --user 11 secure selected_spell_checker
         -> com.example.android.samplespellcheckerservice/.SampleSpellCheckerService
17. adb shell settings put --user 11 secure selected_spell_checker com.android.inputmethod.latin/.spellcheck.AndroidSpellCheckerService
14. adb shell settings get --user 11 secure selected_spell_checker
         -> com.android.inputmethod.latin/.spellcheck.AndroidSpellCheckerService
14. adb shell settings get --user 0 secure selected_spell_checker
         -> com.android.inputmethod.latin/.spellcheck.AndroidSpellCheckerService
15. adb shell settings get --user 10 secure selected_spell_checker
         -> com.android.inputmethod.latin/.spellcheck.AndroidSpellCheckerService
16. adb shell am start-user 0
17. adb shell am start-user 10
18. adb shell am start-user 11
19. adb shell settings put --user 0 secure selected_spell_checker com.example.android.samplespellcheckerservice/.SampleSpellCheckerService
20. adb shell settings put --user 10 secure selected_spell_checker com.example.android.samplespellcheckerservice/.SampleSpellCheckerService
21. adb shell settings put --user 11 secure selected_spell_checker com.example.android.samplespellcheckerservice/.SampleSpellCheckerService

Test 2: Basic functionality works (each user can use SC when they're at
the foreground) & background connections aren't broken
0. Complete Setup
1. Open "Api Demos" app for user 0
2. Go to Views/Text/EditText
3. Focus into the first EditText then type "aaa"
4. Focus into the second EditText then type "aaa"
5. adb shell dumpsys textservices --user 0
         -> make sure 'com.example.android.samplespellcheckerservice'
            is serving spell checker sessions.
6. adb shell dumpsys textservices --user 10
         -> make sure there are no active spell checker sessions.
7. adb shell dumpsys textservices --user 10
         -> make sure there are no active spell checker sessions.
8. Repeat 7-10 for the work profile (userId 10)
9. adb shell dumpsys textservices --user 10
         -> make sure 'com.example.android.samplespellcheckerservice'
            is serving spell checker sessions.
10. adb shell am switch-user 11
11. Repeat 7-10 (userId 11)
12. adb shell dumpsys textservices --user 11
         -> make sure 'com.example.android.samplespellcheckerservice'
            is serving spell checker sessions.
13. adb shell dumpsys textservices --user 0
         -> make sure 'com.example.android.samplespellcheckerservice'
            is serving spell checker sessions.
14. adb shell dumpsys textservices --user 10
         -> make sure 'com.example.android.samplespellcheckerservice'
            is serving spell checker sessions.

Test 3: Background user can also call spell checker APIs
0. Complete Setup
1. adb shell pm install -r TestApp.apk
2. adb shell am switch-user 11
3. adb shell am start --user 11 -n com.example.gulizseray.testapp/com.example.gulizseray.testapp.MainActivity
4. adb logcat | grep spellcheckerclient
        -> Periodically calls spell checker APIs and prints results
5. adb shell dumpsys textservices --user 11
         -> make sure 'com.example.android.samplespellcheckerservice'
            is serving spell checker sessions.
6. Adb shell am switch-user 0
7. adb logcat | grep spellcheckerclient
        -> Continues to periodically call SC APIs and print results
8. Open "Api Demos" app for user 0
9. Go to Views/Text/EditText
10. Focus into the first EditText then type "aaa"
11. Focus into the second EditText then type "aaa"
12. adb shell dumpsys textservices --user 0
         -> make sure 'com.example.android.samplespellcheckerservice'
            is serving spell checker sessions.
13. adb shell dumpsys textservices --user 11
         -> make sure 'com.example.android.samplespellcheckerservice'
            is serving spell checker sessions.

Test 4: Package updates for all unlocked users (not just foreground user) are tracked properly (New package added/removed from owner, profile, secondary users)
0. Complete Setup
1. adb uninstall --user 0 com.example.android.samplespellcheckerservice
2. adb shell dumpsys textservices --user 0
        -> Make sure com.example.android.samplespellcheckerservice/.SampleSpellCheckerService
        does not exist in the list
3. adb shell settings get --user 0 secure selected_spell_checker
       -> com.android.inputmethod.latin/.spellcheck.AndroidSpellCheckerService
4. adb uninstall --user 10 com.example.android.samplespellcheckerservice
5. adb shell dumpsys textservices --user 10
        -> Make sure com.example.android.samplespellcheckerservice/.SampleSpellCheckerService
        does not exist in the list
6. adb shell settings get --user 10 secure selected_spell_checker
       -> com.android.inputmethod.latin/.spellcheck.AndroidSpellCheckerService
7. adb uninstall --user 11 com.example.android.samplespellcheckerservice
8. adb shell dumpsys textservices --user 11
        -> Make sure com.example.android.samplespellcheckerservice/.SampleSpellCheckerService
        does not exist in the list
9. adb shell settings get --user 11 secure selected_spell_checker
       -> com.android.inputmethod.latin/.spellcheck.AndroidSpellCheckerService
10. adb install --user 0 -r out/target/product/generic/system/app/SampleSpellCheckerService/SampleSpellCheckerService.apk
11. adb shell dumpsys textservices --user 0
       -> Make sure com.example.android.samplespellcheckerservice/.SampleSpellCheckerService
       is in the list

12. adb shell settings get --user 0 secure selected_spell_checker
       -> com.android.inputmethod.latin/.spellcheck.AndroidSpellCheckerService
13. adb install --user 10 -r out/target/product/generic/system/app/SampleSpellCheckerService/SampleSpellCheckerService.apk
14. adb shell dumpsys textservices --user 10
       -> Make sure com.example.android.samplespellcheckerservice/.SampleSpellCheckerService
       is in the list
15. adb shell settings get --user 10 secure selected_spell_checker
       -> com.android.inputmethod.latin/.spellcheck.AndroidSpellCheckerService
16. adb install --user 11 -r out/target/product/generic/system/app/SampleSpellCheckerService/SampleSpellCheckerService.apk
17. adb shell dumpsys textservices --user 11
       -> Make sure com.example.android.samplespellcheckerservice/.SampleSpellCheckerService
       is in the list
18. adb shell settings get --user 11 secure selected_spell_checker
       -> com.android.inputmethod.latin/.spellcheck.AndroidSpellCheckerService

Test 5: SpellCheckerBindGroups will be cleared when the corresponding
app is killed.
0. Complete Setup
1. Open "Api Demos" app for user 0
2. Go to Views/Text/EditText
3. Focus into the first EditText then type "aaa"
4. Focus into the second EditText then type "aaa"
5. adb shell dumpsys textservices --user 0
         -> make sure 'com.example.android.samplespellcheckerservice'
            is serving spell checker sessions.
6. Kill Api Demos
7. adb shell dumpsys textservices --user 0
         -> make sure there are no active spell checker sessions.
8. Repeat 1-7 for work profile (user 10)
9. adb shell am switch-user 11
10. Repeat 1-7 for secondary user (user 11)
12. adb shell pm install -r TestApp.apk
13. adb shell am start --user 11 -n com.example.gulizseray.testapp/com.example.gulizseray.testapp.MainActivity
14. adb shell dumpsys textservices --user 11
         -> make sure 'com.example.android.samplespellcheckerservice'
            is serving spell checker sessions.
15. adb shell am switch-user 0
16. adb shell am force-stop com.example.gulizseray.testapp
17. adb shell dumpsys textservices --user 11
         -> make sure there are no active spell checker sessions.
Change-Id: I06c27ef834203a21cc445dc126602c799384527b
2017-08-11 15:31:40 -07:00
Michal Karpinski
b4aa5fd3d9 Merge "Add "Threading" section to BackupAgent's class level javadoc" into oc-mr1-dev
am: 5500732584

Change-Id: Ibbe75bff86138dfd0d2b623dffd08610c5b3823e
2017-08-11 22:09:28 +00:00
TreeHugger Robot
6561f067bb Merge "Promoting installExistingPackage to SystemApi" into oc-mr1-dev 2017-08-11 21:56:59 +00:00
TreeHugger Robot
e22ecbdd61 Merge "Fix a bug that SurfaceView loses transformation" into oc-mr1-dev 2017-08-11 21:49:22 +00:00
Cindy Kuang
a585058b54 Merge "Merge "docs: replaced "i.e." to fix formatting error" into oc-dev am: 0580ac8a65 am: 1e6401b07e" into oc-dr1-dev-plus-aosp am: a54ab7edf4
am: 3e85fa11ea

Change-Id: I3219a23702cb0d597093f03d2bebcf21722ca695
2017-08-11 21:43:11 +00:00
Cindy Kuang
61130c49a3 Merge "docs: replaced "i.e." to fix formatting error" into oc-dev am: 0580ac8a65
am: 07f5257b19

Change-Id: I0ac6fa46922bb2866cfb416763dfcfac10fdd909
2017-08-11 21:34:57 +00:00
TreeHugger Robot
3df6be7875 Merge "Reland: PackageManager: update documentation for FEATURE_WIFI_PASSPOINT" into oc-mr1-dev 2017-08-11 21:28:00 +00:00
Cindy Kuang
3e85fa11ea Merge "Merge "docs: replaced "i.e." to fix formatting error" into oc-dev am: 0580ac8a65 am: 1e6401b07e" into oc-dr1-dev-plus-aosp
am: a54ab7edf4

Change-Id: I0350cf5af828990539d0fa9ec925feef54348a49
2017-08-11 21:16:29 +00:00
Jeff Sharkey
d62e3cb5d6 Rename API to match StorageStats.
Since they're both measuring app code (APKs), name this API
consistently with StorageStats.getAppBytes().

Bug: 64331226
Test: builds, boots
Change-Id: I1b00427b619a78c043b1b5fac2d0e6406b51d454
2017-08-11 15:10:38 -06:00
Michal Karpinski
5500732584 Merge "Add "Threading" section to BackupAgent's class level javadoc" into oc-mr1-dev 2017-08-11 21:09:52 +00:00
Cindy Kuang
07f5257b19 Merge "docs: replaced "i.e." to fix formatting error" into oc-dev
am: 0580ac8a65

Change-Id: I094bd99bcaaf51633ac887d38a9323ed5fdc54e2
2017-08-11 21:01:15 +00:00
Cindy Kuang
43adc3d4e3 Merge "docs: replaced "i.e." to fix formatting error" into oc-dev am: 0580ac8a65
am: 1e6401b07e

Change-Id: I48f9a5fc207a2c884e51c9091bd19db9bdf15471
2017-08-11 21:01:11 +00:00
Neil Fuller
0c94e46859 Merge "Change SystemApi as per API council feedback" 2017-08-11 20:50:32 +00:00
Jeff Sharkey
8478911f5e Remove a bunch of deprecated @SystemApi.
Verified that nobody should be using these APIs, and they've been
deprecated long enough that we can remove them.

Bug: 62341924, 62263907, 62264550
Test: make -j32 update-api && make
Change-Id: I9a2333ca13e4984b71374aa7ffed081e5106c67e
2017-08-11 14:45:47 -06:00
Cindy Kuang
1e6401b07e Merge "docs: replaced "i.e." to fix formatting error" into oc-dev
am: 0580ac8a65

Change-Id: I7138667ba48fa590c4a7f30cdecf0381c43050a6
2017-08-11 20:45:24 +00:00
Cindy Kuang
0580ac8a65 Merge "docs: replaced "i.e." to fix formatting error" into oc-dev 2017-08-11 20:33:34 +00:00
Yin-Chia Yeh
542edd6dcf Merge "Camera: fix legacy device CTS failure" into oc-mr1-dev am: 0cfad57566
am: df7d855072

Change-Id: I945d6ef3bad30a96c1ff1457b793bf5270e6950e
2017-08-11 20:03:53 +00:00
Yin-Chia Yeh
df7d855072 Merge "Camera: fix legacy device CTS failure" into oc-mr1-dev
am: 0cfad57566

Change-Id: Ifd52c1db5d999dbcaa1855edfda6d60edc384b2a
2017-08-11 19:44:50 +00:00
Roozbeh Pournader
99975a3e25 Support multiple languages per font in fonts.xml
Minikin already supports multiple languages specified per font in
I7f13b51464c9b01982bb573251d77052b9ddbd70. This CL adds a couple of
such cases into fonts.xml and clarifies in the method and the
variable names and parameters that the frameworks is handling a
multi-language string when it is.

Fixes: 26687969
Test: make -j checkbuild
Test: bit FrameworksCoreTests:android.graphics.TypefaceSystemFallbackTest
Change-Id: Ifa540a95f87921983f9069330d1dd0892538a8df
2017-08-11 12:34:26 -07:00
TreeHugger Robot
0cfad57566 Merge "Camera: fix legacy device CTS failure" into oc-mr1-dev 2017-08-11 19:23:11 +00:00
Nate Fischer
f332e96c66 Merge "WebView: remove unused DATA_REDUCTION_PROXY_SETTING_CHANGED API" into oc-mr1-dev am: a9732da1f3
am: e1a8030fc9

Change-Id: Ic6af76454398ab9934e635759f7271ad28313e08
2017-08-11 18:10:52 +00:00
Nate Fischer
333398f085 Merge "WebView: add WebView#getSafeBrowsingPrivacyPolicyUrl() API" into oc-mr1-dev am: 070e3c0c7f
am: 56a9c82325

Change-Id: If3247f4b91fc4b8d3dce2d8c77a3976260a69f34
2017-08-11 18:04:45 +00:00
Nate Fischer
e1a8030fc9 Merge "WebView: remove unused DATA_REDUCTION_PROXY_SETTING_CHANGED API" into oc-mr1-dev
am: a9732da1f3

Change-Id: I38c1ea8090d96861cf2f9a261d9e350766a672ce
2017-08-11 17:53:47 +00:00
Nate Fischer
56a9c82325 Merge "WebView: add WebView#getSafeBrowsingPrivacyPolicyUrl() API" into oc-mr1-dev
am: 070e3c0c7f

Change-Id: Ia0405fb1d7a4410100c5c9c98ed64655f06c9e8b
2017-08-11 17:49:24 +00:00