3795 Commits

Author SHA1 Message Date
Jim Miller
527664c88c am c6c843fb: Merge "Add utility methods to LockPatternUtils for encryption" into lmp-dev
* commit 'c6c843fbe8fb8d9bdd012a472e22970ee89b9d24':
  Add utility methods to LockPatternUtils for encryption
2014-10-17 23:52:44 +00: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
William Bourke
e4444d0fd6 am 84b4791a: Merge "Modified lollipop Easter egg for TV compatibility" into lmp-dev
* commit '84b4791aaf0384a334068a97c70fcda162cfadab':
  Modified lollipop Easter egg for TV compatibility
2014-10-17 22:04:44 +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
Amith Yamasani
3de84d0de6 am a865bb5d: Merge "Use the correct method to check if device is encrypted" into lmp-dev
* commit 'a865bb5df834194dee339db615c17d7c7b63aaa3':
  Use the correct method to check if device is encrypted
2014-10-17 18:58: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
Jim Miller
839685bc57 am e7c32555: Merge "Add a checkbox option to \'require password to decrypt\'" into lmp-dev
* commit 'e7c325559d961f13c6df96803bca4747f41b27a4':
  Add a checkbox option to 'require password to decrypt'
2014-10-15 18:26:02 +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
Jeff Sharkey
40a13df16f am 97978808: Start cross profile intents as caller.
* commit '9797880808320e3a7bae1f59bc7e0c5a13189e5f':
  Start cross profile intents as caller.
2014-10-15 01:59:18 +00: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
Dianne Hackborn
4ee6658e19 am 7ea69880: Merge "Improve some docs, fix some debugging." into lmp-dev
* commit '7ea69880bdbf2c51140460dcfd063dc015c3ce26':
  Improve some docs, fix some debugging.
2014-10-10 14:34:41 +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
Dianne Hackborn
529b78941c am 89b19695: Merge "Put in real "code" (aka marketing) name." into lmp-dev
* commit '89b196958fee07475765bd3c458098464ba16f2e':
  Put in real "code" (aka marketing) name.
2014-10-08 22:48:44 +00:00
Dianne Hackborn
89b196958f Merge "Put in real "code" (aka marketing) name." into lmp-dev 2014-10-08 17:59:19 +00:00
Dan Sandler
324cab8378 am 2200f86f: All (er, L) is finally revealed.
* commit '2200f86f800876d005f911e6864708fa9772d03a':
  All (er, L) is finally revealed.
2014-10-08 04:07:16 +00:00
Dan Sandler
2200f86f80 All (er, L) is finally revealed.
If you exceed 20000 points, please send in a screenshot.

Bug: 15984887
Change-Id: I1164160bfa8e7dca3b9e7d7ca5d50ef9abd38b61
2014-10-08 04:01:01 +00:00
Dianne Hackborn
955d8d69ea Put in real "code" (aka marketing) name.
Change-Id: Idb3976edfae37293ed75cb5b869b4b42d8042bbe
2014-10-07 20:17:19 -07:00
Jeff Sharkey
5ca7ef1d8e am 99586dc0: Merge "Reduce PackageInstaller I/O pressure." into lmp-dev
* commit '99586dc0108d0f4311c8af4d06ed113bbf40a6ee':
  Reduce PackageInstaller I/O pressure.
2014-10-06 23:56:41 +00:00
Jeff Sharkey
02bd78490d Reduce PackageInstaller I/O pressure.
When performing a restore during initial device setup, we could be
installing hundreds of packages.  Currently, we're writing all
metadata (including heavy icons) for every session mutation!  Because
we're holding the mSessions lock while writing all this heavy data,
we end up causing ANRs when apps call other PackageInstaller APIs.

This patch mitigates by moving the heavy icon data into separate
per-session PNG files, which we only persist when changed.

Bug: 17881962, 17567794
Change-Id: I4dee15d4a65a8eb65c381e6bb7477728b6cc30d2
2014-10-06 16:38:15 -07:00
Neil Fuller
f7cf5d43aa resolved conflicts for merge of ee665151 to lmp-dev-plus-aosp
Change-Id: I97671e62de26919e391dbb2686511584c59ab990
2014-10-02 11:48:08 +01:00
Patrick Tjin
df670e7347 am dea847c2: Skip over directories when iterating tombstones
* commit 'dea847c2ace8894a595cf9bd87764ce2ca9698ab':
  Skip over directories when iterating tombstones
2014-10-01 22:38:31 +00:00
Patrick Tjin
dea847c2ac Skip over directories when iterating tombstones
Bug: 17380601
Change-Id: Idb6e559a89c7438751bd7a52375b9789454e0334
2014-10-01 21:17:52 +00:00
Neil Fuller
33253a4baa Switch from FloatMath -> Math and Math.hypot where possible
The motivation is an API change: FloatMath is going to be
deprecated and/or removed. Performance is not the goal of
this change.

That said...

Math is faster than FloatMath with AOT compilation.

While making the change, occurances of:

{Float}Math.sqrt(x * x + y * y) and
{Float}Math.sqrt({Float}Math.pow(x, 2) + {Float}Math.pow(y, 2))

have been replaced with:

{(float)} Math.hypot(x, y)

Right now there is no runtime intrinsic for hypot so is not faster
in all cases for AOT compilation:

Math.sqrt(x * x + y * y) is faster than Math.hypot(x, y) with
AOT, but all other combinations of FloatMath, use of pow() etc.
are slower than hypot().

hypot() has the advantage of being self documenting and
could be optimized in future. None of the behavior differences
around NaN and rounding appear to be important for the cases
looked at: they all assume results and arguments are in range
and usually the results are cast to float.

Different implementations measured on hammerhead / L:

AOT compiled:

[FloatMath.hypot(x, y)]
benchmark=Hypot_FloatMathHypot} 633.85 ns; σ=0.32 ns @ 3 trials

[FloatMath.sqrt(x*x + y*y)]
benchmark=Hypot_FloatMathSqrtMult} 684.17 ns; σ=4.83 ns @ 3 trials

[FloatMath.sqrt(FloatMath.pow(x, 2) + FloatMath.pow(y, 2))]
benchmark=Hypot_FloatMathSqrtPow} 1270.65 ns; σ=12.20 ns @ 6 trials

[(float) Math.hypot(x, y)]
benchmark=Hypot_MathHypot} 96.80 ns; σ=0.05 ns @ 3 trials

[(float) Math.sqrt(x*x + y*y)]
benchmark=Hypot_MathSqrtMult} 23.97 ns; σ=0.01 ns @ 3 trials

[(float) Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2))]
benchmark=Hypot_MathSqrtPow} 156.19 ns; σ=0.12 ns @ 3 trials

Interpreter:

benchmark=Hypot_FloatMathHypot} 1180.54 ns; σ=5.13 ns @ 3 trials
benchmark=Hypot_FloatMathSqrtMult} 1121.05 ns; σ=3.80 ns @ 3 trials
benchmark=Hypot_FloatMathSqrtPow} 3327.14 ns; σ=7.33 ns @ 3 trials
benchmark=Hypot_MathHypot} 856.57 ns; σ=1.41 ns @ 3 trials
benchmark=Hypot_MathSqrtMult} 1028.92 ns; σ=9.11 ns @ 3 trials
benchmark=Hypot_MathSqrtPow} 2539.47 ns; σ=24.44 ns @ 3 trials

Bug: https://code.google.com/p/android/issues/detail?id=36199
Change-Id: I06c91f682095e627cb547d60d936ef87941be692
2014-10-01 14:04:15 +01:00
Svetoslav
a05e22ab3a am 44d4eeaa: Merge "Use default encryption password if an accessibility service is enabled." into lmp-dev
* commit '44d4eeaa48721296663a05d01071f196a509dc34':
  Use default encryption password if an accessibility service is enabled.
2014-09-30 20:07:46 +00:00
Svetoslav
44d4eeaa48 Merge "Use default encryption password if an accessibility service is enabled." into lmp-dev 2014-09-30 20:01:04 +00:00
Svetoslav
16e4a1aade Use default encryption password if an accessibility service is enabled.
When device is encrypted the user has to authenticate in order to decrypt
the data partition which is required for running accessibility services
and Text-To-Speech. In order to address this issue we are falling back
to use the default password if there is an enabled accessibility service
and the user has secure lock. This will enable the user to authenticate
when accessibility layer is completely functional.

bug:17671790

Change-Id: Iafffe7bcd234008cf91ffb5011b21b803dca227a
2014-09-30 13:00:11 -07:00
Dianne Hackborn
cc275c58b0 am c3014c8c: Merge "Fix issue #17705755: Battery stats resets at incorrect times" into lmp-dev
* commit 'c3014c8cf8932cb6a482e985edc7def97c50eede':
  Fix issue #17705755: Battery stats resets at incorrect times
2014-09-30 16:50:09 +00:00
Dianne Hackborn
ccd08f23b0 am 38646c19: Merge "Work on issue #17656716: Unhandled exception in Window Manager" into lmp-dev
* commit '38646c19d8badea143113c0dc48ccdacb18badc4':
  Work on issue #17656716: Unhandled exception in Window Manager
2014-09-30 14:55:26 +00:00
Dianne Hackborn
fb3809ca63 Fix issue #17705755: Battery stats resets at incorrect times
Revert back to (mostly) KK behavior, fix a problem where we were
collecting some data in an inconsistent state.

Change-Id: Ida3ca3fb734a9d7d61a90fd5044152e927c59e02
2014-09-29 18:31:22 -07:00
Dianne Hackborn
73d6a821ae Work on issue #17656716: Unhandled exception in Window Manager
Remove the checks for large parcel sizes.  Those were triggering,
and identifyng the area of the problem, but also cause a lot of
trouble by making the unsafe deadlocky code there much more likely
to deadlock.

Add logging for strict mode IPCs, since those seem to be the
problem.  Only log when things look bad.

Also add a log when battery stats are reset, to diagnose why they
are getting reset when they shouldn't be.

Change-Id: I588c858fb8d8c45f3c9c164ae2de9ae01547b304
2014-09-29 16:04:02 -07:00
jgu21
208678718f Frameworks/base: Early init native bridge
Add the app directory to the arguments for starting a process.
Add a check for NeedsNativeBridge and a call to PreInitializeBridge
in the native fork code.

(cherry picked from commit 2eacd06bfb82b33dfcbccafbcfc0bf1218484bb5)

Bug: 17671501
Change-Id: I970db5b284b0c12e2d8a45df3950c1fff2927a4e
2014-09-28 15:35:59 -07:00
Elliott Hughes
0844233e99 am 70c1f083: Merge "Set the system locale correctly even on an encrypted device." into lmp-dev
* commit '70c1f083332729a586d670af7565732a2eb06ab4':
  Set the system locale correctly even on an encrypted device.
2014-09-26 22:58:51 +00:00
Elliott Hughes
f839b4fcb6 Set the system locale correctly even on an encrypted device.
Bug: 17659622
Change-Id: Ibbbd5b959bfab5345f20b556c4720d0910b50084
2014-09-26 15:18:20 -07:00
Dianne Hackborn
c29de2ffb2 am 45245d61: Merge "Fix issue #17671802: "content" command always prints..." into lmp-dev
* commit '45245d6117ae484bb84d9afa3fbda36d59886059':
  Fix issue #17671802: "content" command always prints...
2014-09-26 21:57:49 +00:00
Dianne Hackborn
2f1993ec46 Fix issue #17671802: "content" command always prints...
..."uid 2000 does not have android.permission.UPDATE_DEVICE_STATS"

Make sure to clear calling identity before getting into the guts
of the activity manager.  Also fix the places the activity manager
calls in to battery stats to not require a permission check, anyway.

Change-Id: Ifd90937875b9fe0c36aa3f5cf1ec173746914e6b
2014-09-26 11:28:01 -07:00
Adam Powell
9cd82d061a am da7f9bab: Merge "Always show the name of the last used Home app in ResolverActivity" into lmp-dev
* commit 'da7f9bab0206c237f3d70b3b23eeaab41f478eb1':
  Always show the name of the last used Home app in ResolverActivity
2014-09-26 00:16:41 +00:00
Adam Powell
a35c77aea6 Always show the name of the last used Home app in ResolverActivity
Bug 17629220

Change-Id: Ia1d0a188f8c0911e5b74b18ba44508a6e2139d0c
2014-09-25 16:54:41 -07:00
Adrian Roos
40c632b931 am 05ade73e: Merge "Ensure that setting an empty password clears it" into lmp-dev
* commit '05ade73e580b826ead839d3c5db508a8ea25ad93':
  Ensure that setting an empty password clears it
2014-09-25 23:44:18 +00:00
Adrian Roos
625e8f5959 Merge "Ensure that setting an empty password clears it" into lmp-dev 2014-09-25 22:42:43 +00:00
Paul Lawrence
f0eed92b04 am 56a38862: Merge "Fix pause when setting pin/pattern/password" into lmp-dev
* commit '56a38862d68c3160ae9b049ca89422cc5834e8e3':
  Fix pause when setting pin/pattern/password
2014-09-25 18:46:17 +00:00
Paul Lawrence
3a5a0be61e Fix pause when setting pin/pattern/password
Move setting encryption pin/pattern/password into a separate thread

Bug: 17554587
Change-Id: Ifdf2ed5aa9ca08d68bb2ed08c8985203c24dcb9f
2014-09-25 17:32:19 +00:00
Adrian Roos
ab7dae58cc Ensure that setting an empty password clears it
Bug: 17496766
Change-Id: I7c29b632519247bc5675a05ef6cc90902fec8527
2014-09-25 18:25:21 +02:00
Jeff Sharkey
c4997a1d9c am 45ef18b6: Merge "Include reason when wiping data." into lmp-dev
* commit '45ef18b63e78fd853865f42d9369a5c9b4dd4ba0':
  Include reason when wiping data.
2014-09-24 23:35:37 +00:00
Andreas Gampe
a103ebed6e resolved conflicts for merge of dfdabe37 to lmp-dev-plus-aosp
Change-Id: Ia9c350dcfb41f9d04400a86bd7e5f2cf2af656f1
2014-09-24 15:38:02 -07:00
Jeff Sharkey
004a4b20f8 Include reason when wiping data.
This will help us track down who requested a data wipe.

Bug: 17412160
Change-Id: If8413e5d6377773f37e8b34ae3d26347226a027c
2014-09-24 13:58:09 -07:00
Dianne Hackborn
c21c6ab3a7 am 076741d5: am 5a9cfe3e: Merge "Maybe fix issue #17614177 APR: system process restarting due to infinite loop" into lmp-dev
* commit '076741d5776be95a19259827d1e1b2b196eb4ba3':
  Maybe fix issue #17614177 APR: system process restarting due to infinite loop
2014-09-23 21:14:20 +00:00
Dianne Hackborn
d0e0154c1f Merge "Maybe fix issue #17614177 APR: system process restarting due to infinite loop" into lmp-dev 2014-09-23 20:55:05 +00:00
Dianne Hackborn
25e1ecaabb Maybe fix issue #17614177 APR: system process restarting due to infinite loop
Also try to get rid of a huge wtf we are seeing across a lot of devices
where we incorrectly change real states on a service that is restarting,
and get rid of one of the noisier boot logs in the package manager.

Change-Id: I2510b6fb082eac3f6168cbd57bc3b70ad006114d
2014-09-23 10:33:30 -07:00