175296 Commits

Author SHA1 Message Date
Casey Dahlin
ec4cbf4f93 Merge "Grab macros from libbase instead of duplicating" 2015-09-11 02:30:15 +00:00
Casey Dahlin
7e8586fc1e Merge "Convert to C++ Bison output" 2015-09-11 02:30:10 +00:00
Casey Dahlin
2535cae005 Grab macros from libbase instead of duplicating
Change-Id: I1802f60a4dac45ddee8cd5715a73c77e4371d7e8
Signed-off-by: Casey Dahlin <sadmac@google.com>
2015-09-10 18:43:04 -07:00
Casey Dahlin
c71fdabdd7 Merge "First pass on reentrant C++-ish parser" 2015-09-11 01:39:07 +00:00
Casey Dahlin
96786829c2 Convert to C++ Bison output
We have to step up to a GLR parser to do this without exceptions (for no
reason other than Bison happens to use exceptions for the LALR(1) template and
not for the GLR one), but this should let us smooth out integration going
forward.

Change-Id: Iff44662914b4a65dfa5612d07c3a1ede07e6e4a9
Signed-off-by: Casey Dahlin <sadmac@google.com>
2015-09-10 18:29:09 -07:00
Casey Dahlin
9941dcc7aa First pass on reentrant C++-ish parser
We're flipping Flex/Bison in to reentrant mode, cutting down on global
variables, and exposing a more C++-like interface earlier. This is the first
phase. There's still a couple of weird hacks to deal with the previous code's
reckless disregard for scope sanity, but the outline of things to come is
starting to appear, and this CL really doesn't need to get any bigger.

Change-Id: Ife2d70db026d7ab1319bdf6c586959315666d0bb
Signed-off-by: Casey Dahlin <sadmac@google.com>
2015-09-10 16:55:18 -07:00
Alan Viverette
a5ec056b83 Merge "CalendarView: use theme attribute instead of style on MonthName TextView" 2015-09-10 12:13:28 +00:00
Young-Ho Cha
a3843cfb96 CalendarView: use theme attribute instead of style on MonthName TextView
Change-Id: I0d891ab08e61df7422fb0aea50a4c31196792189
Signed-off-by: Young-Ho Cha <ganadist@gmail.com>
2015-09-10 15:11:42 +09:00
Hans Boehm
c0ce6c422c Merge "Reduce risk of memory corruption due to finalization." 2015-09-09 22:28:42 +00:00
Hans Boehm
ffa84e008c Reduce risk of memory corruption due to finalization.
Many classes in graphics/java and elsewhere deallocate native memory
in a finalizer on the assumption that instance methods can no longer
be called once the finalizer has been called.  This is incorrect if
the object can be used, possibly indirectly, from another finalizer,
possibly one in the application.

This is the initial installment of a patch to cause such post-finalization
uses to at least see a null pointer rather than causing memory corruption
by accessing deallocated native memory. This should make it possible to
identify and fix such finalization ordering issues.

There are more graphics classes that need this treatment, and probably
many more in other subsystems.

This solution is < 100% effective if finalizers can be invoked
concurrently.  We currently promise that they aren't.

(In my opinion, the real cause here is a language spec bug.  But that ship
has sailed.)

Bug: 18178237
Change-Id: I844cf1e0fbb190407389c4f8e8f072752cca6198
2015-09-08 18:27:36 -07:00
Dan Willemsen
596fd38af2 Merge "Whitelist windows module" 2015-09-04 21:36:50 +00:00
Dan Willemsen
8d6f9bf3c8 Whitelist windows module
Bug: 23566667
Change-Id: I030733ffd2b43a0ea74b0fd5f34a0d13ef8dcf7c
2015-09-04 14:22:17 -07:00
Alan Viverette
3d6325460e Merge "Update mFillPaint color on GradientDrawable inflation" 2015-09-04 11:51:02 +00:00
Snild Dolkow
a72f59a858 Update mFillPaint color on GradientDrawable inflation
When a GradientDrawable is loaded from scratch, initializeWithState()
is called with mColors == null. This sets mFillPaint's color to
0x00000000 -- transparent. mColors is then properly set in inflate(),
but mFillPaint is not updated there. It will be updated eventually
through a mutate() or ensureValidRect() call, but that's sometimes too
late.

In our case, a wrapping StateListDrawable called getOpacity(), and
since it caches the result, it never got updated.

This doesn't cause any problems on preloaded GradientDrawables, since
the new GradientDrawable created when fetching a preload will call
initializeWithState() in its constructor, fixing the GradientState.

Change-Id: Ic8caa7c6a7c1d4dae5ff31ae943831bd2e014f79
2015-09-04 10:08:46 +02:00
Yasuhiro Matsuda
53f1a815b4 Merge "Remove unnecessary finally blocks for tracing." 2015-09-04 02:23:31 +00:00
Yasuhiro Matsuda
25878b2888 Remove unnecessary finally blocks for tracing.
BUG: 22207144
Change-Id: I2b15bb7c4055a1ad589b433d4f253868813ab311
2015-09-03 16:27:13 +09:00
Christopher Wiley
b1db04f371 Merge "aidl: Add end to end test" 2015-09-02 21:10:30 +00:00
Christopher Wiley
b14e7b8429 Merge "aidl: Remove example test" 2015-09-02 21:10:09 +00:00
Casey Dahlin
9483748aea Merge "Delete outdated options tests" 2015-09-02 21:02:02 +00:00
Casey Dahlin
02bc5488c1 Merge "Remove RPC interface Type" 2015-09-02 21:01:33 +00:00
Casey Dahlin
d6b6b80cdb Delete outdated options tests
Bug: 23718807
Test: Re-ran make. Confirmed code was not linked.
Change-Id: If065b9287ed70b9e380281cae42f89bd5f1ffb06
Signed-off-by: Casey Dahlin <sadmac@google.com>
2015-09-02 13:34:26 -07:00
Casey Dahlin
ca4543cdba Remove RPC interface Type
AIDL previously supported "rpc" and "flatten" types, which are not used
anywhere in the Android tree. This patch removes them, which significantly cuts
down code and complexity.

Bug: 23517584
Test: Rebuilt AOSP tree against new version
Change-Id: I6cf38d43c1ce109ffca987cc14520945aa22431f
Signed-off-by: Casey Dahlin <sadmac@google.com>
2015-09-02 13:34:26 -07:00
Christopher Wiley
5ed76073a4 aidl: Add end to end test
This test sets up an artificial hierarchy of .aidl files, then
checks that the generated code contains a substring that we
know to be correct.  This isn't a very good unittest, but it does
validate that the whole flow works start to finish.

Bug: 23516947
Test: compiles, unit tests pass.

Change-Id: I931b7659731b05440040623e12596669604cef3a
2015-09-02 13:00:09 -07:00
Christopher Wiley
6d57207f37 aidl: Remove example test
We have enough tests demonstrating how to write them.

Bug: 23516947
Change-Id: I966cb6bb2d754db389be8f9b90957ac33cf66639
Test: Unittests pass.
2015-09-02 12:55:07 -07:00
Christopher Wiley
f37947cb1a Merge "aidl: Don't link librt on Mac" 2015-09-02 16:23:01 +00:00
Christopher Wiley
1ab54c12e3 aidl: Don't link librt on Mac
This fixes unittest build on Mac.

Change-Id: I5180f647d1b5b41f99c4d0423aaec9d05fee6355
2015-09-02 08:59:30 -07:00
Yasuhiro Matsuda
ef57e5e03b Merge "Add trace code to system server." 2015-09-02 12:54:23 +00:00
Christopher Wiley
dd80a6cf37 Merge "aidl: Stop using Bionic's test main" 2015-09-01 19:46:21 +00:00
Christopher Wiley
1006bfe09d aidl: Stop using Bionic's test main
This allows us to build unittests on Mac, where Bionic's test main
does not build.

Change-Id: I59c805d233498bb67575f2e5f7049341f70ce55c
2015-09-01 12:40:15 -07:00
Christopher Wiley
722bf5c7de Merge "aidl: Separate aidl logic into its own static library" 2015-09-01 18:34:32 +00:00
Christopher Wiley
a25d35106e aidl: Separate aidl logic into its own static library
Compile aidl's logic into a static library that can be
linked against both the unittest binary and the executable. Validate
that this is working by writing a basic unittest against options
parsing.

Provide default values for Options struct members.  These were
previously taking on values according to the the bits in the memory
allocated to hold them for preprocessed inputs.

Bug: 23516947
Change-Id: Ib57cd7f473995f7851d788deac39f9c4d9018e8f
Test: compiles and unittests pass
2015-09-01 11:15:31 -07:00
Christopher Wiley
267cb88f4d Merge "Set up aidl for gtest" 2015-09-01 18:11:41 +00:00
Nick Kralevich
9d58692710 Merge "Automatically assign default seinfo labels using the string "default"." 2015-09-01 13:39:10 +00:00
Robert Craig
5e16bc5a14 Automatically assign default seinfo labels using the string "default".
default seinfo values are those for which policy lacks a
matching stanza in the corresponding mac_permissions.xml
file. Prior to this change the null object reference was
used to represent the non-matching state. This is in
contrast to a policy supplied default stanza which will
assign a non null seinfo value. Confused yet?

Basically, two default states were distinguished in the
code to describe the two cases where either a policy stanza
spelled out the base case seinfo label or not. Policy
writers could either supply a default stanza or rely on
the class instantiated value assigned by the ApplicationInfo
object. The hope was that the later assignment could be
used to help distinguish the cases where policy writers
intentionally white listed apps. This change will just use
the hard coded "default" string implicitly to describe all
cases and removes the idea of a policy supplied default stanza.

Change-Id: Ib7b01ee004775f24db9a69340a31784b967ce030
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
2015-09-01 05:51:04 -04:00
Christopher Wiley
4d6cb77ad9 Merge "Tighten up compiler flags for aidl" 2015-08-31 20:59:23 +00:00
Christopher Wiley
5b88363ed3 Tighten up compiler flags for aidl
Turn all warnings to errors, with special cases for places where
yacc forces us to be lenient.  Remove one variable with 0 references
elsewhere in the code.

These flags are confined to be clang only because the Windows SDK build
is using an older compiler that does not understand these flags.

Change-Id: I6407bd331c25b8845bde46e9a917bce1d6857bd8
2015-08-31 13:55:46 -07:00
Dan Willemsen
60dd5d5966 Merge "Remove USE_MINGW, whitelist windows modules" 2015-08-31 19:30:57 +00:00
Christopher Wiley
a73e004516 Merge "Revert "Tighten up compiler flags for aidl"" 2015-08-31 19:13:04 +00:00
Christopher Wiley
ecaf21c377 Revert "Tighten up compiler flags for aidl"
This reverts commit eea2353a3427f7d157c46e24ab6aba1378e16c2e.

This seems to have broken the build because whatever compiler the builder is using doesn't understand the same "turn off this warning" flags as my local host's compiler.

Change-Id: Ic68b7065b161a5ae683b7082c67147835833e0fa
2015-08-31 19:07:40 +00:00
Christopher Wiley
1643e97b33 Merge "aidl: Pull main() into dedicated file" 2015-08-31 19:03:44 +00:00
Christopher Wiley
2f77417cce aidl: Pull main() into dedicated file
This separates the main() entry point from the functionality we're
hoping to test.  While here, redo the header guards to be consistent
accross the codebae.

Bug: 23516947
Change-Id: I61666126bdba0941f14bd0f031caaa30367b864a
Test: Compiles
2015-08-31 10:54:26 -07:00
Christopher Wiley
2b83384f44 Merge "Tighten up compiler flags for aidl" 2015-08-31 17:52:03 +00:00
Christopher Wiley
eea2353a34 Tighten up compiler flags for aidl
Turn all warnings to errors, with special cases for places where
yacc forces us to be lenient.  Remove one variable with 0 references
elsewhere in the code.

Change-Id: Ia7819795eb162e9c77d215088aee4c45bd87c1af
2015-08-30 11:01:31 -07:00
Casey Dahlin
8a8775c1db Set up aidl for gtest
Bug: 23516947

Change-Id: I1c004868525f462d04894a7b96c671b626061ab5
Signed-off-by: Casey Dahlin <sadmac@google.com>
2015-08-28 16:21:53 -07:00
Christopher Wiley
3fc6f441ac Merge "Do not merge namespaces" 2015-08-28 23:09:50 +00:00
Dan Willemsen
4aa679ff96 Remove USE_MINGW, whitelist windows modules
Bug: 23566667
Change-Id: Ie6b8c51e2b6d6273f99f4e361c440136d7c6915c
2015-08-28 15:28:26 -07:00
Yasuhiro Matsuda
1ab43d5978 Add trace code to system server.
- Add TRACE_TAG_SYSTEM_SERVER for tracing system server code.
- Add a few more tracing code to the code paths related to boot.

BUG: 21739901
BUG: 22207144
Change-Id: I08b424d2f83783f512c3818394099909cd55f327
2015-08-27 12:22:07 +09:00
Alan Viverette
ea288fd3d4 Merge "Fix WallpaperCropper crash when setting wallpaper over 8MB" 2015-08-26 14:20:43 +00:00
Stephen Woo
cd2709ec7b Fix WallpaperCropper crash when setting wallpaper over 8MB
Use large heap for WallpaperCropper to avoid OOM crash in
createBitmap().

Change-Id: I1dc171286eaf0da37323ccf9fab046ca17e2ff07
Signed-off-by: Stephen Woo <stephen.m.woo@intel.com>
Signed-off-by: Dan Liang <dan.liang@intel.com>
2015-08-26 10:27:47 +08:00
Christopher Wiley
1eaa9ed334 Do not merge namespaces
It is good practice to not include the whole std:: namespace into
the global namespace.  This is doubly true in headers.

TEST=aidl compiles

Change-Id: I910ca8082f61cce4f23f8564b8a12c2828b75b3c
2015-08-24 14:28:36 -07:00