* changes:
open("/dev/rtc0") failure in AlarmManagerService.setTime() should be non-fatal
Move time setting code from SystemClock to AlarmManagerService
Setting the time-of-day clock is still useful on systems where the RTC
device is not yet brought up or otherwise unavailable. This matches the
in-kernel behavior of the Android alarm driver.
Change-Id: I6d4fdadab12e241ada7419425efd55bd13873c55
Signed-off-by: Greg Hackmann <ghackmann@google.com>
On devices using /dev/rtc instead of /dev/alarm, updating the
time-of-day clock and RTC are separate syscalls. Hence the clock and
RTC could be left in inconsistent states if two threads called
SystemClock.setCurrentTimeMillis() simultaneously.
By moving this code into AlarmManagerService, we can put a global lock
around AlarmManagerService.setTime() and prevent the race condition.
Note that access to SystemClock.setCurrentTimeMillis() is now gated by
android.permission.SET_TIME, where before it was gated by filesystem
permissions (i.e., could the process write to /dev/alarm or /dev/rtc).
Change-Id: Ia34899a4cde983656305fd2ef466dfe908ed23c8
Signed-off-by: Greg Hackmann <ghackmann@google.com>
JNITest class is no longer actively used. This patch
removes the class (java and jni) files.
JNI interfaces and calls are extensively tested in
the art unit tests (art/tests) and in cts (see
CtsJniTestCases).
Change-Id: I62f7c72deb5d206fa3f545ae39a9cb9011110d0a
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Using reinterpret_cast allows conversions between pointer types
and integers which don't have the same size. The corresponding
flags is -Wint-to-pointer-cast.
Change-Id: I8ff0c79d235fa6d07b8d9305edc185d946d5133d
Signed-off-by: Kévin PETIT <kevin.petit@arm.com>
We claim these functions want jlong as input (8 bytes wide)
but the definitions use pointer types or jints
(4 bytes wide for 32 bit).
bug: 12890271
(cherry picked from 017546e65280a3389b6167f5fc3b5d1c3001154a)
Change-Id: Iede02be90e6a3c9a2db1fe04dcd0db99abe37097
Changes in this patch include
[x] Long(64-bit) is used to store native pointers in
AssetAtlasService and related classes as they can be 64-bit.
[x] Some minor changes have been done to conform with
standard JNI practice (e.g. use of jint instead of int
in JNI function prototypes)
Change-Id: Ib4c77c134e3ad5b21732e20cde9a54a0b16bdab1
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Fixed casting int to pointer in logging code.
Previously ints where printed as pointers and
the %p format specifier was used for convenience
to get hex output. This change uses %x and also
gets rid of the casts.
Change-Id: Ia2539769d245f50c0f3884119f80682defe69d61
These tests aren't really run automatically (or perhaps
even manually) in their present location, and increasing
CTS coverage is never a bad thing.
Change-Id: I81cce1211021011dca551fde62e725e177ca4df0
This value is overridden by the framework anyway
(see ActivityThread.handleBindApplication). Besides,
it doesn't seem like a great idea to let tools clutter
/sdcard/ with temp files.
Change-Id: I26c710cbea7397f89e6103e54a73044a87da95b1
Support 3 letter language codes, script codes &
variants. The bulk of the changes are related to
the implementation of command line filtering of
locales etc. The previous code assumed that the
value of each "axis" (locale, density, size etc.)
could be represented by a 4 byte type. This is
no longer the case.
This change introduces a new class, AaptLocaleValue
which holds a (normalized) locale parsed from a
directory name or a filter string. This class takes
responsibility for parsing locales as well as
writing them to ResTable_config structures, which is
their representation in the resource table.
This includes minor changes at the java / JNI level
for AssetManager. We now call locale.toLanguageTag()
to give the native layer a well formed BCP-47 tag.
I've removed some duplicated parsing code in
AssetManager.cpp and replaced them with functions on
ResTable_config. The native getLocales function has
been changed to return well formed BCP-47 locales as
well, so that the corresponding java function can use
Locale.forLanguageTag to construct a Locale object
out of it.
Finally, this change introduces default and copy
constructors for ResTable_config to prevent having
to memset() the associated memory to 0 on every
stack allocation.
(cherry-picked from commit 91447d88f2bdf9c2bf8d1a53570efef6172fba74)
Change-Id: I1b43086860661012f949fb8e5deb7df44519b854
- 3 letter codes are packed into the existing 32 bit locale
field in ResTable_config
- We introduce new fields for script / variant information.
Note that we define a "match" between two ResTable_config
structures to be purely on the basis of their language &
country (disregarding the script and the variant). However,
configs with scripts and variants are considered to be more
specific than those without.
(cherry picked from commit 378c6775a62d9c461cde51f06c1b14bb014c78fd)
Change-Id: I7dce82a3fe2412834252723f458826ae41535a78
At least part of what is broken. Other stuff still seems to be.
(cherry picked from 32bb5fae353b5bb6275e75952e89c514c7369cee)
Change-Id: I280376645166fe772ff7a31ff2e8494dce2adbf8
ResTable::createIdmap takes a size_t*, and the idmap command is
passing in a size_t*, make AssetManager::createIdmap take a
size_t*. Should fix the mac build.
Change-Id: Idc16dedfe2aa7367c75f89a937a8242d494e8f8e