Commit Graph

64801 Commits

Author SHA1 Message Date
Adam Powell
fd86f7fdfd Fixes for ImageView drawable visibility dispatch
am: 06f9eb8b62

Change-Id: I8b7d8c73f0a718963a191fd5460517e5a7445974
2016-08-27 01:19:28 +00:00
Chong Zhang
9f92bc2602 DO NOT MERGE -- Only use saved surface if started by launcher or moved to front
am: 813be138ae

Change-Id: Id64071882a0b90212b92234a4d0bdc67f2ee5e1a
2016-08-26 23:28:17 +00:00
Adam Powell
06f9eb8b62 Fixes for ImageView drawable visibility dispatch
Some apps rely on their drawables not getting not-visible hints via
setVisible when the window visibility changes. This manifests as
additional animations, such as crossfading from placeholders when the
window becomes visible again.

Apps should be able to handle this case in the future now that we have
more detailed reporting via onVisibilityAggregated, but to keep
existing apps working as-is, ImageView now operates in a compatibility
mode for targetSdkVersion < N and will only dispatch visibility
signals based on the same triggers used in M. New apps get the more
detailed signals.

Fix a bug where window visibility dispatch via onVisibilityAggregated
would double-dispatch "not visible" when the window is transitioning
from GONE => INVISIBLE or INVISIBLE => GONE.

Make the growing set of compatibility check fields in ImageView
static, matching the pattern from View.

Bug 30216207

Change-Id: I88875260bf6aaa23687c7d51353de8d633383531
2016-08-26 22:59:39 +00:00
Chong Zhang
813be138ae DO NOT MERGE -- Only use saved surface if started by launcher or moved to front
Restrict saved surface to launcher start (ACTION_MAIN&CATEGORY_
LAUNCHER), or there is no intent at all (eg. task being brought to
front). If the intent is something else, likely the app is going
to show some specific page or view, instead of what's left last time.

This solves problems like the launcher shortcuts on DeckClock,
each of them is a different intent and will show one specific
view regardless of last states. Another example is Chrome tab
opened directly by action VIEW to open some URL.

(Note that this doesn't solve the problem with Chrome homescreen
shortcuts, it will still start with saved surface (if Chrome
is already open). This is because the shortcut is a trampoline
activity that starts the real chrome tab activity, but when
the trampoline is started, the whole task is already brought
to front, and ChromeTab could become visible with the task
before we actually start it.)

bug: 31055479
bug: 27747315

Change-Id: Id3e61c61ef516b0edc1f174320f02661222f226b
(cherry picked from commit ad24f96def)
2016-08-26 15:41:58 -07:00
Todd Kennedy
efc1c4d501 Enable web action apps based on system setting
Bug: 28140107
Change-Id: I4cff49165be6432404b9a616ca35bee249daab2a
2016-08-26 14:03:37 -07:00
TreeHugger Robot
80855e154e Merge "Implement new ephemeral resolver design" into nyc-mr1-dev 2016-08-26 20:28:04 +00:00
Brian Duddie
73f511e471 Merge "ContextHubManager: Document InstanceInfo bug" into nyc-mr1-dev 2016-08-26 18:20:19 +00:00
Paul Stewart
0e164b199e Document correct context for obtaining WifiManager
Added comments to both WifiManager WIFI_SERVICE.

Bug: 25015174
Change-Id: Ibd1e21d860ef2b7cc432b3da76671d22c02ef7cb
2016-08-26 09:27:04 -07:00
Jason Monk
9813cb61dd Backup system QS tiles
am: baade7573f

Change-Id: Ie601a706cbdcfdb1e836117d02fec914b4acbab1
2016-08-26 13:24:14 +00:00
Jason Monk
f498d0d384 Merge "Backup system QS tiles" into nyc-dr1-dev 2016-08-26 13:18:54 +00:00
Jason Monk
baade7573f Backup system QS tiles
Add QS tiles to the backup list.  Non-system tiles will get removed
since they won't be installed when restore happens.

Change-Id: Iccf6e773384c45bd4d1f10c21aa8af356b3920d2
Bug: 28782938
2016-08-26 13:15:49 +00:00
Greg Kaiser
f8d61675ac Merge "NanoAppFilter: Workaround HubId issues" into nyc-mr1-dev 2016-08-26 03:34:39 +00:00
Greg Kaiser
1e07e392c3 Merge "ContextHubManager: Fix API documentation." into nyc-mr1-dev 2016-08-26 03:30:19 +00:00
Greg Kaiser
6ef2cee605 Merge changes I896af608,I2e2a65bc,I8d9ae8b9,Ibb07666a into nyc-mr1-dev
* changes:
  ContextHubService: Fix app query
  ContextHubService: Don't double report app loads
  ContextHubService: Make app handle size match Java
  ContextHubService: Update caches on nanoapp unload
2016-08-26 03:29:21 +00:00
Mark Lu
86caa4aebf docs: Fix typo and broken link in AsyncTask.java am: 53415ff24e
am: bae52ec98c

Change-Id: Idb695142488874d52dd406bede0fb4848f7663a9
2016-08-26 01:03:59 +00:00
Mark Lu
e16c82d224 docs: fix link in Loader reference page am: 9f52b7a4a8
am: f496b9a981

Change-Id: I7a7ee695fadb2e0774ef84724a4320fc73b45a88
2016-08-26 01:03:56 +00:00
Mark Lu
bae52ec98c docs: Fix typo and broken link in AsyncTask.java
am: 53415ff24e

Change-Id: I1fd10e79a2af2db5bc175dcc4126d3f88c35f4b1
2016-08-26 00:53:59 +00:00
Mark Lu
f496b9a981 docs: fix link in Loader reference page
am: 9f52b7a4a8

Change-Id: I32164f55f9b42dc50f13756c942644350a7d643e
2016-08-26 00:53:53 +00:00
Mark Lu
eab610d0a6 docs: fix broken links in Activity reference am: fa43485910
am: 497c2907fd

Change-Id: I35f07a633757dc83970accbe78b3173090e71099
2016-08-25 22:14:14 +00:00
Hemal Patel
42708fa473 Docs: Fixed the Bluetooth guide link am: 65813dff14 am: a544221abd
am: d6a64d788b

Change-Id: I52619fde80addd87e0ef18b48bc93184ddf347f1
2016-08-25 22:10:49 +00:00
Dianne Hackborn
05775d71e6 Try to mitigate issue #31016187: system_server crash in ArraySet.
am: dd28b7b5f3

Change-Id: I5526e96aa56d3a845f4989f08d30fd07d7a1d70b
2016-08-25 21:55:01 +00:00
Mark Lu
497c2907fd docs: fix broken links in Activity reference
am: fa43485910

Change-Id: I72cebe96e1ea0c1950ca316bc80c337bfdde9002
2016-08-25 21:54:49 +00:00
Hemal Patel
d6a64d788b Docs: Fixed the Bluetooth guide link am: 65813dff14
am: a544221abd

Change-Id: I0cbd8fa416f4d0b00d7cb3c65eef9748439abe48
2016-08-25 21:37:59 +00:00
Hemal Patel
a544221abd Docs: Fixed the Bluetooth guide link
am: 65813dff14

Change-Id: I4502828940c4f2e33363e10728e97f484bc15651
2016-08-25 21:31:56 +00:00
Dianne Hackborn
dd28b7b5f3 Try to mitigate issue #31016187: system_server crash in ArraySet.
Instead of crashing, log a wtf and recover.  This is not a problem
in ArraySet, but caused by someone else using an ArraySet without
protecting access to it.  So whoever is calling at this point is
not the cause, and it isn't worthwhile to let them crash.

Change-Id: Iaefa4315b620c9fe24b31507e4aa47a8525c8540
(cherry picked from commit 92aa4b2ba3)
2016-08-25 19:49:41 +00:00
Tenghui Zhu
1e37cc2f8a Merge "Add TestApi to ValueAnimator for AnimationScaleListDrawable CTS test." into nyc-mr1-dev 2016-08-25 18:24:12 +00:00
Phil Weaver
1bb2cc8cc3 Merge "Revert "Dispatch a11y events in separate thread."" into nyc-mr1-dev 2016-08-25 18:05:36 +00:00
Dianne Hackborn
09cb4f2007 Merge "Try to mitigate issue #31016187: system_server crash in ArraySet." into nyc-mr1-dev 2016-08-25 17:17:36 +00:00
Dianne Hackborn
92aa4b2ba3 Try to mitigate issue #31016187: system_server crash in ArraySet.
Instead of crashing, log a wtf and recover.  This is not a problem
in ArraySet, but caused by someone else using an ArraySet without
protecting access to it.  So whoever is calling at this point is
not the cause, and it isn't worthwhile to let them crash.

Change-Id: Iaefa4315b620c9fe24b31507e4aa47a8525c8540
2016-08-25 10:12:02 -07:00
Phil Weaver
5de2feab26 Revert "Dispatch a11y events in separate thread."
This reverts commit c34649411d.

Dispatching accessibility events in their own thread is causing Chrome and gmail to crash. We've identified two issues: Chrome is allocating strings natively using references that aren't valid outside of their thread, and the text is being set to values that are changed in the UI thread. 

I'm going to resolve these issues on master by making deep copies of the strings, but that change will have its own performance implications.

Since we were bit almost immediately by an unexpected result of this change, and I need to erode its benefit by making deep copies, I think it's a bad bet to push it into MR1.

Bug: 31042124
Change-Id: I6f5c225a9197036db43fd0ac6008447b22617525
2016-08-25 16:31:25 +00:00
Andrew Scull
56bfc1cecf Merge "Explain the IAE thrown by resetPassword." into nyc-mr1-dev 2016-08-25 15:01:18 +00:00
TreeHugger Robot
49af952a92 Merge "Store the event of settings db downgrade" into nyc-mr1-dev 2016-08-25 02:18:11 +00:00
Doris Ling
cdc758d555 Add the Moves setting values to the backup list.
am: 8a33273620

Change-Id: I8f64074acbe6d85a0f2402695925e7f75c20569b
2016-08-25 01:31:28 +00:00
Doris Ling
8a33273620 Add the Moves setting values to the backup list.
Add Secure.CAMERA_DOUBLE_TWIST_TO_FLIP_ENABLED,
Secure.CAMERA_DOUBLE_TAP_POWER_GESTURE_DISABLED, and
Secure.SYSTEM_NAVIGATION_KEYS_ENABLED (used by Settings->Moves)
to Secure.SETTINGS_TO_BACKUP, so that they will be backed up and
restored automatically.

Fixes: 31023788

Test: Manual - Setup device using "Copy your data", verify that
Settings->Moves toggles are set to previous selected values.

Change-Id: I509c997641bb693009bec703e5272b5aad517f0f
2016-08-25 00:48:33 +00:00
Svetoslav Ganov
264c7a90c7 Store the event of settings db downgrade
bug:30561721

Change-Id: I8f2252bbf99603976c7efc32c54aa88b314ba815
2016-08-24 17:31:21 -07:00
Fyodor Kupolov
7540b79fee Update services info before returning authenticators
am: 814464894c

Change-Id: I3d7eb42ef73ad77cb44c251a493ae967bcc0f651
2016-08-25 00:08:38 +00:00
Fyodor Kupolov
02e54d3c6a Merge "Update services info before returning authenticators" into nyc-dr1-dev 2016-08-25 00:02:51 +00:00
Adam Powell
a35c182637 Always report visibility to new ImageView drawables
am: 37b44dd592

Change-Id: Ib8e1cc5d3ee91aae74875cc70fda9d8d4104892e
2016-08-24 23:12:27 +00:00
Teng-Hui Zhu
0a815bb94f Add TestApi to ValueAnimator for AnimationScaleListDrawable CTS test.
Also rename an internal class.

b/30877925

Change-Id: Ib971ed090907a0ab387dd7c768e2b77eb9b69f75
2016-08-24 16:12:20 -07:00
Adam Powell
37b44dd592 Always report visibility to new ImageView drawables
Fix a regression where some drawables would not be correctly updated
with their visibility state if set while an ImageView was not attached
to a window.

Bug 30216207

Change-Id: Ia30326a78168141c8f85bad9c782710f965623b7
2016-08-24 22:57:09 +00:00
Fyodor Kupolov
814464894c Update services info before returning authenticators
Added RegisteredServicesCache.updateServices method which allows callers
to request an update to services for which package has been updated.

Added a call to updateServices in getAuthenticatorTypesInternal

Test: Manually tested update flow on test authenticator with an artificial
      delay in broadcast handling
Bug: 30979262
Change-Id: I499b2ee0be53fed01201c56068d929b6d621a78e
2016-08-24 22:47:38 +00:00
Jack Yu
edaaef304a Merge "Do not print misleading debug messages in some scenarios." into nyc-mr1-dev 2016-08-24 20:24:42 +00:00
Alan Viverette
16b8941dba Merge "Clean up VideoView, SurfaceView constructors" into nyc-mr1-dev 2016-08-24 18:17:04 +00:00
Alan Viverette
4e32b47c48 Merge "Constrain input hour and minute to valid range" into nyc-mr1-dev 2016-08-24 18:17:04 +00:00
Alan Viverette
52306705c1 Merge "Override LinearLayout's onLayout pass in AlertDialogLayout" into nyc-mr1-dev 2016-08-24 18:17:04 +00:00
Tony Mantler
97231323b7 Merge "Fix AsyncTask to handle exceptions in doInBackground" into nyc-mr1-dev 2016-08-24 17:00:04 +00:00
Alan Viverette
1bb8f51e76 Override LinearLayout's onLayout pass in AlertDialogLayout
LinearLayout sets up internal state during onLayout that's missing when
we override onMeasure. Avoid calling super.onMeasure() by re-implementing
onLayout without the internal state dependencies.

Bug: 30494039
Change-Id: I1149517a2fe5f5afdb4125db5e7f573588fea740
2016-08-24 12:26:27 -04:00
Tenghui Zhu
3512b0001a Merge "Add an new internal DrawableContainer to handle animation scale == 0 case." into nyc-mr1-dev 2016-08-24 16:22:38 +00:00
Jack Yu
bfd1d6ed49 Do not print misleading debug messages in some scenarios.
When the mobile network is not active, querying the network
information might trigger the misleading debug messages. Added
some condition checks to prevent this.

bug: 30850733
Change-Id: Ice6d548a56f98bac7fe2ca6a06148350b505533d
2016-08-23 16:09:36 -07:00
Svetoslav Ganov
5cb2973495 Only sync adapters with access can see an account - framework
It was possible for a sync adapter without accounts access to
see the account which it is supposed to sync which can be used to
identify the user. This change ensures that only sync adapters
with account access can run (which results in seeing the account),
otherwise we involve the user to approve access only to this account.

A sync adapter can access an account if one of these is true:
 - it is signed as the authenticator for this account
 - has the GET_ACCOUNTS permission
 - has an auth token for the account
 - it is a preinstalled app (system or privileged)

The main thing we need to figure out is if the extra prompts
for giving access to a sync adapter to the account create too
much friction.

bug:28163381

Change-Id: Ie083bb681b5a2aed81ca5f6a062193a175fad77e
2016-08-23 21:43:27 +00:00