4850 Commits

Author SHA1 Message Date
Ruben Brunk
7469060e78 Merge "Make vendor keys visible in Camera2 java APIs." into mnc-dev 2015-08-03 16:09:07 +00:00
Ruben Brunk
c620eb7e86 Make vendor keys visible in Camera2 java APIs.
- Add vendor keys to getKeys() calls for CameraCharacteristics,
  CaptureRequest, and CaptureResult.
- Vendors can specify whether custom keys show up by listing
  visible keys in the REQUEST_AVAILABLE_RESULT_KEYS field.
- Vendor key types are always treated as a primitive (or Rational)
  array type corresponding to one of the valid types for
  a camera metadata entry.

Bug: 22067625
Change-Id: I6e7dd3db7a8bf533c2ec15ff69ca38824134e971
2015-07-31 17:14:18 -07:00
Narayan Kamath
7157c2ca81 Merge "Revert "Call getInstanceForPackage instead of creating a new SensorManager instance."" into mnc-dev 2015-07-29 09:41:22 +00:00
Narayan Kamath
8d1e344f40 Revert "Call getInstanceForPackage instead of creating a new SensorManager instance."
This reverts commit 5967ddbf05f146bdb6744207e3daed1aa76fc637.

Change-Id: I6d58129585a30d7c2ef39c8cbe796fd696c93f56
2015-07-29 09:35:46 +00:00
Aravind Akella
15938235d2 Merge "Call getInstanceForPackage instead of creating a new SensorManager instance." into mnc-dev 2015-07-29 00:21:18 +00:00
Ruben Brunk
ee2a16b551 Merge "Update DngCreator to correctly handle array sizes." into mnc-dev 2015-07-28 00:11:36 +00:00
Ruben Brunk
2079612e58 Update DngCreator to correctly handle array sizes.
- Allow both pixelArraySize and preCorrectionArraySize
  buffer dimensions for input buffers.
- Adjust crop, active area, and dimensions used for
  opcode lists based on the input buffer size.

Bug: 22302614
Bug: 22210811
Change-Id: I16fb8921a144b0a251d555037ca45fdc12f7dd18
2015-07-27 22:48:13 +00:00
Aravind Akella
5967ddbf05 Call getInstanceForPackage instead of creating a new SensorManager instance.
Bug: 22529981
Change-Id: Id3adfbcf55d1268db1a555c72a06456a5219c086
2015-07-27 14:19:31 -07:00
Chris Craik
4604c1dc67 Merge "Fix bitmap get/set pixels for ALPHA_8" into mnc-dev 2015-07-27 17:23:52 +00:00
Chris Craik
6260b22501 Fix bitmap get/set pixels for ALPHA_8
bug:22724734

Change-Id: If8307854f6bad6fac9ee0b394bf0b044c61183e5
2015-07-24 15:27:48 -07:00
Andreas Gampe
e60825033f Frameworks/base: Hand fingerprint to ART
To allow ANR dumps to be symbolized easily, hand the build
fingerprint to the runtime.

Bug: 22693991
Change-Id: Ibd3d3b3bd65dce84acfb97a487807d6f280a9508
2015-07-24 14:19:44 -07:00
John Reck
c6024cdd35 JNI optimization tweaks to Paint high-frequency methods
Bug: 22378829

Use fast-jni for getFontMetrics, drops from 35us -> 30us
Note the "heavy" part of the method, getMetricsInternal, is
already called by other fast-jni methods.

Use critical array access for getRunAdvance_* methods. This
will avoid the copy and the access is appropriately scoped
and fast enough to not significantly block the moving GC.
Improves from 88us -> 79us on short text

Change-Id: I7c1481c23f6dba3420fbcf48220f6335cf9f6d10
2015-07-10 10:58:46 -07:00
John Reck
476f715822 Create a thread_local cache for textLocale
Bug:22378829

toLanguageTag is significantly more expensive than previously
thought (note ULOC_FULLNAME_CAPACITY is 157) and weighs
in at around 40us. Given that this is called on every Paint
and that there are typically thousands of Paint objects
created this adds up very quickly.

Given that the locale is almost always Locale.getDefault(),
a very simple thread_local cache of size 1 fixes this trivially

Change-Id: I819e60cac7a4b27e9dd5538332c22ce5bbd0851c
2015-07-10 10:08:31 -07:00
John Reck
bea77a0783 Deep-copying sucks when all you want is a borrow
Bug: 22378829

std::string only knows how to move & deep-copy, and we really
don't want either here since the Paint object for certain outlives
the stack scope so use a const reference instead.

Change-Id: I1c822c6ba9647953899cfe89dcc670d7265e3973
2015-07-09 17:47:50 -07:00
Aravind Akella
516e40ea5d Clean up get sensorList.
Change-Id: I46da79cc50b5130a3f21bd567f50b29bf22196f9
2015-07-01 16:56:25 -07:00
Aravind Akella
32207e3c66 Merge "Changes to Data Injection mode APIs" into mnc-dev 2015-07-01 17:39:57 +00:00
Jeff Sharkey
faf3f69217 Fully unmount existing storage in Zygote.
Before mounting the requested storage into place, fully unmount all
existing mounts inherited from the root namespace.

Bug: 22192518
Change-Id: I6f7f12c1219d25ee487a031d37c60fb4051d24ad
2015-06-30 15:56:33 -07:00
Aravind Akella
d123b51f8b Changes to Data Injection mode APIs
Change-Id: Id55eaf03656d2d55df7f38d4cac643d97354fe9b
2015-06-29 13:04:09 -07:00
Christopher Tate
ffd5864202 Throw DeadObjectException on failed transaction, not RuntimeException
In practice we only see failed transactions with small payloads when
the remote dies while the binder operation is in flight.  Throw the
applicable exception type rather than the generic "oops binder went
haywire" one.

Bug 22104446

Change-Id: I785c15617db7a1f4d505aa11f16e61551c8357ba
2015-06-29 11:52:23 -07:00
Jeff Sharkey
9527b223a9 Let's reinvent storage, yet again!
Now that we're treating storage as a runtime permission, we need to
grant read/write access without killing the app.  This is really
tricky, since we had been using GIDs for access control, and they're
set in stone once Zygote drops privileges.

The only thing left that can change dynamically is the filesystem
itself, so let's do that.  This means changing the FUSE daemon to
present itself as three different views:

/mnt/runtime_default/foo - view for apps with no access
/mnt/runtime_read/foo - view for apps with read access
/mnt/runtime_write/foo - view for apps with write access

There is still a single location for all the backing files, and
filesystem permissions are derived the same way for each view, but
the file modes are masked off differently for each mountpoint.

During Zygote fork, it wires up the appropriate storage access into
an isolated mount namespace based on the current app permissions.  When
the app is granted permissions dynamically at runtime, the system
asks vold to jump into the existing mount namespace and bind mount
the newly granted access model into place.

Bug: 21858077
Change-Id: I62fb25d126dd815aea699b33d580e3afb90f8fd2
2015-06-25 22:25:48 -07:00
Christopher Tate
9a60072553 Merge "Don't throw TransactionTooLargeException for small payloads" into mnc-dev 2015-06-25 22:28:18 +00:00
Christopher Tate
02ca7a7db0 Don't throw TransactionTooLargeException for small payloads
In practice, if we ever see an apparent transaction-too-large result
with a modest-sized payload, it means that the remote process died at
just the right time (with the binder transaction already in flight
so it wasn't detected as a DEAD_OBJECT up front).  Don't throw
TransactionTooLargeException in this case, because we really do need
to distinguish that from dead-remote more accurately.

In particular, certain common execution patterns on existing hardware
trigger this circumstance, and they wind up crashing the system.
This is bad, so now we avoid it unless we're pretty sure that is
really what happened.

Bug 21801759

Change-Id: Id05f1eecc0d23dc8d0505c402e2cb68396782135
2015-06-25 10:50:38 -07:00
Yusuke Sato
0f61c7dcc4 Merge "Let findSupportedAbi and hasRenderscriptBitcode scan only relevant files" into mnc-dev 2015-06-25 17:34:01 +00:00
Andreas Gampe
8f7ae66e47 Merge "Frameworks/base: Add tracing system properties" into mnc-dev 2015-06-25 01:29:38 +00:00
Tim Murray
948c6ecc5a Merge "add cpuset support" into mnc-dev 2015-06-24 22:59:53 +00:00
Raph Levien
1149cdc84b Make measureText(String, int, int) not use context
The measureText method when applied to a string should just measure
the substring, rather than treat the entire string as context. It was
less likely to cause problems than the similar issues with char
arrays, but still wrong. This patch makes the behavior consistent.

Bug: 20087437
Change-Id: I1c6e07a694b151f4fb097edae8e271805e996d06
2015-06-24 14:05:52 -07:00
Brian Carlstrom
45ab734a7a Merge "Add missing NULL check for android_os_Parcel_writeInt" into mnc-dev 2015-06-24 04:36:13 +00:00
Brian Carlstrom
849ea02682 Add missing NULL check for android_os_Parcel_writeInt
All other usages of nativePtr were already checked.

Bug: 21636519
Change-Id: Icc09ce4326e6b05c5a248cc4de84ae231d5690b1
2015-06-23 18:02:12 -07:00
Chris Craik
c686757a18 Merge "Unify clipping return value behavior - true if not empty" into mnc-dev 2015-06-24 00:12:51 +00:00
Ruben Brunk
a39fcc5875 Merge "Update DngCreator to handle pre-correction dimens." into mnc-dev 2015-06-23 23:33:22 +00:00
Ruben Brunk
b8f4c6ab1e Update DngCreator to handle pre-correction dimens.
Bug: 20491394
Change-Id: I0cdf7cec104bcb5683139c81fc52c8a0a7d2365c
2015-06-23 16:23:03 -07:00
Chris Craik
5ec6a2878b Unify clipping return value behavior - true if not empty
bug:22035484

Change-Id: I23ecca38554a60c590181290900deb0e2c48cea1
2015-06-23 15:42:43 -07:00
Aravind Akella
cfa3847254 Merge "Report accuracy for Linear acceleration and gravity sensors." into mnc-dev 2015-06-23 17:44:55 +00:00
Aravind Akella
f38226ab40 Report accuracy for Linear acceleration and gravity sensors.
Change-Id: I57cbf5212458ee6cf4a9019331004a3e0cf71a74
2015-06-23 10:32:16 -07:00
Michael Wright
805fc82ea9 Merge "Add method to set action button on MotionEvent" into mnc-dev 2015-06-23 12:48:56 +00:00
Michael Wright
121197326c Merge "Add new hid command." into mnc-dev 2015-06-23 12:45:12 +00:00
Andreas Gampe
98f406f6f3 Frameworks/base: Add tracing system properties
Add system properties to support zygote-started method tracing.
These are needed as the limit on system properties does not allow
the reuse of the runtime extra options system property.

Bug: 21760614
Change-Id: I3785cc5715acadbee81ef7b45081ed780f1351d3
2015-06-22 21:11:15 -07:00
Tim Murray
9e41c7479c add cpuset support
This moves ActivityManager from using fg/bg cgroups to fg/bg cpusets,
which improves load balancing on appropriate devices.

bug 21782794

Change-Id: Ife149ea551b8b3611a826566b8c8fc8573fdf654
2015-06-22 17:03:19 -07:00
Yusuke Sato
34fe3df851 Let findSupportedAbi and hasRenderscriptBitcode scan only relevant files
for better performance. Without the optimization, these two functions
may check more than 100k file names in the pre-installed APK files,
which can take a few seconds to finish even on a recent device.

Bug: 21957428
Change-Id: I315fd3c6d5aa1076b993752525de449a9933de12
2015-06-22 16:11:32 -07:00
Eino-Ville Talvala
e365120aae Camera2: Fix StreamConfigurationMap#isOutputSupportedFor for depth
Need to check the right configuration list if the format is a
depth format.

Also refactor code slightly to use SurfaceUtils when possible.

Bug: 21902551
Change-Id: Icca2e81d8144bede46ad9f117d5e010ed409887c
2015-06-22 14:21:22 -07:00
David Srbecky
f32f7a3ffd Merge "Replace --include-cfi with --generate-debug-info." into mnc-dev 2015-06-19 18:26:42 +00:00
David Srbecky
065075e1f9 Replace --include-cfi with --generate-debug-info.
This follows a change in dex2oat.

(cherry picked from commit f39477b592e6e17fe41ace2e18602a69b2dd1619)

Bug: 21924613
Change-Id: I46b61298ca00bee2e83080456b180d63efd95b8f
2015-06-19 02:20:06 +01:00
Paul McLean
2d5f41e4c1 Merge "Better handling of 0-length format conversions in convertAudioPortFromNative()." into mnc-dev 2015-06-18 22:00:33 +00:00
Paul McLean
2db9437274 Better handling of 0-length format conversions in convertAudioPortFromNative().
Bug: 21915588
Change-Id: I8eb3da2bfa94722a11cf47ba6fc5359d5e8e4916
2015-06-18 14:41:04 -07:00
Leon Scroggins III
8c6750ff0e Merge "Fixes for Region_writeToParcel." into mnc-dev 2015-06-18 13:03:34 +00:00
Michael Wright
6b819b4147 Add method to set action button on MotionEvent
Change-Id: Id7c547eb6d925385c7c444aa4f3cb754ddecaf6e
2015-06-17 21:06:03 +01:00
Paul McLean
d4bd4e7ffc Merge "Map >= 24bit encodings to ENCODING_PCM_FLOAT" into mnc-dev 2015-06-17 17:53:35 +00:00
Paul McLean
4e5e9e9405 Map >= 24bit encodings to ENCODING_PCM_FLOAT
Bug: 21851140
Change-Id: I8203281f5ca7d194e1bd2f417e75d3ef2fd561c7
2015-06-17 10:44:56 -07:00
Leon Scroggins III
2a6d6e5047 Fixes for Region_writeToParcel.
Check the return value of Parcel::writeInplace. If it is NULL, there
was a failure, so do not attempt to write to it. Instead, report the
error and return false.

If SkRegion::writeToMemory claims to have written a different amount of
memory than it claimed it needed, report that error as well.

Change uses of NULL in this function to nullptr.

BUG:21271229
BUG:20666821
Change-Id: Ia6160f74f30bf42f5ff97f716dadb01d1f0d6961
2015-06-17 11:56:43 -04:00
Narayan Kamath
4600dd053d ZipFileRO: Use precise widths for zip file types.
getEntryInfo crashes on 64-bit devices because "long" types
were being passed int pointers (that pointed to a stack frame)
that were reinterpret_cast'ed to long* (sigh.). To fix this issue
once and for all, use types with explicitly defined widths.

This change also removes some dead invariant checking from
Asset.cpp instead of cleaning it up.

Note that we've introduced a wart in NativeLibraryHelper, where
we need to deal with zlib's uLong type, which is "at least 32 bits
wide".

bug: 21622286

Change-Id: Iae675a9601db7aae03a8b80b40321d2cc1d97f50
2015-06-17 08:40:25 +00:00