Commit Graph

44090 Commits

Author SHA1 Message Date
Yusuke Sato
705ffd1efe Distinguish user-requested shutdown from power-related ones
With this patch, when the user requested shutdown,
PowerManagerService sets sys.powerctl is set to
"shutdown,userrequested", and init runs fsck on shutdown.

When shutdown is triggered due to a low power state etc.,
the service sets the property to "shutdown,", and init
immediately shuts down the system without running the
command.

This is a follow-up CL for http://r.android.com/158525.

Bug: 21853106
Change-Id: Iae72990130fe9aa479c802f77301438190dbbfb3
2015-07-30 23:47:13 -07:00
Neil Fuller
7ce3847d75 Merge "Migrate Resources.java to use ICU4j drectly." 2015-07-17 10:09:25 +00:00
Rayhaan Jaufeerally
b27b305768 Migrate Resources.java to use ICU4j drectly.
This change means that NativePluralRules can be removed in its entirety
because this is the only usage of that class.

Using a small benchmark from the NativePluralResources test, ICU4c code
takes 38.6 us and ICU4j code takes 49.2us to execute.

Change-Id: I5dbf643807c024a9c9c0f1292363fa8e39db965a
2015-07-15 16:12:14 +01:00
Mathieu Chartier
ebac4d1b08 Merge "Change conditionallyCheckInstanceCounts to use countInstancesOfClasses" 2015-07-13 16:41:11 +00:00
Mathieu Chartier
d288a26672 Change conditionallyCheckInstanceCounts to use countInstancesOfClasses
countInstancesOfClasses allows passing multiple classes unlike
countInstanceOfClass. This provides a speedup since we dont traverse
the heap multiple times.

Changed ActivityThread.dumpMemInfo to do a GC since countInstancesOfClass
no longer does GC before counting.

https://code.google.com/p/android/issues/detail?id=177552

Change-Id: Ia85684f40cf59a52aa71a8479c711a994651209b
2015-07-10 15:33:59 -07:00
Neil Fuller
a7f7c248c7 Switch shutdownInput / shutdownOutput to using Os.shutdown.
Bug: 3106438
Change-Id: I2c4817e435c6b253d6c507ea57bdfdfe45df8862
2015-07-10 12:30:07 +01:00
Neil Fuller
c1eaeb9337 Switch LocalSocketImpl.accept() over to using Os.accept()
Bug: 3106438
Change-Id: I3b4a07cc2283c3cfdbaf3d2460f37264f67690e3
2015-07-09 09:45:01 +00:00
Neil Fuller
4fa438ef72 Move listen() over to using android.system.Os
Bug: 3106438
Change-Id: I9b4d1d58d84a28828555ae863e86530995191f2c
2015-07-03 17:58:00 +01:00
Neil Fuller
d2df87eb44 Reimplement LocalSocket methods using android.system.Os
InputStream.available()
OutputStream.flush()

Bug: 3106438
Change-Id: I3a9425c323229e27bb72f6232dd13f7579586840
2015-07-03 15:16:37 +01:00
Neil Fuller
c80af6d84d Switch to using android.system.Os for more calls
The methods being switched here should involve no important
semantic changes. socket.getSoTimeout() is now implemented:
previously it would have returned 0 in all cases.

Some tidy up of unimplemented / commented code.

Switching other calls to use Os would carry more risk and
will be handled separately they can be switched safely.

Bug: 3106438
Change-Id: I5526249395565fee6e43f159a2b5975b0d41d058
2015-07-03 13:02:08 +01:00
Philipp Hasper
802aa0f8a2 Fixed Javadoc typos
Simple single character typos

Change-Id: I17660dbb3b7ee6597637e8d76770f434ebf202ea
2015-06-25 08:09:43 +00:00
Alan Viverette
c2a3071379 Merge "Duplicate description on AccessibilityEvent" 2015-06-24 22:47:03 +00:00
Mathieu Chartier
9a65f9ddd0 Merge "Add an AM option to start with allocation tracking" 2015-06-24 20:55:38 +00:00
Man Cao
cfa78b2080 Add an AM option to start with allocation tracking
The new option "--track-allocation" is to work with the new
allocation tracker in ART.

Bug:20037135
Change-Id: Ic5f8945ab4c1f167c27b05ad0d11d04bac680c1f
2015-06-24 13:29:29 -07:00
Hiroshi Yamauchi
169bca74e9 Clarify art.gc.gc-count-rate-histogram runtime stat.
(cherry pick commit 2d6327d0ad)

Bug: 21491908
Change-Id: I84d93aa73eebc327513c4663a6b606e2dad9a0b7
2015-06-23 13:28:25 -07:00
Minhyeok Jeong
ab1c9e0774 Fix javadoc for Adapter.getViewTypeCount()
Remove duplicate words.

Change-Id: Iaeeb8f74313d2ca88c28e4b3672316367b16ca2d
2015-06-21 04:51:22 +09:00
Narayan Kamath
3cd78b4fa3 Delete android.speech.srec.*
This code had an undeclared dependency on libsrec_jni which
we no longer build.

bug: 21855957

(cherry picked from commit b39dfe87b8)

Change-Id: I6c97f22916766714ae899cf51f1b56cde308af8e
2015-06-17 14:14:23 +01:00
Dmitriy Ivanov
88b85406d4 Add path to native libraries inside apk
If an application has native code (and primary abi)
include path to corresponding folder inside apk-file
to ldLibraryPath when constructing PathClassLoader

Bug: 21647354
Bug: 21667767
Bug: 21726698
Bug: 8076853
Change-Id: Ib0a2f01ee69019d3206a00c542bd7d0f58d0c481
(cherry picked from commit e56b3f63e8)
2015-06-11 10:48:22 -07:00
Andre Eisenbach
945c52d5d7 Bluetooth native dumpsys logging support (3/5)
Bug: 18508263
Change-Id: I88f9c90dab8b0c825010c8617709449a3dd704b2
2015-06-10 19:34:41 +00:00
Tao Bao
e215b46482 Merge "Wait for uncrypt to finish before rebooting" 2015-06-10 00:43:47 +00:00
Christopher Ferris
70e23e0d14 Change wtf errors from ASSERT to ERROR.
Calling println_native with the value of ASSERT will set the abort
message. Unfortunately, there are numerous cases where one thread aborts,
but before that thread can communicate with debuggerd, another thread
calls wtf, which overwrites the abort message from the original
failing thread.

Fix this by changing this to an error level log message.

Bug: 21490722
(cherry picked from commit 2d073ba83c)

Change-Id: Ib9daedf114a2e0ecc424641e4929cc4d15b0c776
2015-06-09 17:31:37 -07:00
Tao Bao
fa861429f7 Wait for uncrypt to finish before rebooting
/system/bin/uncrypt needs to be triggered to prepare the OTA package
before rebooting into the recovery. For larger packages, uncrypt may be
killed before it finishes the work after the timeout. Change to monitor
the uncrypt status and show the progress to user.

Needs matching changes in bootable/recovery/uncrypt, system/core and
external/sepolicy.

Also pick up the two NPE fixes in commits
9bb765448d and
da3f63ffb8.

Bug: 20012567
Bug: 20949086
(cherry picked from commit 90237f7beb)
Change-Id: Ibf2fc80032967e5f6cda3cd469005dd29665c87c
2015-06-09 14:58:13 -07:00
Neil Fuller
e761938c39 Merge "Fix javadocs based on recent case consistency change" 2015-06-01 12:01:44 +00:00
Chad Brubaker
9ce30624a4 Add optional additional entropy to finish
If provided the extra entropy will be added to the device before calling
finish. If entropy is provided and the device does not support supplying
additional entropy then finish will fail with KM_ERROR_UNIMPLEMENTED.

Change-Id: If26be118bf382604f6f8e96e833b76e6f9e94d58
2015-05-29 12:32:56 -07:00
Neil Fuller
0e1c0e11e4 Fix javadocs based on recent case consistency change
Commit a40d2447b6f516116135ee7f126579771ba98a2c made the
case consistently "as for the beginning of a sentence".
This updates the docs to reflect that. Previously the
result depended on the string returned (e.g. "Tomorrow"
was capitalized in English) and the casing varied
within and between locales.

Bug: 20247811
Change-Id: If4c6b3a13f61bd0cb64c82fc4c96d053130ae4c8
2015-05-28 18:21:29 +01:00
David Srbecky
f39477b592 Replace --include-cfi with --generate-debug-info.
This follows a change in dex2oat.

Change-Id: I46b61298ca00bee2e83080456b180d63efd95b8f
2015-05-28 17:16:09 +01:00
Wojciech Staszkiewicz
4f11754f72 Pass charset to XmlPullParser.setInput instead of null
Passing null to XmlPullParser.setInput forces it to do additional
work, which can be easily avoided if we know the charset beforehand.

bug: b/20849543

(cherry picked from commit 9e9e2e73c6)

Change-Id: Iaff97be9df2d0f99d7af8f19f65934439c9658e2
2015-05-22 10:26:31 +01:00
Fyodor Kupolov
589f2b53f2 Do not create oat directory for an app in ASEC container
Currently installation fails, if an app is located on SD card (inside ASEC).
If an app is located inside ASEC, dexopt output should go to
/data/dalvik-cache. dexopt also needs to be performed at a later stage,
because the name of the oat file contains the absolute path to the dex file.

Bug: 20452651
Bug: 21360107

(cherry picked from commit 94056d1cb8)

Change-Id: Id1ced7159e5af9c05be0b637437b3b260e859c1d
2015-05-21 19:42:34 +01:00
Fyodor Kupolov
5053258e20 Merge "Allow creating a managed profile if there is only one user." 2015-05-19 17:47:03 +00:00
Nicolas Prevot
12678a99f1 Allow creating a managed profile if there is only one user.
BUG:21119929

Change-ID: Ice1cf25f8ae8199228f828d22118c94b9e11b567
2015-05-18 10:48:16 -07:00
Chad Brubaker
d8aacca3a1 Cleanup Keystore API
Rename confusingly named methods, add userID arguments to all methods
that operate on user state and delete methods that have been replaced by
the onUser* methods.

Some of the old methods have been kept in KeyStore.java in order to ease
the transition of various system packages to the new methods.

Change-Id: Ic271689d62c36d255c5adee26c7abc2e7ed24df5
2015-05-14 13:49:25 -07:00
Chris Tate
7b566da55a Merge "AlarmClockInfo: fix redundant word in doc comment" 2015-05-14 01:20:53 +00:00
Shuhrat Dehkanov
66729ff685 AlarmClockInfo: fix redundant word in doc comment
Removed one of unintentional double "intent"s.

Change-Id: I0ce4224964afae0587ce55b6b4775370eff89d26
Signed-off-by: Shuhrat Dehkanov <k@efir.uz>
2015-05-14 10:07:25 +09:00
Chad Brubaker
31c2897105 Add keystore onUserAdded/Removed methods
Change-Id: I73fe9344ec5660e58425d5c85d14381820533d57
2015-05-12 13:24:43 -07:00
Chad Brubaker
d88fffa58d Cleanup keystore password changing and unlocking
Add KeyStore.onUserPasswordChanged for the lockscreen to call when
the user changes their password. Keystore will then handle the logic of
deleting keys. Instead of calling Keystore.password_uid for both
unlocking and password changes the behavior has been split into
Keystore.unlock and onUserPasswordChanged.

(cherry-picked from commit a91a850419)

Change-Id: I324914c00195d762cbaa8c63084e41fa796b7df8
2015-05-11 11:20:59 -07:00
Shawn Willden
adbbba9f1d Merge "Add missing error codes from keymaster_defs.h." 2015-04-29 04:30:18 +00:00
Alan Viverette
2ddfcc4ade Merge "Context leaks in EditText causes out of memory" 2015-04-29 04:19:40 +00:00
Alan Viverette
6af08c6b76 Merge "Fix for infinite loop in RemoteViewsAdapter" 2015-04-28 17:10:41 +00:00
Taiju Tsuiki
ecd2184873 Fix NPE in Bundle#hasFileDescriptor on null-valued SparseArray
Add a null check for each values of SparseArray in Bundle#hasFileDescriptor
to avoid NullPointerException.

Change-Id: I43ecc01f2759ccbe85b902fa118d55cb74ebf38b
2015-04-28 09:30:19 +01:00
Taiju Tsuiki
e58c7858a3 Fix NullPointerException in Bundle#hasFileDescriptors
Add null check for array elements in Bundle#hasFileDescriptors to avoid NPE on
null valued array.

Change-Id: Ic6ef8864ca6add023c7a69ba3c9474b0f6291723
2015-04-28 09:27:40 +01:00
Shawn Willden
5b8352bd16 Add missing error codes from keymaster_defs.h.
Bug: 20127433
Change-Id: I32eab62459003c526d3cf9ef108be7b2fd709960
2015-04-28 00:07:20 -06:00
Andreas Gampe
c29791d56a Merge "Frameworks/base: Add debug.gencfi property" 2015-04-27 15:06:48 +00:00
Narayan Kamath
4356c95354 Fix incorrect javadoc for Uri.getQueryParameter.
This first went out with Jelly Bean and not ICS.

bug: https://code.google.com/p/android/issues/detail?id=61651
Change-Id: I26f6b18593fe089bd3a52ec1d159494923bcbad1
2015-04-27 10:42:41 +00:00
Andreas Gampe
a876b35d48 Frameworks/base: Add debug.gencfi property
Add the debug.gencfi system property that forces generation of
CFI data.

Change-Id: Ida66f8c1567634d05cfdbba1a982be3684e94369
2015-04-24 16:31:41 -07:00
Wale Ogunwale
1d646128b2 Revert "[ActivityManager] Improve multi-thread access the same provider"
This reverts commit 57307b21cb.

Bug: 20091132
2015-04-24 14:45:14 -07:00
Wale Ogunwale
67fe0a450c Revert "Clean-up state if we have an exception when acquiring provider"
This reverts commit 73e239bdc9.

Bug: 20091132
2015-04-24 14:44:54 -07:00
Andreas Gampe
31fb202e6f Merge "Frameworks/base: Compile-time optimize SQLiteConnection" 2015-04-21 23:31:51 +00:00
Mathieu Chartier
ba6783b69a Merge "Update getExportedPropertyMethods to new reflection API" 2015-04-21 23:03:35 +00:00
Andreas Gampe
4f47b40e05 Frameworks/base: Compile-time optimize SQLiteConnection
Do not cache compiled regular expression and date formatter. Both
cannot be compile-time created, are expensive at preloading time,
and only used in the rare case of dumping the connection (mainly
on errors).

Bug: 19498458
Bug: 19542228
Change-Id: Ia38491a3f852ccf699b815ff05289b338e932f2a
2015-04-21 16:01:00 -07:00
Mathieu Chartier
a8a6516f62 Update getExportedPropertyMethods to new reflection API
Bug: 19264997

Change-Id: Ife79c469fdb09f30e3aefcfc3e0ce5ed32303fce
2015-04-21 11:52:10 -07:00