159157 Commits

Author SHA1 Message Date
Andreas Gampe
e042791e75 Merge "Frameworks/base: Remove unused header" 2014-11-21 17:38:07 +00:00
Andreas Gampe
c1b5483a60 Frameworks/base: Remove unused header
android_nfc.h is used nowhere.

Change-Id: I3009b3eb122674d3fe7ddb201bac18368b78bc02
2014-11-20 16:11:57 -08:00
Chih-hung Hsieh
f926d71b8e Merge "Fix format strings mismatching the parameters passed to them" 2014-11-20 23:50:04 +00:00
Bernhard Rosenkränzer
09993f768b Fix format strings mismatching the parameters passed to them
Change-Id: Ia0d33aec9edadac60508fb422e0821e6d8f28afa
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
2014-11-20 15:24:46 -08:00
Dan Albert
8e357bf541 Merge "Fix clang warnings in core/jni." 2014-11-20 22:58:47 +00:00
Dan Albert
0c437fd3a7 Merge "Add appropriate casts for char16_t." 2014-11-20 22:19:38 +00:00
Dan Albert
6698749dd4 Add appropriate casts for char16_t.
C++11 defines a real char16_t, which is not implicitly convertible to
uint16_t (and by extension jchar). Add casts as needed.

Bug: 18300613
Change-Id: I00752002ef2e938bdb57f70947e8fd53ec103293
2014-11-20 11:47:40 -08:00
Dan Albert
46d8444631 Fix clang warnings in core/jni.
There are a few bugs in here too (mostly people expecting + to
concatenate C strings) :(

Change-Id: I0a243c05c4ea8b56e84896f37814d0fbea4c39d5
2014-11-20 11:47:00 -08:00
Yohann Roussel
79b4ee8e97 Add tests about annotations and enum.
For reproduction of https://code.google.com/p/android/issues/detail?id=78144

Bug: 18385117

Change-Id: I23be53a0ae481a501d13adc8abf518ac664a772f
2014-11-20 15:17:43 +01:00
Narayan Kamath
9f285bd60b Merge "Tell installd when boot completes." 2014-11-20 10:47:17 +00:00
tiger_huang
e2a98a7492 Add window to child window list with correct order
The original logic of comparing with mBaseLayer of two child windows
of the same parent was wrong, because the mBaseLayer is always the
same.

After adding two child windows with the same positive sublayer, the
one added later should have greater z-order. The order should be
consistent with WindowManagerService.addAttachedWindowToListLocked()

Change-Id: I789179aee61d141fad86bd24262fabfb1e517e66
2014-11-20 12:00:41 +08:00
Elliott Hughes
ea8ff82212 Merge "Fix and be more explicit about plurals best practices." 2014-11-20 00:19:45 +00:00
Elliott Hughes
1fe7d496db Fix and be more explicit about plurals best practices.
The "one" case should always include %d. Say so, and fix our examples.
Also make it clear that developers should always provide exactly "one"
and "other".

Bug: 18429565
Change-Id: I09eb39ea6986850c3af28cca3052d319e3c97705
2014-11-19 16:18:45 -08:00
Mathieu Chartier
36c7f4b673 Merge "Add zygote space to Dalvik Heap" 2014-11-19 21:58:17 +00:00
Mathieu Chartier
99f628286f Add zygote space to Dalvik Heap
Broken by
https://android-review.googlesource.com/#/c/115446/

This change fixes it by correctly putting the zygote in Dalvik Heap
instead of Dalvik Other.

Bug: 18447855

(cherry picked from commit 7fc9176c8a2102fb5be3668404bd15feb6878c89)

Change-Id: I9293e5d3f55ccfb2c93c6aacbf6abc164eacb10b
2014-11-19 13:54:00 -08:00
Ignacio Solla
1228e58e88 Merge "[WebView] Interface to access hidden APIs. (DO NOT MERGE)" 2014-11-19 21:53:43 +00:00
Ignacio Solla
e7cf27b664 [WebView] Interface to access hidden APIs. (DO NOT MERGE)
The WeView provider implementation needs access to
these APIs to implement the WebView functionality.

BUG:18152150

Change-Id: I6b41c623b1e8a776dcee8977d0d17259cb4b34f1
(cherry picked from commits 94ef789f0cf0387df20c2c602857ada1e5abfdd6
 and 53f256948724b8d4009d8a8a47da96a06402f9a2)
2014-11-19 21:47:13 +00:00
Andreas Gampe
c3507d1098 Merge "Frameworks/base: Replace LOG_FATAL_IF in core/jni" 2014-11-19 18:16:19 +00:00
Chih-hung Hsieh
b1e4e89b86 Merge "Fix incorrect usage of bool" 2014-11-19 18:01:20 +00:00
Jeff Sharkey
4060217905 Merge "Default icon is shown after uninstalling updated priv-app" 2014-11-19 17:40:02 +00:00
Andreas Gampe
987f79f60b Frameworks/base: Replace LOG_FATAL_IF in core/jni
Do not use LOG_FATAL_IF in JNI setup. This is one-time on startup
and important enough to always check.

Add a header with common helper definitions. Move to inlined functions
instead of macros to clean up the code.

Change-Id: Ib12d0eed61b110c45d748e80ec36c563e9dec7e5
2014-11-19 09:21:12 -08:00
Narayan Kamath
343f478241 Tell installd when boot completes.
installd can then clear the ".booting" marker from the dalvik-cache
(owned by root). This marker is used to detect boot loops.

bug: 18280671

(cherry picked from commit 76a748e62f354c799342044f724e1f4b80121837)

Change-Id: I2364c05837ac04d428b5a34ab1802964a11d2df4
2014-11-19 14:41:08 +00:00
tiger_huang
c58d756f87 Prevent wrong system ui visibility callback after the user swipe
If we return vis without clearing clearable flags, it will be set to
IStatusBarService in updateSystemUiVisibilityLw(), and then be
callbacked to WMS via statusBarVisibilityChanged(), and then be
dispatched to the client; which is wrong because WMS should dispatch
the new value to the client, not the old one.

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

Change-Id: I2a06d1fbe66e854e639d86a39784f8c6a3303674
2014-11-19 11:53:39 +00:00
Akira Numata
e50bc6fd29 Default icon is shown after uninstalling updated priv-app
If updated pre-installed app is moved from "/system/app" to
"/system/priv-app" at FOTA, PackageManager does not update its
resource path correctly. This patch fixes it.

Change-Id: Iac793bcb8fd7c5bfbafd1876640b534c6da5dddf
2014-11-19 09:57:19 +09:00
Adam Powell
d843564331 Merge "PopupWindow: fix typo in doc comment" 2014-11-18 23:32:57 +00:00
Andreas Gampe
12c172a801 Merge "Frameworks/base: Compiled-classes support" 2014-11-18 22:49:13 +00:00
Andreas Gampe
f59fb28cb8 Frameworks/base: Compiled-classes support
Let AndroidRuntime check for /system/etc/compiled-classes and push
it to the runtime for boot image creation.

Bug: 18410571

(cherry picked from commit ca775941f3b7981aabf3a6a3b84d6c94f4f76aff)

Change-Id: I2510316381f2661166af24d7e14b013f4e045556
2014-11-18 14:48:31 -08:00
Andreas Gampe
8462913d0c Merge "Frameworks/base: Ignore unknown pragmas in core/jni" 2014-11-18 22:39:30 +00:00
Andreas Gampe
26109fd328 Frameworks/base: Ignore unknown pragmas in core/jni
Preparation for a switch to Clang.

Change-Id: Iabe1d79474a617bec66dd4bf58002b1a372f6d23
2014-11-18 14:38:00 -08:00
Chih-hung Hsieh
5609047223 Merge "Use standard initializers" 2014-11-18 18:04:29 +00:00
Narayan Kamath
775eca105c Stop using DATE_FORMAT from settings.
bug: 18388178
Change-Id: I315dc463bb0569adc0b5d1c5ac5a17485f2b5adc
2014-11-18 14:54:24 +00:00
padarshr
ada454152e Start MountService before performBootDexOpt
This change is to start Mountservice before starting
performBootDexOpt, as in one case, in performBootDexOpt
when system upgrade happens, StorageManager will be started to
get the low threshold of DataDir. But, at this point, as
Mountservice is still not up, StorageManager will end up
having a null object of Mountservice.

Change-Id: I6dec474266faa5de67449c1bbe6ef30791e5ecaa
2014-11-18 10:53:18 +00:00
Bernhard Rosenkränzer
452efb218e Use standard initializers
Use standard initializers rather than GNU extension initializers to
prevent clang from spewing warnings about nonstandard code.

BUG: 18193625

Change-Id: I19bf7fe9c401534af82d5a08e68fbd486bec8351
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
2014-11-17 23:30:44 +00:00
Chih-hung Hsieh
a58336f6c8 Merge "Use fabsf() rather than abs()" 2014-11-17 22:41:11 +00:00
Chih-hung Hsieh
1615731d18 Merge "Fix check for PROC_QUOTES mode" 2014-11-17 22:38:55 +00:00
Bernhard Rosenkränzer
c44958c786 Use fabsf() rather than abs()
abs() operates on integers -- to check floats accurately, fabsf
should be used.

Change-Id: I1a4e85f8f5e0d08ff38d307c5c31e2b6783ab7af
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
2014-11-17 23:12:18 +01:00
Bernhard Rosenkränzer
3b1e22e289 Fix check for PROC_QUOTES mode
Since != has priority over &, the "if ((mode&PROC_QUOTES != 0))" check
is the same as "if (mode & (PROC_QUOTES!=0))" - not what the code
intends.

Change-Id: I14840a887f26c28f2bd0aee8704c79cf353164ad
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
2014-11-17 22:30:56 +01:00
Bernhard Rosenkränzer
92ddfcfff5 Fix incorrect usage of bool
A bool can't be < 0

Change-Id: Ie94ffadcb38c95214d1105c02610e59b4b2872b2
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
2014-11-17 22:01:27 +01:00
Ying Wang
753eda5b39 Merge "Frameworks/base: AndroidRuntime standalone preloaded-classes" 2014-11-17 19:35:40 +00:00
Ying Wang
d141a9033b Merge "Move preloaded-classes out of framework.jar." 2014-11-17 19:34:47 +00:00
Ying Wang
d0c45355b9 Move preloaded-classes out of framework.jar.
Instead we install preloaded-classes as a standalone configuration file
/system/etc/preloaded-classes, so we can configure different file per product.

Bug: 18305157
Change-Id: I22f1a1dd44f90268d02532bf18405768523c0b1b
2014-11-17 11:31:08 -08:00
Andreas Gampe
65ff8ee134 Frameworks/base: AndroidRuntime standalone preloaded-classes
Change AndroidRuntime::startVM to give the new standalone
preloaded-classes file to the runtime for compilation of images.

Bug: 18305157

(cherry picked from commit 995c62d6abd4b7080e52a60d1bffa32ae4a798a3)

Change-Id: I32a13357893222b25fbce60bf2367c23fb36ab22
2014-11-17 10:57:57 -08:00
Stuart Wells
7e1435ec3c Added Razer USA, Ltd serval
Change-Id: I76b7c36068c3d10ab4acb3123550ef115db0d3d2
2014-11-17 10:28:47 -08:00
Marco Nelissen
52e2b6f79d Merge "Update calls to IInterface::asBinder()" 2014-11-17 18:14:31 +00:00
Marco Nelissen
97069dd4fd Update calls to IInterface::asBinder()
to use the new static version.

Change-Id: Ia7b10eb38ca55b72278bfd33d3bf647f338b4e6a
2014-11-17 10:05:31 -08:00
riddle_hsu
61231a5eff Avoid deadlock between ActivityManagerService and ProcessStatsService.
Root Cause:
Case 1
getStatsOverTime(#483) // lock mWriteLock, wait AMS
async performWriteState(#269) // lock mPendingWriteLock, wait mWriteLock
writeStateLocked(#218) // lock AMS, wait mPendingWriteLock

Case 2
getStatsOverTime(#483) // lock mWriteLock, wait AMS
writeStateSyncLocked,writeStateLocked(#269) // lock AMS, wait mWriteLock

Solution:
Reduce nested lock.

Others also post the same solution:
I437a5cedceb34292a6bd1d9e7610f52b1478e424

Change-Id: Ie9395f3f6359fe59e2282674fcfec9d123e53f25
2014-11-15 18:40:08 +08:00
riddle_hsu
98f1f3400d [ActivityManager] Ensure provider external access count will be released.
Sympton: Oom-adj of provider process will be always 0.

Root Cause: Exception happend in openContentUri
may not call removeContentProviderExternalUnchecked.

Flow:
application [MediaPlayer.setDataSource(Context context, Uri uri)]
    uri is invalid, IOException will be caught and below log will appear:
    "Couldn't open file on client side, trying server side"
    Continue to call setDataSource(String path, Map<String, String> headers)
 ->mediaserver [MediaPlayerService::Client::setDataSource]
    setDataSource(httpService, url, headers) calls openContentProviderFile
 ->system_server (ActivityManagerService) [openContentUri]
    Increase externalProcessNoHandleCount for media provider.
    Call [openFile] to media provider.
 ->android.process.media [check permission for openFile]
    enforceReadPermissionInner
 ->system_server [checkComponentPermission]
    Use mediaserver's uid to check READ_EXTERNAL_STORAGE
      -> not granted due to it is pure native process, not a known package.
    Throw security exception then the flow of openContentUri is broke.
    And externalProcessNoHandleCount is unable to decrease.

Application sample code:
 String invalidId = "54321";
 Uri externalUri = MediaStore.Files.getContentUri("external");
 Uri uri = Uri.withAppendedPath(externalUri, invalidId);
 mediaPlayer.setDataSource(mContext, uri);

Solution: Move removeContentProviderExternalUnchecked to finally block.

Change-Id: I75eec1f9631e9c6bb18449946d707d51ac21e8a7
2014-11-15 18:16:49 +08:00
Miao Wang
34c495d2e9 Merge "Add Float32 suppor for IntrinsicResize. base part." 2014-11-14 18:02:13 +00:00
Andreas Gampe
5b50cd1368 Merge "Frameworks/base: Fix build" 2014-11-13 23:45:07 +00:00
Andreas Gampe
577f48c1c9 Frameworks/base: Fix build
Fix a typo.

Change-Id: Ida417c842563576b053d9f5553a2aa8d5862897c
2014-11-13 15:44:27 -08:00