44149 Commits

Author SHA1 Message Date
Ricardo Cervera
97c4ba9862 docs: Added info on noHistory and onActivityResult().
Bug: 13807256

Cherry-pick from Iae4901a311e76401396f89c552e5b27a49c65c83

Change-Id: I4ad7aea1a3c7ea82bc2bbcdf35d2de418ef7b90f
2015-01-16 09:24:30 -08:00
Deepanshu Gupta
10bb1371dc Add preferences rendering.
NO_SQ: Depends on updating layoutlib-api-prebuilt.jar
Change-Id: Iae93ab74c478e6f2158e1528467bec9ee2d7ee9b
2014-12-23 12:04:30 -08:00
Christoph Studer
3eff1e1f0e am 92c411b2: Merge "Fix MediaStyle docs mentioning 2 max actions in compact view" into lmp-docs
* commit '92c411b24eaa787158b19b209050ea35fc5070b6':
  Fix MediaStyle docs mentioning 2 max actions in compact view
2014-12-17 12:22:33 +00:00
Christoph Studer
250a141cbe Fix MediaStyle docs mentioning 2 max actions in compact view
Bug: 18729304
Change-Id: Ica6b8ac47d7d38b1de62d64830256f66cbbdb225
2014-12-12 18:00:09 +00:00
Elliott Hughes
12f100def9 am e8f6cb06: Merge "Fix typo." into lmp-docs
* commit 'e8f6cb065c33c21dfefe0039739dc38fde5cff6d':
  Fix typo.
2014-12-09 19:22:33 +00:00
Elliott Hughes
547b0acae1 Fix typo.
Bug: https://code.google.com/p/android/issues/detail?id=78422

(cherry picked from commit 0adcf15ad8b41559b50b3cbde6a103582f8c95b8)

Change-Id: I62746a0690e9845b20b23b91f2a50d85214e8aa1
2014-12-09 10:31:37 -08:00
Ricardo Cervera-Navarro
0ac703fc8f am 1108b845: Merge "Sensor documentation fixes." into lmp-docs
* commit '1108b845f940debde0c1959a9293cafdc264afcc':
  Sensor documentation fixes.
2014-12-02 18:46:30 +00:00
Ricardo Cervera-Navarro
1108b845f9 Merge "Sensor documentation fixes." into lmp-docs 2014-12-02 18:33:50 +00:00
Christopher Tate
7265abe77a Be increasingly aggressive about fstrim if it isn't being run
The current heuristics depend on devices being alive at midnight+ in
order to run periodic background fstrim operations.  This unfortunately
means that people who routinely turn their devices off overnight wind
up with their devices *never* running fstrim, and this causes major
performance and disk-life problems.

We now backstop this very-friendly schedule with an increasingly
aggressive one.  If the device goes a defined time without a background
fstrim, we then force the fstrim at the next reboot.  Once the
device hits the midnight+ idle fstrim request time, then we already
aggressively attempt to fstrim at the first available moment
thereafter, even if it's days/weeks later without a reboot.

'Available' here means charging + device idle.  If the device never
becomes idle then we can't do much without rendering an in-use device
inoperable for some number of minutes -- but we have no evidence of
devices ever failing to run fstrim due to this usage pattern.

A new Settings.Global element (type 'long', called
"fstrim_mandatory_interval") is the source of the backstop time.  If
this element is zero or negative, no mandatory boot-time fstrim will
ever be performed.  If the element is not supplied on a given device,
the default backstop is 3 days.

Adds a new string to display in the upgrading dialog when doing
the fstrim.  Note it is too late for this to be localized, but since
this operation can take a long time it is probably better to have
it show *something* even if not localized, rather than just sit there.

Bug 18486922

Change-Id: I5b265ca0a65570fb8931251aa1ac37b530635a2c
2014-11-25 16:35:06 -08:00
Deepanshu Gupta
455654cffd Merge "LayoutLib: Stub AM/PM keycodes in Time Picker." into lmp-dev 2014-11-19 22:29:54 +00:00
Deepanshu Gupta
12b6d29b7b LayoutLib: Stub AM/PM keycodes in Time Picker.
TimePickerSpinnerDelegate doesn't need to deal with input when running
inside LayoutLib. So, we just return the keycodes as if it's running in
English locale.

Bug: http://b.android.com/79189
Change-Id: Ife0ae91a1e34a8dac379bc1dda1c1c8ed461c164
2014-11-18 22:02:40 +00:00
Jeff Sharkey
d68b87cdd4 Recover apps with malformed certificates.
There was a window of time in Lollipop where we persisted certificates
after they had passed through a decode/encode cycle.  The well-written
OpenSSL library was liberal when decoding (allowing slightly malformed
certs to be parsed), but then strict when encoding, giving us
different bytes for effectively the same certificate.

A related libcore change (0c990ab4a90b8a5492a67b2b728ac9a4a1ccfa1b)
now returns the original bytes verbatim, fixing both pre-Lollipop
installs and installs after that change.

This change recovers any apps that had been installed during the
window of time described above by doing a one-time check to see if
the certs are effectively equal.

Bug: 18228011
Change-Id: Ib82bd6db718d0490d7a26c9c1014b7c8457a7f2d
2014-11-12 13:16:06 -08:00
Aravind Akella
1375d3744c Sensor documentation fixes.
Bug: 17526079
Change-Id: I664e5e2d5103b87ed02f082551e46513f64b95a1
(cherry picked from commit 1f9b32f006f7c506d9df5bf73294710665746397)
2014-11-12 00:52:44 +00:00
Deepanshu Gupta
84a89ed0f5 Merge "Use the right layout for inflating Action Bar." into lmp-dev 2014-11-03 23:13:15 +00:00
Alex Klyubin
8e93f0c3bc Mention ECDHE_PSK bug in Javadoc of PskKeyManager.
Bug: 18144779
Change-Id: I50e1bb18456295170ef288ad089a0edad7f00ecf
2014-10-30 21:39:03 +00:00
Deepanshu Gupta
0bffc736e1 Use the right layout for inflating Action Bar.
The choice of Action Bar layout depends on the theme. This also affects
the widget used to render the Action Bar.

Bug: http://b.android.com/77853
Change-Id: I6219a02853b4cd207a6125a5ed96fa5d16699460
2014-10-30 11:58:37 -07:00
Alan Viverette
15e7b2ac60 Merge "Translate compound button drawable by scroll position" into lmp-dev 2014-10-18 00:20:27 +00:00
Alan Viverette
b95c336d78 Translate compound button drawable by scroll position
BUG: 18028674
Change-Id: Iaba848642b87f0d134c6a6c57e5756d883e45904
2014-10-17 17:19:12 -07:00
Jim Miller
c6c843fbe8 Merge "Add utility methods to LockPatternUtils for encryption" into lmp-dev 2014-10-17 23:48:21 +00:00
Jim Miller
dd5de719c5 Add utility methods to LockPatternUtils for encryption
This enables a change in Settings that allows device
encryption to be disabled by the user.

Fixes bug 17881324

Change-Id: I34dfc586df1a598bf969dc82adf8537a2730d345
2014-10-17 16:08:21 -07:00
Svetoslav
cd2b54e6e5 Merge "Accessibility no longer overrides strong encryption." into lmp-dev 2014-10-17 22:59:22 +00:00
William Bourke
33f577cfea Modified lollipop Easter egg for TV compatibility
Bug: 17997922

Change-Id: I0e2e34245183cdd146ecca02ab09b2c4867770ec
2014-10-17 21:57:23 +00:00
Svetoslav
a6711ff6f0 Accessibility no longer overrides strong encryption.
Updating the accessibility layer behavior to reflect the new
model where accessibility no longer overrides strong encryption.
Now enabling an accessibility service lowers the encryption
level but the user can bump it up in settings if desired.

bug:17881324

Change-Id: Ic60d760c267d3f934040a42e1963b179bd8b9f5f
2014-10-17 14:33:11 -07:00
Amith Yamasani
a865bb5df8 Merge "Use the correct method to check if device is encrypted" into lmp-dev 2014-10-17 18:55:58 +00:00
Amith Yamasani
cd410ba4e8 Use the correct method to check if device is encrypted
DPM's method will return false if encrypted by default password,
preventing the changing of encryption password to lockscreen password.

Check if the device is encrypted by some means, instead.

Also fix a SecurityException when Device Admin queries encryption state
(recent regression)

Bug: 17881324
Change-Id: Id897e61c5e254ab3f8dc569285428a73005303ea
2014-10-17 11:43:57 -07:00
Dianne Hackborn
d3511d4be1 SDK only: hide the old L API version constant.
Also update the LOLLIPOP version constant to describe more things
that change when you target it.

Change-Id: I15e2c26a0f997ff2bfc8dd5076c827da7f42ee66
2014-10-16 17:49:45 -07:00
Prerepa Viswanadham
248edc3e96 Update javadoc comments for getBluetoothLeAdvertiser()
To clarify that BluetoothLeAdvertiser object will return null
when BT is off OR if the hw doesn't support these capabilities

bug: 18006072
Change-Id: I635d7971711a3cae7c58f7a0636faf9a03f19970
2014-10-16 16:06:44 +00:00
Brian Carlstrom
20de619d66 Merge "Set threads' contextClassLoader during LoadedApk.makeApplication." into lmp-dev 2014-10-16 01:01:26 +00:00
Jim Miller
e7c325559d Merge "Add a checkbox option to 'require password to decrypt'" into lmp-dev 2014-10-15 18:21:52 +00:00
Amith Yamasani
2c3886cb34 Merge "Fix admin policies in managed profiles" into lmp-dev 2014-10-15 17:44:24 +00:00
Amith Yamasani
242f4b1259 Fix admin policies in managed profiles
Some of the admin policies are throwing security exceptions in
a managed profile without being documented correctly and others
shouldn't be throwing security exceptions.

Changed setCameraDisabled() to not throw an exception. It now just
prevents work profile apps from using the camera.

Changed wipeData() to allow passing in ERASE_EXTERNAL_STORAGE. In
secondary users/profiles, this is just going to remove the user, so
the flag is harmless.

Updated documentation for setKeyguardDisabledFeatures() and resetPassword()
to indicate that they cannot be called in a managed profile.

Bug: 17987913
Change-Id: I8060be4c2d32bdd4edb46ce543551fabb9c8c983
2014-10-15 10:42:17 -07:00
Jeff Sharkey
97d47ed036 Reduce PackageInstaller Binder memory pressure.
When restoring hundreds of apps on low-DPI devices, we end up sending
icon Bitmaps inline in the response instead of splitting into ashmem
regions.  To avoid triggering TransactionTooLargeException, switch to
using ParceledListSlice under the hood.

Bug: 17926122
Change-Id: Ib4da6775e79d2fcb4aaea15f58ed998df203a5f9
2014-10-15 09:19:54 -07:00
Narayan Kamath
8091edbffb Set threads' contextClassLoader during LoadedApk.makeApplication.
We used to set this from LoadedApk.getClassLoader. This had
the unfortunate side effect of clobbering the threads default
classloader when Context.createPackageContext().getClassLoader()
was called. This happens, for example, to every app that uses
a updatable webview.

bug: 17986934
Change-Id: If2b5938a19f836ea5fe60c94ea53a7125c2098c0
2014-10-15 11:38:44 +01:00
Jeff Sharkey
9797880808 Start cross profile intents as caller.
The system should always be using new startActivityAsCaller() when
starting activities on behalf of someone else, to ensure that
security checks are enforced as the original caller.

Bug: 17983737
Change-Id: Ic40816a797cfdb13c0adb48b86ed4ed7d6aae8eb
2014-10-14 17:57:28 -07:00
Jim Miller
6848dc8e3b Add a checkbox option to 'require password to decrypt'
Fixes bug 17881324

Change-Id: Id94e593a172d686339c736473226fece1bb749ee
2014-10-14 16:26:11 -07:00
Jeff Hao
dbfbb17512 Backport of ordering apps for boot dexopt.
This is a squashed commit of the following changes:

1. Order apps by priority when performing boot dexopt.
   (cherry picked from commit 65cde7d42d741c7d9aa2714a397b7333f688ab55)

2. Improve priority ordering of apps when performing boot dexopt.
   Added core apps and updated system apps.
   (cherry picked from commit 272bf3a274daff62995caf05da338c1f2a73dae3)

3. Stop boot dexopt when low on memory.
   (cherry picked from commit 1d892dcb6b0ff3a50cc63e387667dc29baf1014f)

Bug: 17641843
Change-Id: Ie32f1c21047d3462aaf728f7633fecf647ba2b47
2014-10-14 15:02:37 -07:00
Amith Yamasani
15a5f82f9b Merge "Hide DISALLOW_OUTGOING_BEAM API" into lmp-dev 2014-10-14 19:51:15 +00:00
Dianne Hackborn
35de0e2872 Merge "Fix issue #10034864: Define YouTube application as the preferred..." into lmp-dev 2014-10-14 19:16:22 +00:00
Dianne Hackborn
f85e7af4d0 Fix issue #10034864: Define YouTube application as the preferred...
...handler for its Intents

Fix bug when a third party app is installed as an additional but
worse match for the intent.

Also raise up the limit for when we start printing logs about
overly large strict mode data.

And turn off the logs about services being created and destroyed,
since with the way things are using services these days these have
become way too spammy.

Change-Id: I8fe301dfd80fb4b70213cb7783b7c5426245278d
2014-10-14 10:46:52 -07:00
Amith Yamasani
6d93491f50 Hide DISALLOW_OUTGOING_BEAM API
This is not fully functional in managed profiles, so it is being removed for L.

Bug: 17973040
Change-Id: If660e5e565076cdf61649e9f5ca12877425e9df3
2014-10-14 09:31:30 -07:00
Jesse Hall
d7e559675c Surface: Leave object in unlocked state when unlockCanvasAndPost fails
If nativeUnlockCanvasAndPost() throws, Surface was maintaining a
reference to the native Surface, and assuming it was still locked.
That would cause future lockCanvas() calls to throw without even
trying to lock the native Surface, even though in some cases the
native lock was actually released before the exception was thrown.

Now Surface treats the native object as unlocked even if
nativeUnlockCanvasAndPost() throws, so it will attempt the native lock
on lockCanvas() rather than assuming it would fail.

This change also changes an IllegalStateException to
IllegalArgumentException in unlockCanvasAndPost(). That exception was
added in KitKat, and was never documented or added to the throws
declaration. This was essentially a silent public API change. Quite a
bit of code in the framework (and likely in applications) catches
IAE from this method, but didn't attempt to handle ISE. Although ISE
is more correct here, it's not worth breaking code (and it did -- in
this bug it changed a problem that should have been silently and
perfectly recovered from into a fatal exception in system_server.)

Bug: 17684556
Change-Id: Ia8d3e5d33eaa690d16c7d0f557390c7bb4e1e32e
2014-10-13 11:01:15 -07:00
Marcin Kosiba
437517573b Merge "Remove the default WebView text encoding resource entirely." into lmp-dev 2014-10-13 09:37:36 +00:00
George Mount
1a285496fb Merge "Allow using setLeft/Top/Right/Bottom to control ChangeBounds." into lmp-dev 2014-10-10 20:48:10 +00:00
George Mount
5ac9b20b41 Allow using setLeft/Top/Right/Bottom to control ChangeBounds.
Bug 17938614

Change-Id: Ia341fdd63ab57ec16a3de6349b7eb07fdc0a48ae
2014-10-10 13:22:36 -07:00
Christopher Tate
1133e29f22 Tweak wallpaper restore rejection threshold
Raise the height ratio threshold slightly in order to start accepting
restores of height=1920 images onto height=2560 devices.

Bug 17882661

Change-Id: I63b47817fdf754cda9a052bddb62aee764522c6f
2014-10-10 17:54:14 +00:00
Marcin Kosiba
fd1ac83f63 Remove the default WebView text encoding resource entirely.
Having the default text encoding in config.xml makes it seem like
it's something that could be changed, but upon further inspection
we can't see any good reason for anyone to ever want to change it
from UTF-8.

BUG: 17634120
Change-Id: I10a09ab1d65590c29efb10222abfa08ca52b5c84
2014-10-10 17:20:58 +01:00
Dianne Hackborn
7ea69880bd Merge "Improve some docs, fix some debugging." into lmp-dev 2014-10-10 01:27:13 +00:00
Dianne Hackborn
ab4a81b3c6 Improve some docs, fix some debugging.
- Add docs to Binder, Messenger, ResultReceier to explain their
  relation (or lack there-of) to process lifecycle.
- Clarify some aspects of process lifecycle for services.
- Fix help text of am command.
- Fix per-package dumping of battery stats to not include history.
- Fix per-package dumping of proc stats to only include aggregated
  and current stats and fix some formatting.
- Fix per-process dumping of meminfo to have an option to interpret
  the input as a package, so including all processes that are
  running code of that package.
- Fix top-level per-package debug output to correctly include all
  of these improvements and give them a little more time (10s) to
  complete for timing out.

Change-Id: I2a04c0f862bd47b08329443d722345a13ad9b6e2
2014-10-09 18:21:59 -07:00
Svetoslav
c43caf52a6 Merge "Fix child view ordering for accessibility." into lmp-dev 2014-10-10 00:03:54 +00:00
Svetoslav
88e447b576 Fix child view ordering for accessibility.
When reporting views to accessibility services we are ordering the
children in a parent based on their location on the screen. The
initial implementation worked pretty well in practive but violated
the transitivity property leading to rare crashes in apps. The current
implementation does not violate transitivity but does not produce
good ordering.

Given the lack of time and to minumize risk this change uses the
old strategy which works most of the time and if that fails we
fall back to the current strategy. Coming up with a correct strategy
that produces good results requires more time.

bug:17887986

Change-Id: I1c233ecdf318befc315e793696ac48bd6c652ab6
2014-10-09 16:40:47 -07:00