120677 Commits

Author SHA1 Message Date
Neil Fuller
ee665151a4 am 0c1faf43: Merge "Switch from FloatMath -> Math and Math.hypot where possible"
* commit '0c1faf43aecadc37b78c4ad6cb669eb351d21385':
  Switch from FloatMath -> Math and Math.hypot where possible
2014-10-02 10:18:29 +00:00
Neil Fuller
0c1faf43ae Merge "Switch from FloatMath -> Math and Math.hypot where possible" 2014-10-02 10:14:19 +00:00
Andreas Gampe
152d9aae63 am 31629651: Merge "Frameworks/base: Fix more aapt issues"
* commit '316296511bf12c4e14dfb6f54731d1a515114abf':
  Frameworks/base: Fix more aapt issues
2014-10-02 07:01:55 +00:00
Andreas Gampe
316296511b Merge "Frameworks/base: Fix more aapt issues" 2014-10-02 06:58:39 +00:00
Andreas Gampe
b8dc7bc582 Frameworks/base: Fix more aapt issues
Change-Id: I6da7dc674e9f9e3b0886a3cfd1e3194d6b5ac948
2014-10-01 20:42:00 -07:00
Andreas Gampe
1dcc75b2db am 0ce259c2: Merge "Frameworks/base: Fix AAPT warnings"
* commit '0ce259c2f69cefd09342a95fbbd4c1a63a0af484':
  Frameworks/base: Fix AAPT warnings
2014-10-01 23:38:25 +00:00
Andreas Gampe
0ce259c2f6 Merge "Frameworks/base: Fix AAPT warnings" 2014-10-01 23:34:31 +00:00
Andreas Gampe
2412f84064 Frameworks/base: Fix AAPT warnings
Turn on -Wall -Werror. Fix warnings.

Change-Id: I287fb3c1e851c654479bcf9ea8c73bd354a6b2a1
2014-10-01 16:18:06 -07:00
Dan Albert
fe50cfd533 am c46dbe8a: Merge "Use std::sort instead of qsort_r wrapper."
* commit 'c46dbe8ac4748a0084b026524ad9e5ac44fb9fde':
  Use std::sort instead of qsort_r wrapper.
2014-10-01 20:34:15 +00:00
Dan Albert
c46dbe8ac4 Merge "Use std::sort instead of qsort_r wrapper." 2014-10-01 20:30:52 +00:00
Dan Albert
0de19adc80 Use std::sort instead of qsort_r wrapper.
The HAVE_(BSD|GNU)_QSORT_R in AndroidConfig.h has never worked, and we
should just be using something standard anyway.

Change-Id: I784d6212f6c890a11c4af2f83d1ce2d279708652
2014-10-01 11:34:17 -07:00
Neil Fuller
33253a4baa Switch from FloatMath -> Math and Math.hypot where possible
The motivation is an API change: FloatMath is going to be
deprecated and/or removed. Performance is not the goal of
this change.

That said...

Math is faster than FloatMath with AOT compilation.

While making the change, occurances of:

{Float}Math.sqrt(x * x + y * y) and
{Float}Math.sqrt({Float}Math.pow(x, 2) + {Float}Math.pow(y, 2))

have been replaced with:

{(float)} Math.hypot(x, y)

Right now there is no runtime intrinsic for hypot so is not faster
in all cases for AOT compilation:

Math.sqrt(x * x + y * y) is faster than Math.hypot(x, y) with
AOT, but all other combinations of FloatMath, use of pow() etc.
are slower than hypot().

hypot() has the advantage of being self documenting and
could be optimized in future. None of the behavior differences
around NaN and rounding appear to be important for the cases
looked at: they all assume results and arguments are in range
and usually the results are cast to float.

Different implementations measured on hammerhead / L:

AOT compiled:

[FloatMath.hypot(x, y)]
benchmark=Hypot_FloatMathHypot} 633.85 ns; σ=0.32 ns @ 3 trials

[FloatMath.sqrt(x*x + y*y)]
benchmark=Hypot_FloatMathSqrtMult} 684.17 ns; σ=4.83 ns @ 3 trials

[FloatMath.sqrt(FloatMath.pow(x, 2) + FloatMath.pow(y, 2))]
benchmark=Hypot_FloatMathSqrtPow} 1270.65 ns; σ=12.20 ns @ 6 trials

[(float) Math.hypot(x, y)]
benchmark=Hypot_MathHypot} 96.80 ns; σ=0.05 ns @ 3 trials

[(float) Math.sqrt(x*x + y*y)]
benchmark=Hypot_MathSqrtMult} 23.97 ns; σ=0.01 ns @ 3 trials

[(float) Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2))]
benchmark=Hypot_MathSqrtPow} 156.19 ns; σ=0.12 ns @ 3 trials

Interpreter:

benchmark=Hypot_FloatMathHypot} 1180.54 ns; σ=5.13 ns @ 3 trials
benchmark=Hypot_FloatMathSqrtMult} 1121.05 ns; σ=3.80 ns @ 3 trials
benchmark=Hypot_FloatMathSqrtPow} 3327.14 ns; σ=7.33 ns @ 3 trials
benchmark=Hypot_MathHypot} 856.57 ns; σ=1.41 ns @ 3 trials
benchmark=Hypot_MathSqrtMult} 1028.92 ns; σ=9.11 ns @ 3 trials
benchmark=Hypot_MathSqrtPow} 2539.47 ns; σ=24.44 ns @ 3 trials

Bug: https://code.google.com/p/android/issues/detail?id=36199
Change-Id: I06c91f682095e627cb547d60d936ef87941be692
2014-10-01 14:04:15 +01:00
Elliott Hughes
ee7684cad0 am 04517286: Merge "Use strerror(3) when reporting zygote failures."
* commit '0451728645d559d904f579894d4b59e971e2369e':
  Use strerror(3) when reporting zygote failures.
2014-09-30 17:10:00 +00:00
Elliott Hughes
0451728645 Merge "Use strerror(3) when reporting zygote failures." 2014-09-30 17:03:37 +00:00
Elliott Hughes
960e83185e Use strerror(3) when reporting zygote failures.
Bug: 17700596
Change-Id: I39a72ab6f19063de3c90c9fccdb749dc9a86324e
2014-09-30 08:49:01 -07:00
Andreas Gampe
6290c048e1 am 207cffe9: Merge "Frameworks/base: Fix services/jni warnings"
* commit '207cffe95a868ea21b74dd54e3ef7821162ce870':
  Frameworks/base: Fix services/jni warnings
2014-09-29 20:43:15 +00:00
Andreas Gampe
207cffe95a Merge "Frameworks/base: Fix services/jni warnings" 2014-09-29 18:10:26 +00:00
Dan Albert
c20a4bd1a4 am d7baaed8: Merge "Allow AOSP to boot."
* commit 'd7baaed89e498ad3cf7d9c487d6cae967e562ea4':
  Allow AOSP to boot.
2014-09-25 19:00:34 +00:00
Dan Albert
d7baaed89e Merge "Allow AOSP to boot." 2014-09-25 18:50:18 +00:00
Dan Albert
e08bd64184 Allow AOSP to boot.
HAVE_OOM_ADJ is really __linux__, and this code should never be run on
another platform.

Bug: 17641445
Change-Id: Ib8174106b6d03c9c2429794a4f582c09cb308646
2014-09-25 11:48:11 -07:00
Andreas Gampe
26872f4b9e Frameworks/base: Fix services/jni warnings
Update code for unused variables.

Ignore warnings generated by pulling in Skia.

Change-Id: I5b33c9b003c90bcabcea0761304c4c99cf5e39ec
2014-09-25 11:45:07 -07:00
Andreas Gampe
dfdabe3728 am 6f954cf2: Merge "Frameworks/base: Early init native bridge"
* commit '6f954cf2eb2baadf26bc0aba6272ef19b5dd45a0':
  Frameworks/base: Early init native bridge
2014-09-24 22:10:15 +00:00
Andreas Gampe
6f954cf2eb Merge "Frameworks/base: Early init native bridge" 2014-09-24 21:59:51 +00:00
Bill Yi
6471a6faf5 am 1829a4b4: (-s ours) Merge "Fix build. Cherry-pick 2393c364b0f727c6b904febba32ad2ddc4142c96 - DO NOT MERGE"
* commit '1829a4b4d16e1bf37650e34ad6bbc54b68145e15':
  Fix build. Cherry-pick 2393c364b0f727c6b904febba32ad2ddc4142c96 - DO NOT MERGE
2014-09-24 16:57:52 +00:00
Bill Yi
1829a4b4d1 Merge "Fix build. Cherry-pick 2393c364b0f727c6b904febba32ad2ddc4142c96 - DO NOT MERGE" 2014-09-24 16:46:41 +00:00
Bill Yi
519c1f6433 Fix build. Cherry-pick 2393c364b0f727c6b904febba32ad2ddc4142c96 - DO NOT MERGE
Change-Id: I30305a3f821b4f75f5037ebf11b74cfb8f2c8bb2
2014-09-24 09:17:57 -07:00
jgu21
2eacd06bfb Frameworks/base: Early init native bridge
Add the app directory to the arguments for starting a process.
Add a check for NeedsNativeBridge and a call to PreInitializeBridge
in the native fork code.

Change-Id: I0b93da93251c6b4638de786bf98cf99df07c3fc2
2014-09-22 16:04:37 -07:00
Marco Nelissen
c840e31d0e am fa436298: Merge "Broadcast an intent to mediascanner after executing screencap"
* commit 'fa4362982c4e5d07c158c470f957f6ffd2fc7cc9':
  Broadcast an intent to mediascanner after executing screencap
2014-09-22 14:44:57 +00:00
Marco Nelissen
fa4362982c Merge "Broadcast an intent to mediascanner after executing screencap" 2014-09-22 14:34:03 +00:00
Christopher Ferris
4cbee7d24d am b7442bbc: Merge "Remove MALLOC_LEAK_CHECK references."
* commit 'b7442bbc8c27b0643b7235076ee151b8257bf28d':
  Remove MALLOC_LEAK_CHECK references.
2014-09-20 01:30:36 +00:00
Christopher Ferris
b7442bbc8c Merge "Remove MALLOC_LEAK_CHECK references." 2014-09-20 01:23:27 +00:00
Christopher Ferris
9244436a05 Remove MALLOC_LEAK_CHECK references.
Bug: 17378595
Change-Id: Ie7f8af88c7f3b0c3dc2c2e75bbaaa9e6a81269ae
2014-09-19 18:08:29 -07:00
Christopher Ferris
7d1138298b am b6f891c4: Merge "Remove MALLOC_LEAK_CHECK references."
* commit 'b6f891c42ffdfdd9adc3811adaf09e09e3db7e84':
  Remove MALLOC_LEAK_CHECK references.
2014-09-20 00:49:35 +00:00
Christopher Ferris
b6f891c42f Merge "Remove MALLOC_LEAK_CHECK references." 2014-09-20 00:42:22 +00:00
Elliott Hughes
4fec1b4887 am 600ca140: Merge "Use constants instead of resources for ellipsis."
* commit '600ca140e2e31e76f9bef7d484387ea366812cb3':
  Use constants instead of resources for ellipsis.
2014-09-19 22:14:48 +00:00
Dan Albert
1a4527ce94 am 799812cd: Merge "Clean up makefile cruft."
* commit '799812cd6f7f9aa4a87d81dafd273d51ac5ba992':
  Clean up makefile cruft.
2014-09-19 22:14:42 +00:00
Dan Albert
8791ebf0cd am bcaaebb8: Merge "Clean up test makefiles."
* commit 'bcaaebb8a881951720190f4a6b9ffcbf871542af':
  Clean up test makefiles.
2014-09-19 22:14:38 +00:00
Ian Rogers
ad64befd25 am 296a712e: Merge "Make a field final."
* commit '296a712e6b3fd48b5ace1128fa68547fdb8de84d':
  Make a field final.
2014-09-19 22:14:33 +00:00
Elliott Hughes
600ca140e2 Merge "Use constants instead of resources for ellipsis." 2014-09-19 22:02:45 +00:00
Igor Viarheichyk
ed0daa93e4 Use constants instead of resources for ellipsis.
All supported locales use only U+2025 and U+2026 to represent
ellipses, and it will unlikely change in future. Given translated
resources are inconsistent and often use three dots it is safer
to use constants instead of resources.

Change-Id: I51a6cb903f62f739fbadd6b78e5765c0028d641a
2014-09-19 22:02:08 +00:00
Christopher Ferris
8b1dfddf50 Remove MALLOC_LEAK_CHECK references.
Bug: 17378595
Change-Id: Ib9680ef97dfea6bc20d96f0bed90f4553186315c
2014-09-19 12:24:59 -07:00
Dan Albert
799812cd6f Merge "Clean up makefile cruft." 2014-09-11 23:26:26 +00:00
Dan Albert
88ba339aef Clean up makefile cruft.
The build system already takes care of all these things.

Change-Id: Idef80b554e07cef5e5ed2adf1b5740a76f13ef6d
2014-09-11 16:21:19 -07:00
Dan Albert
bcaaebb8a8 Merge "Clean up test makefiles." 2014-09-11 23:21:14 +00:00
Dan Albert
715d01aedf Clean up test makefiles.
The build system takes care of linking the correct STL and gtest
libraries for you, and specifying them manually confuses the build
system when using libc++.

Change-Id: I9f76ab26a63ace51293614cfb5ca002f37438e02
2014-09-11 15:49:57 -07:00
Ian Rogers
296a712e6b Merge "Make a field final." 2014-09-11 20:01:22 +00:00
Dan Albert
140e58b0f4 am 8bbc5269: Merge "Don\'t check a staticly allocated array for null."
* commit '8bbc526921a5034ccde19e5ae5ec4d5b0cc180ee':
  Don't check a staticly allocated array for null.
2014-09-10 17:42:40 +00:00
Dan Albert
8bbc526921 Merge "Don't check a staticly allocated array for null." 2014-09-10 17:31:55 +00:00
Dan Albert
4fb58b0360 Don't check a staticly allocated array for null.
Change-Id: I5568174f1a9d53078c2169cfd3401e43d88a7643
2014-09-10 08:17:30 -07:00
Dan Albert
1d99636fcc am 8085477f: Merge "Don\'t check for null references."
* commit '8085477fb98eab36bbc8c3e9add76f398235b469':
  Don't check for null references.
2014-09-09 16:35:02 +00:00