Commit Graph

65099 Commits

Author SHA1 Message Date
Philip P. Moltmann
a40092d6d2 Merge "Do not access MTP devices when disabled." into nyc-mr1-dev 2016-10-01 00:16:12 +00:00
Tao Bao
473b048cf7 Merge "Handle the race condition when calling uncrypt services." into nyc-mr1-dev 2016-09-30 23:07:38 +00:00
Philip P. Moltmann
5201f1e61c Do not access MTP devices when disabled.
The USB data transfer is disabled we should not allow access MTP devices
(e.g.
usb sticks). We have two ways of accessing them: Either by mounting them
or by creating a MTPDevice in an app.

Of course an app could implement implement their own MTPDevice
implementation. In this case we cannot enforce the policy without
completely suppressing all MTP USB devices which would be too
restrictive.

Note: When the policy is set we do _not_ disconnect already connected
MTP devices

Fixes: 31472955
Change-Id: I6080c48c49657102774b2b3b4d89ff030245a266
2016-09-30 22:24:23 +00:00
John Reck
6ba466ff3e SurfaceView only call forceDisconnect if isValid
Change-Id: I683c2f937f44d8b3d912839a3e91cbd5b5c7f437
Fixes: 31778946
Test: Manual, launch Cookie Jam then tap recents
2016-09-30 21:33:34 +00:00
Jorim Jaggi
a04451827e Merge "Fix crash if drawable doesn't have constant state" into nyc-mr1-dev 2016-09-30 09:02:41 +00:00
Tao Bao
1eabf53437 Handle the race condition when calling uncrypt services.
We call uncrypt services to setup / clear bootloader control block (BCB)
for scheduling tasks under recovery (applying OTAs, performing FDR).
However, we cannot start multiple requests simultaneously. Because they
all use the same socket (/dev/socket/uncrypt) for communication and init
deletes the socket on service exits.

This CL fixes the issue by a) adding synchronized blocks for the service
requests; b) checking the availability of the socket before initiating a
new one.

Note that adding synchronized blocks to RecoverySystem doesn't help,
because the calls could be made from different processes (e.g. priv-app,
system_server).

Bug: 31526152
Test: FDR works while a priv-app keeps calling clear BCB.

Change-Id: I95308989e849a9c98a9503ac509f2bc51ed3de19
(cherry picked from commit 794c8b0b3f)
2016-09-29 23:12:16 -07:00
Tianjie Xu
e422b0b29f Merge "Log the error when uncrypt timeouts" into nyc-mr1-dev 2016-09-29 18:03:30 +00:00
Jorim Jaggi
92d0602a7c Fix crash if drawable doesn't have constant state
Change-Id: I2364efb9dc1446bc1a8c50abf6bd34a73c226f7e
Fixes: 31755893
2016-09-29 14:37:14 +00:00
Hugo Benichi
3fc76c4669 Merge "New Settings symbols for captive portal detection" into nyc-mr1-dev 2016-09-29 01:07:00 +00:00
Hugo Benichi
434fa32f82 Merge "Captive portal detection uses 3rd fallback probe" into nyc-mr1-dev 2016-09-29 01:06:35 +00:00
Meng Wang
cfe950f6be Merge "Support WFC roaming preference" into nyc-mr1-dev 2016-09-29 00:13:51 +00:00
Tony Mantler
647625fbf8 Merge "AsyncTask terminating with exception calls onCancelled" into nyc-mr1-dev 2016-09-28 23:25:54 +00:00
Eino-Ville Talvala
4e3bb26f64 Merge "DngCreator: Do not cache timezone in static initializer" into nyc-mr1-dev 2016-09-28 21:20:21 +00:00
Tony Mantler
5eb91a437c AsyncTask terminating with exception calls onCancelled
Test: cts/tests/tests/os/src/android/os/cts/AsyncTaskTest.java
b/30304893

Change-Id: Icb50cda8026ddd70d457b5e62eb29c81313ee47d
2016-09-28 21:16:56 +00:00
Tianjie Xu
2a03586998 Log the error when uncrypt timeouts
Log the error code to uncrypt_status if uncrypt gets killed because
of timeout.

Test: We log the error code correctly in uncrypt_status when uncrypt timeouts.
Bug: 31603820
Change-Id: Ia623c333714295e68f4269257fbb4297a867e42b
(cherry picked from commit 036d08638e)
2016-09-28 11:19:03 -07:00
Eino-Ville Talvala
ec727411d2 DngCreator: Do not cache timezone in static initializer
The static initializer for a pre-loaded framework class is run
no later than at zygote startup, which happens at device boot.

Which means that if the timezone later changes, DngCreator will use
an incorrect cached timezone until the next reboot.  This is especially
evident in freshly wiped devices, where initial setup will typically
change the timezone.

Instead, read the timezone each time DngCreator is created, which is
also when we query the current time for constructing the timestamps.

Test: android.hardware.camera2.cts.DngCreatorTest#testSingleImageThumbnail
Bug: 31743060
Change-Id: I83a4eac762650e5f904f3b8fa779c094cef30562
2016-09-28 11:10:00 -07:00
Hugo Benichi
92eb22fdd2 New Settings symbols for captive portal detection
This patch defines new Settings symbols for
  - setting the probe urls for captive portal detection.
  - setting which User-Agent to use for captive portal detection.

The existing default values for these settings are not changed, i.e:
  - HTTP and HTTPS probes urls are unchanged.
  - the fallback probe is not used.
  - User-Agent is empty by default.

Bug: 29367974
Change-Id: I6e4b3b172e56b8b67fffa4b51f776d68d5851f25
2016-09-28 23:13:25 +09:00
Hugo Benichi
d953bf853d Captive portal detection uses 3rd fallback probe
This patch adds the possitibility to send a 3rd fallback validation
probe in sendParallelHttpProbes when neither the 1st http probe nor the
https probe came back with a conclusive answer.

This 3rd probe is only used for trying again captive portal detection
and does not return success, so that network validation always fails if
the https probe fails.

In addition, the url reveals a captive portal is now sent to the
CaptivePortalLoginActivity so that all three probes can use different
urls.

Bug: 29367974

Change-Id: I7385fde1aa1316d94aac350af0e956cb193aa4ee
2016-09-28 23:12:31 +09:00
Jeremy Klein
adc26ec1b4 Remove unused mContext from BluetoothGatt[Server].
All that this member variable is doing right now is leaking a
reference to a context without any benefit.

Bug: 31752040
Bug: 31710795
Change-Id: If2241422533318b866340e8dcc9f5fbd9518349c
2016-09-28 07:09:38 +00:00
TreeHugger Robot
c43f05e669 Merge "Changed themes for core activities" into nyc-mr1-dev 2016-09-28 00:04:00 +00:00
Greg Kaiser
a97c9617ae Merge "ContextHubService: Hack around 32-bit app ID" into nyc-mr1-dev 2016-09-27 23:41:44 +00:00
TreeHugger Robot
121a9941d4 Merge "Don't leak wakelock instances" into nyc-mr1-dev 2016-09-27 23:37:57 +00:00
Greg Kaiser
1983f9b05b ContextHubService: Hack around 32-bit app ID
The NanoApp.java class has a bug (b/30808791) where the API treats
app IDs as 32-bits, instead of 64-bits.  We are too late in the
Android N release cycle to change this API.

We previously put in a hack to fix this only for Google nanoapps.
However, our GTS nanoapps need this to work, and there are other
partners who need this to work in the N timeframe.  So we make
a more robust hack which parses the full 64-bit app ID out of
the header binary.

Test: Compiles and runs GTS
Bug: 31767599
Change-Id: Ic43f1f62c685fb99aac08d08767d1a67c329503f
2016-09-27 15:01:48 -07:00
Christopher Tate
4b17e984b6 Don't leak wakelock instances
Bug 31247436

Change-Id: I7c2ad956c43233b37e53856e9321cb87b01c35da
2016-09-27 15:00:48 -07:00
TreeHugger Robot
5c07d0c2ee Merge "[DO NOT MERGE] Use tokens instead of account access trackers" into nyc-mr1-dev 2016-09-27 20:45:48 +00:00
TreeHugger Robot
f574ba6eed Merge "Allow null target in ObjectAnimator if the target has never been set" into nyc-mr1-dev 2016-09-27 00:38:05 +00:00
Kevin Hufnagle
971696f632 docs: Added min/max values and descriptions for alpha getter/setter in ImageView am: bdb308a059
am: c012a7ed7a

Change-Id: Ib2c868e86e516ae2a2f92e4e26a8c0113237557a
2016-09-27 00:08:50 +00:00
Kevin Hufnagle
e83639f66a docs: Added note in getCacheDir() that developers can use directory obtained from getExternalCacheDir() to store app caches larger than 1 MB. am: e9681e192a
am: 2e8026acc0

Change-Id: I93a1abe6b80a441f8c441390dacbff2824d52e57
2016-09-27 00:02:44 +00:00
Kevin Hufnagle
abfc0340d7 docs: Removed all instances of "i.e." in IntentFilter parameter descriptions. am: e20b3d78e3
am: 9402b319fe

Change-Id: Id7d4b705073802abcb2d902b50673a09933ff3da
2016-09-27 00:01:00 +00:00
Kevin Hufnagle
8e9b8b6c74 docs: Added note in LayoutTransition class reference that APPEARING and DISAPPEARING animation timelines cannot overlap am: 5232329b4e
am: ad5cafd283

Change-Id: I8593de353f1186b2aa892cf541a4718d64474b15
2016-09-26 23:50:14 +00:00
Kevin Hufnagle
8aff16acb7 docs: Clarified definition of KeyEvent.Callback.onKeyMultiple() am: b248b1f689
am: fcd4541b06

Change-Id: If0e9042f0df23403a128e45ca61258930b7db982
2016-09-26 23:47:09 +00:00
Kevin Hufnagle
c012a7ed7a docs: Added min/max values and descriptions for alpha getter/setter in ImageView
am: bdb308a059

Change-Id: Ida297f581f7177cd92ec4157a1b735c91d2e26a4
2016-09-26 23:37:36 +00:00
Kevin Hufnagle
2e8026acc0 docs: Added note in getCacheDir() that developers can use directory obtained from getExternalCacheDir() to store app caches larger than 1 MB.
am: e9681e192a

Change-Id: Ide8f3c2dd5414737c798c20c1fe9f11dcd9640ce
2016-09-26 23:36:25 +00:00
Kevin Hufnagle
9402b319fe docs: Removed all instances of "i.e." in IntentFilter parameter descriptions.
am: e20b3d78e3

Change-Id: I8d677ebcf03c28f46874514408240162cd6331c5
2016-09-26 23:34:58 +00:00
Kevin Hufnagle
ee3fc61cf9 docs: Fixed example of ACTION_VIEW intent am: aedfd75b1b
am: 2c885fc5ea

Change-Id: I1d94ee6938726736d6cbccafea848dd6f3d6a350
2016-09-26 23:16:02 +00:00
Kevin Hufnagle
ad5cafd283 docs: Added note in LayoutTransition class reference that APPEARING and DISAPPEARING animation timelines cannot overlap
am: 5232329b4e

Change-Id: Ib3f8ffa61495a237c6e69b8f9260b46027c26a2a
2016-09-26 23:15:18 +00:00
Kevin Hufnagle
fcd4541b06 docs: Clarified definition of KeyEvent.Callback.onKeyMultiple()
am: b248b1f689

Change-Id: Ie7380c80fc81b65a89337c7c126abc1dfe58a76e
2016-09-26 23:12:46 +00:00
Kevin Hufnagle
2c885fc5ea docs: Fixed example of ACTION_VIEW intent
am: aedfd75b1b

Change-Id: Iaaaa1cb0f6d796ad5c5c178c70850fd83e635013
2016-09-26 23:00:51 +00:00
Kevin Hufnagle
bec2e99f95 docs: Adjusted return value desc. for getApplicationEnabledSetting am: 5add769f59
am: d23fc43965

Change-Id: I27847f0935c047e74ab986c501fce160679a80d7
2016-09-26 23:00:16 +00:00
Kevin Hufnagle
d23fc43965 docs: Adjusted return value desc. for getApplicationEnabledSetting
am: 5add769f59

Change-Id: Ic0566aa6e2764a9d0db58c6f66ad028229a8fdca
2016-09-26 22:52:54 +00:00
Doris Liu
4d04b1a446 Allow null target in ObjectAnimator if the target has never been set
BUG: 31684571
Test: http://ag/1484115

Change-Id: I867fc3f93ddf70c58ae4387317ac875c5bafbebe
2016-09-26 22:32:41 +00:00
Chien-Yu Chen
5fb00f4d05 Merge "Camera2: Support early finished tasks" into nyc-mr1-dev 2016-09-26 21:35:21 +00:00
Salvador Martinez
7e2657c303 Changed themes for core activities
Many activities in core were using the
material theme which would result in teal
colors on all devices. These themes have
all been changed to DeviceDefault so that
the color will be more suited to whatever
device the user has.

Test: Manual Inspection
Bug: 31623421
Change-Id: I6847023c4fb57a1c3384a1f8e483cd740229458f
2016-09-26 12:49:31 -07:00
TreeHugger Robot
72f2597b17 Merge "Increase priority for broadcast intent triggered by HW key" into nyc-mr1-dev 2016-09-26 19:20:41 +00:00
Pankaj Kanwar
fe8176bda7 Merge "Prevent NPE if someone creates a bad BluetoothHealthAppConfig object" into nyc-mr1-dev 2016-09-26 18:24:38 +00:00
Mark Lu
fd4f71e3c3 docs: improve docs for sqlite package summary am: 59640a9f1c
am: e9480d08d3

Change-Id: I31119ebf54616d80d1bb2e508014f8563c5a0b88
2016-09-26 17:32:37 +00:00
Mark Lu
33ec89cd65 docs: Update docs for SQLiteDatabase replace methods am: 1e20208d90
am: 376f3e6b3a

Change-Id: Iaeb30e87c43da49c294ca551f778e66d6b309d1d
2016-09-26 17:31:05 +00:00
Hidenari Koshimae
469e65e37f Increase priority for broadcast intent triggered by HW key
Add the FLAG_RECEIVER_FOREGROUND flag to the broadcast intent
triggered by hardware key.
This prevents the framework from delaying the delivery of the
intent to its recipients, and improves the response for hardware
key event under heavy load on the system.

Bug: 28735973
Change-Id: Ib7f219845be34794f4c7545927e53cc6c2b504a3
2016-09-26 18:29:06 +01:00
Hemal Patel
f6356ef3f6 Fixed a typo in the code sample am: 247d1c9ea8
am: 6a400a5190

Change-Id: Idbf5c554ac863e7c2024816ad726d6e6c8cb9d2f
2016-09-26 17:29:02 +00:00
Mark Lu
e9480d08d3 docs: improve docs for sqlite package summary
am: 59640a9f1c

Change-Id: I2198d8f3a88980594011072f0dbd3b6a02635939
2016-09-26 17:23:38 +00:00