175283 Commits

Author SHA1 Message Date
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
Stephen Hines
582d16681b Merge "Don't make bad RS API level recommendations." 2015-08-21 21:57:37 +00:00
Tom Cherry
49948146dc Merge "bundle init.rc contents with its service" 2015-08-21 17:42:30 +00:00
Chong Zhang
5923d161d0 Merge "wm: call displayReady for all built in displays when system is ready." 2015-08-20 19:48:31 +00:00
Elliott Hughes
ce4fbb4da6 Merge "zygote: fix memory leak when fork process" 2015-08-20 01:14:00 +00:00
Tom Cherry
c2de7a7e87 bundle init.rc contents with its service
Bug: 23186545
Change-Id: I080e73d6a124873c2ddd0fba85315d7082faf3f5
2015-08-19 17:24:47 -07:00
Mykola Kondratenko
1ca062f21e zygote: fix memory leak when fork process
Release memory allocated by GetIntArrayElements.

Change-Id: If7ce2a78a480e58b0376352ce438dbe51f664f3a
2015-08-19 09:41:03 +02:00
Stephen Hines
fd1fd6eefb Don't make bad RS API level recommendations.
This document was recommending that users always target the latest
available API level, but that will prevent optimization on older
devices. Instead, they should be setting the minimum value that they
require.

Change-Id: I27c65872d124ed0beaeb2125d68d1d636ffa9352
2015-08-18 17:41:41 -07:00
Tao Bao
9bcb0fcc21 Merge "Recursively delete directories in handleAftermath()." 2015-08-18 22:26:16 +00:00
Tao Bao
5065e12dbe Recursively delete directories in handleAftermath().
RecoverySystem.handleAftermath() is called to clean up recovery-related
files. It needs to handle non-empty directories as well such as leftover
stashes from failed OTAs.

Bug: 23199081
Change-Id: I33fb326d376d04c793ad7b5948a10e8c1c572812
2015-08-18 13:48:17 -07:00
Elliott Hughes
eba23aaa76 Merge "Replace HAVE_MS_C_RUNTIME with _WIN32 in frameworks/base/tools." 2015-08-17 20:51:00 +00:00
Elliott Hughes
e17788ceff Replace HAVE_MS_C_RUNTIME with _WIN32 in frameworks/base/tools.
Change-Id: Ideef62acbf53a442167c9b8038021affffef9e8a
2015-08-17 12:41:46 -07:00
Chris Craik
e3f0a881c2 Merge "Make the value for shadowRadius less than 1.0 work" 2015-08-14 22:02:19 +00:00
Dan Albert
4a2a890b32 Merge "Fix mismatched new[]/delete." 2015-08-14 21:23:29 +00:00