OSDN Git Service

android-x86/frameworks-base.git
7 years agoMerge "Cherry-pick: Remove implementation of bssid hotlist" into oc-dev
TreeHugger Robot [Thu, 30 Mar 2017 02:58:35 +0000 (02:58 +0000)]
Merge "Cherry-pick: Remove implementation of bssid hotlist" into oc-dev

7 years agoMerge "Rename ACTION_VOICEMAIL_SMS_RECEIVED" into oc-dev
TreeHugger Robot [Thu, 30 Mar 2017 01:51:51 +0000 (01:51 +0000)]
Merge "Rename ACTION_VOICEMAIL_SMS_RECEIVED" into oc-dev

7 years agoMerge "Convert bitmaps to sRGB/scRGB when they have a color profile" into oc-dev
Romain Guy [Thu, 30 Mar 2017 01:42:25 +0000 (01:42 +0000)]
Merge "Convert bitmaps to sRGB/scRGB when they have a color profile" into oc-dev

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

7 years agoMerge "Make public getFragments() and onGetLayoutInflater() methods" into oc-dev
TreeHugger Robot [Thu, 30 Mar 2017 01:26:09 +0000 (01:26 +0000)]
Merge "Make public getFragments() and onGetLayoutInflater() methods" into oc-dev

7 years agoMerge "Add new internal API: enableOptionalCodecs()/disableOptionalCodecs()" into...
TreeHugger Robot [Thu, 30 Mar 2017 01:17:20 +0000 (01:17 +0000)]
Merge "Add new internal API: enableOptionalCodecs()/disableOptionalCodecs()" into oc-dev

7 years agoMerge "Expose initial focus feature flag for testing" into oc-dev
Evan Rosky [Thu, 30 Mar 2017 01:02:22 +0000 (01:02 +0000)]
Merge "Expose initial focus feature flag for testing" into oc-dev

7 years agoMerge "Update injectSmsPdu documentation." into oc-dev
TreeHugger Robot [Thu, 30 Mar 2017 00:35:57 +0000 (00:35 +0000)]
Merge "Update injectSmsPdu documentation." into oc-dev

7 years agoMerge "AAPT2: Parse an ID encoded as a map" into oc-dev
Adam Lesinski [Thu, 30 Mar 2017 00:30:58 +0000 (00:30 +0000)]
Merge "AAPT2: Parse an ID encoded as a map" into oc-dev

7 years agoMerge "AAPT2: Allow arbitrary entry names with aapt2 optimize" into oc-dev
Adam Lesinski [Thu, 30 Mar 2017 00:30:28 +0000 (00:30 +0000)]
Merge "AAPT2: Allow arbitrary entry names with aapt2 optimize" into oc-dev

7 years agoMerge "Allow cluster navigation to jump into touchscreenBlocksFocus" into oc-dev
Evan Rosky [Thu, 30 Mar 2017 00:22:36 +0000 (00:22 +0000)]
Merge "Allow cluster navigation to jump into touchscreenBlocksFocus" into oc-dev

7 years agoCherry-pick: Remove implementation of bssid hotlist
Michael Plass [Mon, 27 Mar 2017 18:11:47 +0000 (11:11 -0700)]
Cherry-pick: Remove implementation of bssid hotlist

Test: Relevant unit tests pass
Bug: 30147676
Change-Id: I268907cc13ef21c0ba547722fe7c866ee4cdae5a

7 years agoMerge "Correct ACTION_SHOW_NOTICE_ECM_BLOCK_OTHERS" into oc-dev
Robert Greenwalt [Wed, 29 Mar 2017 23:53:17 +0000 (23:53 +0000)]
Merge "Correct ACTION_SHOW_NOTICE_ECM_BLOCK_OTHERS" into oc-dev

7 years agoMerge "Expose ACCESSIBILITY_CAPTIONING_* to Instant Apps" into oc-dev
TreeHugger Robot [Wed, 29 Mar 2017 23:25:54 +0000 (23:25 +0000)]
Merge "Expose ACCESSIBILITY_CAPTIONING_* to Instant Apps" into oc-dev

7 years agoMerge "Mention <intent> can't have string resources." into oc-dev
TreeHugger Robot [Wed, 29 Mar 2017 23:24:38 +0000 (23:24 +0000)]
Merge "Mention <intent> can't have string resources." into oc-dev

7 years agoMerge "Whitelist ManagedProvisioning from bg check" into oc-dev
TreeHugger Robot [Wed, 29 Mar 2017 23:12:38 +0000 (23:12 +0000)]
Merge "Whitelist ManagedProvisioning from bg check" into oc-dev

7 years agoAdd new internal API: enableOptionalCodecs()/disableOptionalCodecs()
Pavlin Radoslavov [Fri, 24 Feb 2017 18:19:14 +0000 (10:19 -0800)]
Add new internal API: enableOptionalCodecs()/disableOptionalCodecs()

This API can be used to enable the optional codecs, or disable them
and use only the mandatory SBC.
Internally, it is implemented by raising the SBC priority to
highest (so SBC will be used/selected), or reducing the SBC priority
to its default value (lowest).

Test: A2DP streaming and enabling/disabling/selecting optional codecs
Bug: 35873828
Change-Id: Ia82036ac33590a3a402b1f5a36102264d47a9029
(cherry picked from commit 61075105ca95a2389c23733bf72b5d49b0da4b28)

7 years agoMerge "Fix battery warning color lookup" into oc-dev
TreeHugger Robot [Wed, 29 Mar 2017 22:50:28 +0000 (22:50 +0000)]
Merge "Fix battery warning color lookup" into oc-dev

7 years agoMerge "wifi: add test for tracking Passpoint AP on devices with Passpoint disabled...
TreeHugger Robot [Wed, 29 Mar 2017 22:49:59 +0000 (22:49 +0000)]
Merge "wifi: add test for tracking Passpoint AP on devices with Passpoint disabled" into oc-dev

7 years agoImport translations. DO NOT MERGE
Bill Yi [Wed, 29 Mar 2017 22:41:14 +0000 (15:41 -0700)]
Import translations. DO NOT MERGE

Change-Id: If44ef7a09f2efa1aea4792fe2e938fcc86b7a7f0
Auto-generated-cl: translation import

7 years agoMerge "Add HidlSupport.java for utility methods for HIDL." into oc-dev
TreeHugger Robot [Wed, 29 Mar 2017 22:20:28 +0000 (22:20 +0000)]
Merge "Add HidlSupport.java for utility methods for HIDL." into oc-dev

7 years agoAllow cluster navigation to jump into touchscreenBlocksFocus
Evan Rosky [Wed, 15 Feb 2017 21:26:51 +0000 (13:26 -0800)]
Allow cluster navigation to jump into touchscreenBlocksFocus

Adds an exception to touchscreenBlocksFocus ViewGroups which
are also keyboardNavigationClusters. The behavior we want is
that cluster navigation can jump into touchscreenBlocksFocus
clusters but normal keyboard navigation can't. Once focus is
in a touchscreenBlocksFocus cluster; however, we allow focus
navigation to move freely within that cluster. It remains in
that cluster until a subsequent cluster navigation brings it
back out.

Adds back the touchscreenBlocksFocus attributes to Toolbar
and actionbar so that they behave like they did before.

Bug: 34363323
Test: Added CTS test. Verified desired behavior in a test app

Change-Id: I555bf5570b16a57f0d4c8a020ae509a1e1b33910
(cherry picked from commit aee802f3bc3da699315a7040728e5483483099ff)

7 years agoExpose initial focus feature flag for testing
Evan Rosky [Fri, 17 Mar 2017 21:08:55 +0000 (14:08 -0700)]
Expose initial focus feature flag for testing

Bug: 34520588
Test: View_FocusHandlingTest
Change-Id: I7a20a6e9c57fc61bd2562307f4e7f8dee1979a40
(cherry picked from commit 9a0ea38671f1721b940e0a1ba94226d1ebae397d)

7 years agoMake public getFragments() and onGetLayoutInflater() methods
George Mount [Wed, 29 Mar 2017 14:13:03 +0000 (14:13 +0000)]
Make public getFragments() and onGetLayoutInflater() methods

Bug 34703669
Test: I846ef668e3dd7d664cfb56d2b9400467ba9b79f4
Change-Id: Ie202960ada86b25e964f98a639b5f5740c8fdb79

7 years agoMerge "Move displaying mag bounds into surface transation" into oc-dev
TreeHugger Robot [Wed, 29 Mar 2017 21:25:02 +0000 (21:25 +0000)]
Merge "Move displaying mag bounds into surface transation" into oc-dev

7 years agoMention <intent> can't have string resources.
Makoto Onuki [Fri, 24 Mar 2017 19:54:56 +0000 (12:54 -0700)]
Mention <intent> can't have string resources.

Test: build
Bug 34046756

Change-Id: I761b246d6aba5df4a836af3d0b3bef8f977be5ec

7 years agoAAPT2: Allow arbitrary entry names with aapt2 optimize
Adam Lesinski [Wed, 29 Mar 2017 20:52:38 +0000 (13:52 -0700)]
AAPT2: Allow arbitrary entry names with aapt2 optimize

Presumably, the apps build fine for the developers, so just
feed the existing names through without validation. Validation
still exists when building an app from source.

Bug: 36051854
Change-Id: Idc64ee91b08dce67d3c28f3c5284a7afa1312df1
Test: run aapt2 optimize on the apks from b/36051854 and build aapt2_tests

7 years agoMerge "Enable static RROs by default" into oc-dev
TreeHugger Robot [Wed, 29 Mar 2017 20:48:53 +0000 (20:48 +0000)]
Merge "Enable static RROs by default" into oc-dev

7 years agoWhitelist ManagedProvisioning from bg check
Tony Mak [Wed, 29 Mar 2017 14:53:07 +0000 (15:53 +0100)]
Whitelist ManagedProvisioning from bg check

Notice that app put in this list is also exempted from doze.
Also, this only exempts us from the service restriction, but not the broadcast one.

Test: adb shell am make-uid-idle  --user 0 com.android.managedprovisioning
      && adb shell am broadcast -a android.intent.action.PRE_BOOT_COMPLETED -n com.android.managedprovisioning/com.android.managedprovisioning.ota.PreBootListener
      Observe there is no crash

Change-Id: Ic0a943a9b66c909a6727f9411af519a8c6cf0157
Fix: 36705375

7 years agoMerge "[AWARE] Remove Publish/Subscribe Count configuration" into oc-dev
Etan Cohen [Wed, 29 Mar 2017 20:14:59 +0000 (20:14 +0000)]
Merge "[AWARE] Remove Publish/Subscribe Count configuration" into oc-dev

7 years agoAAPT2: Parse an ID encoded as a map
Adam Lesinski [Wed, 29 Mar 2017 20:00:35 +0000 (13:00 -0700)]
AAPT2: Parse an ID encoded as a map

ID types should not be encoded as a map. AAPT and AAPT2 emit
IDs as boolean types.

Some apps exist that for some reason have their ID types encoded
as empty maps. This is the case only for the auto generated IDs
from enum values in <attr> tags.

Allow IDs as maps and ignore their content when processing an APK
for optimizing.

Also fixes an issue with expected size of the ResTable_package struct.

Bug: 35861796
Test: tested against the APK in b/35861796
Change-Id: I29a19cd9777bb10bed6766cd42e35e50e098797b

7 years agoAdd HidlSupport.java for utility methods for HIDL.
Yifan Hong [Mon, 27 Mar 2017 20:02:34 +0000 (13:02 -0700)]
Add HidlSupport.java for utility methods for HIDL.

The old .equals code uses Objects.deepEquals,
which does not handle for, e.g. ArrayList<byte[]>.
Create our own recursive HidlSupport.deepEquals
and deepHashCode method to handle these edge cases.

Bug: 36454147
Test: hidl_test_java
Change-Id: I56dc48985486b561263c260cf43aa90f30d581d0

7 years agoMerge "Make sure TileServices get onTileRemoved on reset" into oc-dev
TreeHugger Robot [Wed, 29 Mar 2017 20:03:59 +0000 (20:03 +0000)]
Merge "Make sure TileServices get onTileRemoved on reset" into oc-dev

7 years agoMerge "Removing duplicate string in Recents." into oc-dev
TreeHugger Robot [Wed, 29 Mar 2017 19:51:53 +0000 (19:51 +0000)]
Merge "Removing duplicate string in Recents." into oc-dev

7 years agoMerge "Dismiss the PiP if user changes setting while PiP is open." into oc-dev
TreeHugger Robot [Wed, 29 Mar 2017 19:40:53 +0000 (19:40 +0000)]
Merge "Dismiss the PiP if user changes setting while PiP is open." into oc-dev

7 years agoMove displaying mag bounds into surface transation
Phil Weaver [Tue, 28 Mar 2017 15:35:38 +0000 (08:35 -0700)]
Move displaying mag bounds into surface transation

Bug: 30960346
Test: Manually enabled magnification and explored
Change-Id: Ida16979ecf0263b1c1288aa92385af29928f2d9e
(cherry picked from commit 251db070c5bc6f2859ef05e5456cc9079afc8224)

7 years agoMerge "wifi: document UnsupportedOperationException for Passpoint related APIs" into...
TreeHugger Robot [Wed, 29 Mar 2017 19:34:05 +0000 (19:34 +0000)]
Merge "wifi: document UnsupportedOperationException for Passpoint related APIs" into oc-dev

7 years agoMerge "wifi: update passpoint to Passpoint in comments" into oc-dev
TreeHugger Robot [Wed, 29 Mar 2017 19:31:37 +0000 (19:31 +0000)]
Merge "wifi: update passpoint to Passpoint in comments" into oc-dev

7 years agoMerge "Only use cacheLock when it's needed" into oc-dev
TreeHugger Robot [Wed, 29 Mar 2017 19:27:10 +0000 (19:27 +0000)]
Merge "Only use cacheLock when it's needed" into oc-dev

7 years agoMerge "Revert "finished implementation of fingerprintservice enumerate"" into oc-dev
Kevin Chyn [Wed, 29 Mar 2017 19:25:08 +0000 (19:25 +0000)]
Merge "Revert "finished implementation of fingerprintservice enumerate"" into oc-dev

7 years agoFix battery warning color lookup
Jason Monk [Wed, 29 Mar 2017 19:21:36 +0000 (15:21 -0400)]
Fix battery warning color lookup

Test: visual
Change-Id: Ia3db18f27d83c079b19fc555387e1f7be8963298
Fixes: 36552063

7 years agoMerge "TextClassifier: Switch model based on locale" into oc-dev
TreeHugger Robot [Wed, 29 Mar 2017 19:17:31 +0000 (19:17 +0000)]
Merge "TextClassifier: Switch model based on locale" into oc-dev

7 years agoMerge "Removing PiP notification channel." into oc-dev
TreeHugger Robot [Wed, 29 Mar 2017 19:13:07 +0000 (19:13 +0000)]
Merge "Removing PiP notification channel." into oc-dev

7 years agoMerge "Do not use many FDs in FontManagerService." into oc-dev
TreeHugger Robot [Wed, 29 Mar 2017 19:11:33 +0000 (19:11 +0000)]
Merge "Do not use many FDs in FontManagerService." into oc-dev

7 years agoMerge "TextClassifier: add API to WebView" into oc-dev
Tima Vaisburd [Wed, 29 Mar 2017 18:50:04 +0000 (18:50 +0000)]
Merge "TextClassifier: add API to WebView" into oc-dev

7 years agoRevert "finished implementation of fingerprintservice enumerate"
Kevin Chyn [Wed, 29 Mar 2017 18:29:37 +0000 (11:29 -0700)]
Revert "finished implementation of fingerprintservice enumerate"

This reverts commit f8ff36c47f9f8d60cf825e6b43eb75d1eae81df5.
Test: manual

Change-Id: Ib7a887ad2b185d83174d171832cd9c3bc87939c0

7 years agoMerge "Fix bad Java docs in View.java" into oc-dev
TreeHugger Robot [Wed, 29 Mar 2017 18:33:07 +0000 (18:33 +0000)]
Merge "Fix bad Java docs in View.java" into oc-dev

7 years agoCorrect ACTION_SHOW_NOTICE_ECM_BLOCK_OTHERS
Robert Greenwalt [Fri, 24 Mar 2017 18:55:47 +0000 (11:55 -0700)]
Correct ACTION_SHOW_NOTICE_ECM_BLOCK_OTHERS

The name is not allowed for an internal, non-public
intent.  Changed to use com.android.internal.* namespace.

bug:35266833
Test: Ran cts.IntentTest.shouldNotFindUnexpectedIntents
Change-Id: Ifd7d7f0aa537bfbbc7d67aa3b73b0887acd6104a

7 years agoMerge "Prevent invisible PiP menu activity from having touch focus." into oc-dev
Winson Chung [Wed, 29 Mar 2017 18:18:08 +0000 (18:18 +0000)]
Merge "Prevent invisible PiP menu activity from having touch focus." into oc-dev

7 years agoMerge "Do not allow printing until preview is updated" into oc-dev
TreeHugger Robot [Wed, 29 Mar 2017 17:58:55 +0000 (17:58 +0000)]
Merge "Do not allow printing until preview is updated" into oc-dev

7 years agoUpdate injectSmsPdu documentation.
Abhijith Shastry [Wed, 29 Mar 2017 17:54:53 +0000 (10:54 -0700)]
Update injectSmsPdu documentation.

BUG: 35325136
Test: Comment only update.
Change-Id: I4ff38665a06de5e989e15e17aaac5f512da4303e

7 years agoMerge "Fix problem with ListView accessibility focus" into oc-dev
TreeHugger Robot [Wed, 29 Mar 2017 17:47:08 +0000 (17:47 +0000)]
Merge "Fix problem with ListView accessibility focus" into oc-dev

7 years agoMerge "AudioAttributes: make getVolumeControlStream() non static" into oc-dev
TreeHugger Robot [Wed, 29 Mar 2017 17:39:57 +0000 (17:39 +0000)]
Merge "AudioAttributes: make getVolumeControlStream() non static" into oc-dev

7 years agoMerge "Reserve space for preference icon." into oc-dev
TreeHugger Robot [Wed, 29 Mar 2017 17:34:03 +0000 (17:34 +0000)]
Merge "Reserve space for preference icon." into oc-dev

7 years agoMerge "[AWARE] Fix unit tests" into oc-dev
Etan Cohen [Wed, 29 Mar 2017 17:32:13 +0000 (17:32 +0000)]
Merge "[AWARE] Fix unit tests" into oc-dev

7 years agowifi: update passpoint to Passpoint in comments
Peter Qiu [Wed, 22 Mar 2017 01:42:55 +0000 (18:42 -0700)]
wifi: update passpoint to Passpoint in comments

Per API Council, we should use the trademark name Passpoint
instead of passpoint in the code comments.

Bug: 35854283
Test: make -j32
Change-Id: Iea6697191a936d1d779c0ea50cd19c134bc7df02

7 years agoPrevent invisible PiP menu activity from having touch focus.
Winson Chung [Thu, 23 Mar 2017 22:17:01 +0000 (15:17 -0700)]
Prevent invisible PiP menu activity from having touch focus.

- Mark the decor view as invisible when the the PiP menu activity is
  hidden.  We don't call Activity.setVisible() as that alters other
  internal states that affect the system's understanding of whether
  the activity will draw or not.

Bug: 36225602
Test: android.server.cts.ActivityManagerPinnedStackTests

Change-Id: I6b1ed7098e1f0ff427f0655c45e566ca60979623
(cherry picked from commit 8c8ba19e0d3214f28dccec91549df9c3cd64ae10)

7 years agoDismiss the PiP if user changes setting while PiP is open.
Winson Chung [Wed, 29 Mar 2017 04:03:52 +0000 (21:03 -0700)]
Dismiss the PiP if user changes setting while PiP is open.

Bug: 36070720
Test: Open PiP, launch setting, disable PiP for package
Change-Id: Ia193b079d6ae27fc5fb5b1e8950cf42dfdd28450

7 years agoOnly use cacheLock when it's needed
Fyodor Kupolov [Wed, 29 Mar 2017 02:11:17 +0000 (19:11 -0700)]
Only use cacheLock when it's needed

When reading from cache, we can avoid synchronization on dbLock if we
only read from cache (no db access).

When doing updates to db and cache, we should hold cacheLock only when
updating the cache.

This change improves locking in the following methods:
 - getAccountVisibilityFromCache
 - saveAuthTokenToDatabase
 - getAccountsFromCacheLocked no longer allows outside locking. The
   method was renamed to getAccountsFromCache and now self-manages locks
 - writeAuthTokenIntoCacheLocked
 - readAuthTokenInternal

Test: AccountManagerServiceTest
Bug: 36485175
Bug: 35262596
Change-Id: I9aca45c31716c4f0e0fd9f07859e88a7f5ba6922

7 years agowifi: document UnsupportedOperationException for Passpoint related APIs
Peter Qiu [Mon, 27 Mar 2017 22:19:22 +0000 (15:19 -0700)]
wifi: document UnsupportedOperationException for Passpoint related APIs

An UnsupportedOperationException will be thrown for Passpoint related
API calls if Passpoint is not enabled on the device (build config
config_wifi_hotspot2_enabled is set to false).

Bug: None
Test: None
Change-Id: Id0ba1f7b80091d55a839fa3eee36baf9b45b7f5f

7 years agoMake sure TileServices get onTileRemoved on reset
Jason Monk [Wed, 29 Mar 2017 17:13:51 +0000 (13:13 -0400)]
Make sure TileServices get onTileRemoved on reset

Test: runtest systemui
Change-Id: Ic23eb6759f99c9cfe45ab975b3bb723dae56e0d8
Fixes: 34481238

7 years ago[AWARE] Remove Publish/Subscribe Count configuration
Etan Cohen [Mon, 20 Mar 2017 18:33:12 +0000 (11:33 -0700)]
[AWARE] Remove Publish/Subscribe Count configuration

Simplify API: semantics of publish/subscribe count restrictions
aren't clear at the app level. They depend on DW configuration as
well as discovery session type - number of packets transmitted over
the air.

There's already an app-facing discovery session lifetime configuration -
the TTL. That has clearer semantics and is sufficient (for now).

(cherry-pick of commit 2cbaf22bba4da1b60c551112a97ccc7f2e7157fa)

Bug: 36446307
Test: unit tests and integration (sl4a) tests.
Merged-In: I9129975bd2e1a61b3d23a4b6acaae703b42216c7
Change-Id: I9129975bd2e1a61b3d23a4b6acaae703b42216c7

7 years agoDo not use many FDs in FontManagerService.
Seigo Nonaka [Tue, 28 Mar 2017 02:46:51 +0000 (19:46 -0700)]
Do not use many FDs in FontManagerService.

Currently there are over 170 font files are installed in system directory.
Opening 170+ files and keep them is not unacceptable. Pass URI instead.

At the same time, this CL hides full font path from FontConfig since
/system/fonts directory will be deprecated in future.

Bug: 36660849
Test: android.text.cts.FontManagerTest passed
Change-Id: I1d216dc9c6dec702a4ce3b946bfda6dcbe12b7fe
(cherry picked from commit 455f1bfc05bf972ee4fe8cd5fa135ed232126bb7)

7 years agoRemoving PiP notification channel.
Winson Chung [Wed, 29 Mar 2017 03:42:34 +0000 (20:42 -0700)]
Removing PiP notification channel.

- Using the General channel instead.

Bug: 36670134
Test: Ensure no PiP channel in settings
Change-Id: If186a2565bb6911c6e15b25788908fd909a54287

7 years agoMerge "SurfaceView: Make surfaceRedrawNeededAsync work with WM bypass." into oc-dev
Rob Carr [Wed, 29 Mar 2017 16:44:36 +0000 (16:44 +0000)]
Merge "SurfaceView: Make surfaceRedrawNeededAsync work with WM bypass." into oc-dev

7 years agoFix bad Java docs in View.java
Philip P. Moltmann [Thu, 2 Mar 2017 21:12:36 +0000 (13:12 -0800)]
Fix bad Java docs in View.java

Test: Used intelliJ to warn about bad docs
Change-Id: Idb119aff8ce0f2370f66707bd583e2d131fb0751
(cherry picked from commit f4946e7f1592072cade07ff62b6123f8fe7d2662)

7 years agoDo not allow printing until preview is updated
Philip P. Moltmann [Fri, 24 Mar 2017 23:17:13 +0000 (16:17 -0700)]
Do not allow printing until preview is updated

Otherwise we might end up in the situation where we print something that
was not previewed.
This is of course bad for the user as he prints something he has not seen.
It is also bad for the print spooler as in the case the layout did not
describe the amount of pages, we do not know the number of pages available
until the update is complete.

We now allow changing of printer at any time unless printing is in final
stage. If we don't allow this the changing of printer would be blocked
until the intial document was written which might take some time.

Fixes: 36599750
Test: cts-tradefed run cts-dev -m Print
Change-Id: I93e910c02f2a770008b845028f0adf17b3d410e2
(cherry picked from commit 378cddbc41dae55e9a11faaa251b80fb90878b34)

7 years agoTextClassifier: Switch model based on locale
Abodunrinwa Toki [Wed, 29 Mar 2017 00:25:23 +0000 (01:25 +0100)]
TextClassifier: Switch model based on locale

Test: cts-tradefed run cts-dev -m CtsViewTestCases -t
android.view.textclassifier.cts.TextClassificationManagerTest

Change-Id: I91f814fc47bd75922c0e42a774dc7376daf65366

7 years agoMerge "Re-enable throw when notifications posted can't find channel" into oc-dev
TreeHugger Robot [Wed, 29 Mar 2017 15:34:58 +0000 (15:34 +0000)]
Merge "Re-enable throw when notifications posted can't find channel" into oc-dev

7 years agoFix problem with ListView accessibility focus
Phil Weaver [Thu, 23 Mar 2017 19:21:53 +0000 (12:21 -0700)]
Fix problem with ListView accessibility focus

A scrap view was retaining accessibility focus, leading to
a confusing experience for screen reader users.

Part of the problem is that views can change even when the
adapter has stable ids. This change tightens the condition
for restoring a11y focus to the same view.

AbsListView also allowed scrap views to maintain a11y focus.
While this may make sense if the views will be reused, it is
wrong if the views are not reused.

Bug: 29403113
Test: Verified that a11y focus stays put when toggling the
preference: Settings -> System -> Language & input ->
Virtual keyboards -> Advanced -> Symbol for physical keyboard

Change-Id: Ie4a15027088f158d9ed4bb3f3eeff5a288c25832
(cherry picked from commit ab4717aa2a7d0e19f4b08b2c851a541f9b0c9c6b)

7 years ago[AWARE] Fix unit tests
Etan Cohen [Tue, 28 Mar 2017 17:31:47 +0000 (10:31 -0700)]
[AWARE] Fix unit tests

Update to reflect new mockito semantics.

No functional change, no change to test semantics!

(cherry-pick of commit afddcc3c9860fecfdb3ed72fafb09d73e8549411)

Bug: 36680830
Test: unit tests now passing
Merged-In: Ic210f20ce47ab19da25bd0835ae2ee5ae0f73011
Change-Id: Ic210f20ce47ab19da25bd0835ae2ee5ae0f73011

7 years agoMerge "Add audio service support to BridgeContext" into oc-dev
TreeHugger Robot [Wed, 29 Mar 2017 13:26:21 +0000 (13:26 +0000)]
Merge "Add audio service support to BridgeContext" into oc-dev

7 years agoRe-enable throw when notifications posted can't find channel
Geoffrey Pitsch [Wed, 29 Mar 2017 13:19:50 +0000 (09:19 -0400)]
Re-enable throw when notifications posted can't find channel

Only applies for non-user builds, and for apps that have tried using
channels.

Test: runtest systemui-notification
Change-Id: I7e28545ba28eadae75bf015bdf490093223e2940

7 years agoAdd audio service support to BridgeContext
Diego Perez [Wed, 29 Mar 2017 11:03:58 +0000 (12:03 +0100)]
Add audio service support to BridgeContext

Bug: http://b.android.com/259326
Test: N/A
Change-Id: Ie43ccca49a5e77d82426b4f265e3c05dddfacad9

7 years agoIntroduce AMS.getLastResumedActivityUserId to fix work profile icon issue
Tony Mak [Tue, 28 Mar 2017 17:50:01 +0000 (18:50 +0100)]
Introduce AMS.getLastResumedActivityUserId to fix work profile icon issue

Problem:
Work profile status bar icon feeature is relied on two callbacks
1. onForegroundProfileSwitch  (AMS.setResumedActivityLocked)
2. appTransitionStarting (WMS)

We assume callback 1 is always called before 2, but it is not the case.
These two callbacks are triggered by two handlers in two different threads,
and hence race condition happens.

Solution:
Not rely on onForegroundProfileSwitch to update mManagedProfileFocused
flag anymore. Query getLastResumedActivityUserId in appTransitionStarting.
Also, make sure mLastResumedActivity is updated before sending message
to WMS in setResumedActivityLocked.

Test: Start a work app, observe that the work icon is shown.
Test: Start a personal app, observe that work icon is gone.
Test: Dock the work app, tap on it (give it focus), observe that work
      icon is shown.
Test: Start a work app, switch user, can see the icon is gone. Switch back,
      icon is back.

Bug: 34159089

Change-Id: I2cee141d18e8b7d5607b26dd7a2fd5bc9cd0ebb3

7 years agoRemoving duplicate string in Recents.
Winson Chung [Wed, 29 Mar 2017 04:33:28 +0000 (21:33 -0700)]
Removing duplicate string in Recents.

- Use the same string when showing incompatible apps as the string that
  we show when launching an incompatible app.

Bug: 35373622
Test: Launch recents with incompatible app while docked, verify string
Change-Id: I8d9a7d6e96a384ccff80ab6ff8a5e53c13d8d420

7 years agoMerge "Allow apps to process ProxyFDCallback asynchrnously." into oc-dev
TreeHugger Robot [Wed, 29 Mar 2017 04:41:38 +0000 (04:41 +0000)]
Merge "Allow apps to process ProxyFDCallback asynchrnously." into oc-dev

7 years agoMerge "Change string connected_via_network_scorer_default." into oc-dev
TreeHugger Robot [Wed, 29 Mar 2017 04:37:07 +0000 (04:37 +0000)]
Merge "Change string connected_via_network_scorer_default." into oc-dev

7 years agoEnable static RROs by default
Jaekyun Seok [Wed, 29 Mar 2017 02:02:15 +0000 (11:02 +0900)]
Enable static RROs by default

Static RROs should be always enabled.
This is a missing part from ag/1949458.
The design details are in go/treble-static-rro.

Test: building succeeded and tested with static RROs.
Bug: 35742444
Change-Id: Ia9851f91c97cdde2436a29a161194eeb56ea47d5

7 years agoConvert bitmaps to sRGB/scRGB when they have a color profile
Romain Guy [Mon, 27 Mar 2017 07:40:21 +0000 (00:40 -0700)]
Convert bitmaps to sRGB/scRGB when they have a color profile

This change also fixes an issue with RGBA16F bitmaps when modulated
with a color (for instance by setting an alpha on the Paint object).

The color space conversion is currently done entirely in the shader,
by doing these operations in order:

1. Sample the texture
2. Un-premultiply alpha
3. Apply the EOTF
4. Multiply by the 3x3 color space matrix
5. Apply the OETF
6. Premultiply alpha

Optimizations:
- Steps 2 & 6 are skipped for opaque (common) bitmaps
- Step 3 is skipped when the color space's EOTF is close
  to sRGB (Display P3 for instance). Instead, we use
  a hardware sRGB fetch (when the GPU supports it)
- When step 3 is necessary, we use one of four standard
  EOTF implementations, to save cycles when possible:
  + Linear (doesn't do anything)
  + Full parametric (ICC parametric curve type 4 as defined
    in ICC.1:2004-10, section 10.15)
  + Limited parametric (ICC parametric curve type 3)
  + Gamma (ICC parametric curve type 0)

Color space conversion could be done using texture samplers
instead, for instance 3D LUTs, with or without transfer
functions baked in, or 1D LUTs for transfer functions. This
would result in dependent texture fetches which may or may
not be an advantage over an ALU based implementation. The
current solution favor the use of ALUs to save precious
bandwidth.

Test: CtsUiRenderingTests, CtsGraphicsTests
Bug: 32984164
Change-Id: I10bc3db515e13973b45220f129c66b23f0f7f8fe

7 years agoExpose ACCESSIBILITY_CAPTIONING_* to Instant Apps
Chad Brubaker [Tue, 28 Mar 2017 23:11:38 +0000 (16:11 -0700)]
Expose ACCESSIBILITY_CAPTIONING_* to Instant Apps

Fixes settings issues seen in Webview startup.
Bug: 34087569
Test: SecurityExceptions go away

Change-Id: I0e3c55e7dc1c17f445d9dc514682e12dad9dc247

7 years agoRevert "Make public getFragments() and onGetLayoutInflater() methods"
Jeff Tinker [Wed, 29 Mar 2017 01:10:54 +0000 (01:10 +0000)]
Revert "Make public getFragments() and onGetLayoutInflater() methods"

This reverts commit 599be3d01ed1811ae365085e67a15d082170b583.

This change is being reverted because it broke git_master build.

Change-Id: I54ab9cd3d9e08dcf870f472fda08cc44e57986d0
bug: 34703669

7 years agoChange string connected_via_network_scorer_default.
Stephen Chen [Wed, 29 Mar 2017 01:14:17 +0000 (18:14 -0700)]
Change string connected_via_network_scorer_default.

Bug:36629448
Test: make
Change-Id: I06945a64b54d7e41c542ec36ef45eb7c8cb7bf10

7 years agoMerge "Ensures Accessibility button always overrides IME switcher" into oc-dev
Casey Burkhardt [Wed, 29 Mar 2017 01:05:33 +0000 (01:05 +0000)]
Merge "Ensures Accessibility button always overrides IME switcher" into oc-dev

7 years agoMerge "TIF: open transient columns to public" into oc-dev
Conrad Chen [Wed, 29 Mar 2017 00:46:04 +0000 (00:46 +0000)]
Merge "TIF: open transient columns to public" into oc-dev

7 years agoMerge "NetworkPolicy gets updated due to CarrierConfigManager updates." into oc-dev
TreeHugger Robot [Wed, 29 Mar 2017 00:42:21 +0000 (00:42 +0000)]
Merge "NetworkPolicy gets updated due to CarrierConfigManager updates." into oc-dev

7 years agoMerge "Merge "improve the format of locale argument when calling recovery" am: 032c7a...
Tianjie Xu [Wed, 29 Mar 2017 00:29:01 +0000 (00:29 +0000)]
Merge "Merge "improve the format of locale argument when calling recovery" am: 032c7a0a18 am: 1cd3a93288 am: bc0865bc78" into oc-dev

7 years agoAllow apps to process ProxyFDCallback asynchrnously.
Daichi Hirono [Wed, 8 Feb 2017 07:20:20 +0000 (16:20 +0900)]
Allow apps to process ProxyFDCallback asynchrnously.

Previously callback methods of ProxyFileDescriptorCallback were invoked
on a background thread prepared in the framework. So all methods were
invoked and processed synchronously. This was problem because if it took
time to fetch bytes of one file, operations for other files were also
blocked.

The CL changes ProxyFileDescriptorCallback methods to be invoked on
Handler passed by apps. Now application can prepare a Handler per file
so that one file does not block others.

Bug: 35229514
Test: cts-tradefed run cts -m CtsOsTestCases -t android.os.storage.cts.StorageManagerTest#testOpenProxyFileDescriptor_async
Change-Id: Ibadc4aad4c0373a3da586459a8f775e40288c895
(cherry picked from commit 4f156065c860d916b649e2b464e9405cafc732e9)

7 years agoMerge "Make public getFragments() and onGetLayoutInflater() methods" into oc-dev
TreeHugger Robot [Tue, 28 Mar 2017 23:43:15 +0000 (23:43 +0000)]
Merge "Make public getFragments() and onGetLayoutInflater() methods" into oc-dev

7 years agoMerge "ActivityManager: Allow DiskRead for wrap.sh determination" into oc-dev
TreeHugger Robot [Tue, 28 Mar 2017 23:17:58 +0000 (23:17 +0000)]
Merge "ActivityManager: Allow DiskRead for wrap.sh determination" into oc-dev

7 years agoEnsures Accessibility button always overrides IME switcher
Casey Burkhardt [Tue, 28 Mar 2017 22:52:12 +0000 (15:52 -0700)]
Ensures Accessibility button always overrides IME switcher

In the case of both the IME switcher and Accessibility button
appearing within NavigationBarView, we want to allow the
accessibility button to always override the appearance of the IME
switcher as our target users will most-often be using
dead-reckoning to interact with the Accessibility button,
requiring consistent appearance, location, and visibility.

Bug: 35267032
Test: Manual
Change-Id: Ib39d2336efe7073f686d94b3f71fc853af3186bb

7 years agoMerge "Move activity to display on launch" into oc-dev
TreeHugger Robot [Tue, 28 Mar 2017 22:52:56 +0000 (22:52 +0000)]
Merge "Move activity to display on launch" into oc-dev

7 years agoReserve space for preference icon.
Doris Ling [Mon, 27 Mar 2017 20:32:04 +0000 (13:32 -0700)]
Reserve space for preference icon.

Add an attribute to Preference to specify whether the space of the icon
view should be reserved when no preference icon is provided.

Bug: 36448695
Test: manual
Change-Id: I03b49fe93d54bb9106cf167a677a9ea544a3e3a1

7 years agoNetworkPolicy gets updated due to CarrierConfigManager updates.
Ammar Aijazi [Tue, 28 Mar 2017 22:43:22 +0000 (15:43 -0700)]
NetworkPolicy gets updated due to CarrierConfigManager updates.

Bug: b/34385985
Test: Added unit tests to NetworkPolicyManagerServiceTest
Change-Id: I1d8249081c478e6484c8011d3eab73a53f105fac

7 years agoMerge "improve the format of locale argument when calling recovery" am: 032c7a0a18...
Tianjie Xu [Tue, 28 Mar 2017 20:12:14 +0000 (20:12 +0000)]
Merge "improve the format of locale argument when calling recovery" am: 032c7a0a18 am: 1cd3a93288
am: bc0865bc78

Change-Id: I65bc4945d0701ecc10fd41f827c4566dfea912f9
(cherry picked from commit ee45a1f3abd50a7451cfd7b6d7e48b778021bac5)

7 years agoMerge "Correctly set thread group to UiThread's thread." into oc-dev
Makoto Onuki [Tue, 28 Mar 2017 22:19:01 +0000 (22:19 +0000)]
Merge "Correctly set thread group to UiThread's thread." into oc-dev

7 years agoMerge "Log a warning if a dispatch on UiThread takes more than" into oc-dev
Makoto Onuki [Tue, 28 Mar 2017 22:03:04 +0000 (22:03 +0000)]
Merge "Log a warning if a dispatch on UiThread takes more than" into oc-dev

7 years agoLog a warning if a dispatch on UiThread takes more than
Makoto Onuki [Tue, 28 Mar 2017 21:12:34 +0000 (14:12 -0700)]
Log a warning if a dispatch on UiThread takes more than

a certain amount of time.

Bug: 34961340
Test: Boot and launch several apps.
Change-Id: I38bd85a1dd9c572242d04f550df4a979f5f3bea5

7 years agoAudioAttributes: make getVolumeControlStream() non static
Jean-Michel Trivi [Mon, 27 Mar 2017 18:52:18 +0000 (11:52 -0700)]
AudioAttributes: make getVolumeControlStream() non static

In AudioAttributes class:
 - deprecate static getVolumeControlStream(AudioAttributes) method,
 - add non-static getVolumeControlStream() method.

Test: cts-tradefed run cts -m CtsMediaTestCases -t android.media.cts.AudioAttributesTest
Change-Id: Ic2276cb7367e0bcb0c07e1fe63de68dafddbccb5

7 years agoMerge "Add Configuration param to onMovedToDisplay" into oc-dev
TreeHugger Robot [Tue, 28 Mar 2017 21:36:34 +0000 (21:36 +0000)]
Merge "Add Configuration param to onMovedToDisplay" into oc-dev