Before mounting the requested storage into place, fully unmount all
existing mounts inherited from the root namespace.
Bug: 22192518
Change-Id: I6f7f12c1219d25ee487a031d37c60fb4051d24ad
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
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
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
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
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
This moves ActivityManager from using fg/bg cgroups to fg/bg cpusets,
which improves load balancing on appropriate devices.
bug 21782794
Change-Id: Ife149ea551b8b3611a826566b8c8fc8573fdf654
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
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
This follows a change in dex2oat.
(cherry picked from commit f39477b592e6e17fe41ace2e18602a69b2dd1619)
Bug: 21924613
Change-Id: I46b61298ca00bee2e83080456b180d63efd95b8f
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
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
- Prior to this, the lens distortion correction was applying
resampling to the bayer mosaic, resulting in magenta
output images (oops).
Bug: 20491394
Change-Id: Ia244364954062d1c38ef3ec3b7a1d087904112f9