219 Commits

Author SHA1 Message Date
Christopher Ferris
8b1dfddf50 Remove MALLOC_LEAK_CHECK references.
Bug: 17378595
Change-Id: Ib9680ef97dfea6bc20d96f0bed90f4553186315c
2014-09-19 12:24:59 -07: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
Yong WU
03c866020b Integrate NativeActivity with NativeBridge interfaces
Bug: 16884833

Change-Id: I73aab8e212860ba5aee9444d801806d3da326a41
2014-08-15 10:18:40 +01:00
Neil Fuller
d7f0849b8c Rewriting android.text.format.Time without the native _tz functions
Bug: 15765976
Change-Id: I666b72ecf9da8a9dcfb97cc503006b415909a558
2014-07-22 15:06:16 +01:00
Elliott Hughes
92b1896dfd Switch frameworks/base/core/jni to the new icu.
Change-Id: Id12ce02da377ce78f318e10633c47f500237d9d9
2014-07-09 16:56:11 -07:00
Ying Wang
b38e3fdf5a Remove unused LOCAL_LDLIBS.
Change-Id: I01346e76f4ac6402af0ef33e3b2eef4a69e704a2
2014-05-07 15:23:37 -07:00
Narayan Kamath
973b4663b0 Move zygote startup logic to the frameworks.
The Zygote class is now in com.android.internal.os. It is
responsible for the vast majority of work before and after
the call to fork(). It calls back into the Runtime via
the new dalvik.system.ZygoteHooks class to allow the Runtime
to perform pre fork cleanup and post fork initialization.

The native code in Zygote.cpp is a direct and straightforward
port of the existing code in art. Most differences are
superficial, for example :
- We use C style logging (ALOGE) instead of stream based
  logging.
- We call env->FatalError() instead of using LOG(FATAL)

Change-Id: Ia101fb2af12d23894fe57e4134d2bc6d142e5059
2014-04-02 10:18:43 +01:00
Ashok Bhat
42f06b0e22 Remove unused JNITest class
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>
2014-02-21 14:34:35 +00:00
Kristian Monsen
f5fabdf83d Fix one and hide the other warnings from core/jni
Most of the warnings are unused parameter from skia functions.

Change-Id: I9df57718d117c26b96163f751ccb056ca86ac072
2013-12-11 21:58:53 -08:00
The Android Open Source Project
ebcb32f58a Merge commit 'bac61807d3bcfff957b358cb9ad77850bd373689' into HEAD
Change-Id: I29374270c8e0c2f2859efaf1d55af9f73da0f8d7
2013-12-05 13:10:46 -08:00
Dmitry Shmidt
2a69b17309 wifi: Remove obsolete libwpa_client library
Change-Id: I222c60ec65375768dc62f9219d115b5b09a374f6
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2013-12-05 10:50:48 -08:00
Jeff Sharkey
5aca2b8dc4 Plumb through physical device UUID and label.
vold now parse out UUID and label for inserted physical devices,
and reports them to framework.  Add these to hidden StorageVolume
class for use by DocumentsUI and MediaProvider.

Remove last JNI method in FileUtils!

Bug: 11175082
Change-Id: I1cfcd1ade61767b103f693319ea2600008ee2e3c
2013-10-16 16:34:21 -07:00
Adam Lesinski
5b4ef81f2b Add Graphics alloc tracking via memtrack
Any OpenGL memory reported by /proc/pid/smaps will not be included
in the GPU GL memory count and will be considered Unknown. This is
an artifact of how some memory reporting is done in libmemtrack
and some is done in this module.

bug:10294768

Change-Id: Id8fb63b2e86520f4dbc8410573a509e66b96b13b
2013-09-25 14:41:49 -07:00
Svetoslav
6811f4e92c Move PdfDocument to android.graphics.pdf
1. Move PdfDocument to android.graphics.pdf.

2. Changed the PdfDocument as per API concil request.

3. Updated the documentation.

bug:10461180
bug:10552565
bug:10681585
bug:10552336

Change-Id: I08e15b34cf37bb064248c887e6f59808019cafe8
2013-09-19 17:12:47 -07:00
Elliott Hughes
b93489270d Merge "Remove a fixed-length buffer in the wifi code." into klp-dev 2013-08-19 18:08:49 +00:00
Elliott Hughes
a11d574fc6 Remove a fixed-length buffer in the wifi code.
Also increase the size of the buffer we do need, simplify the code, and
fix some of the error checking.

(cherry-pick of 56968581ce77d3c0ee4286da6b0d5548874934b9.)

Bug: http://code.google.com/p/android/issues/detail?id=36193
Bug: 10363597
Change-Id: Iadd2ee25469a37ddf06c3292b675a4cbcc4ecfa3
2013-08-16 14:48:38 -07:00
Jeff Sharkey
da5a3e12f4 Richer ParcelFileDescriptor close events.
When reading from the end of a pipe or socket, there is no way to
tell if the other end has finished successfully, encountered an error,
or outright crashed.  To solve this, we create a second socketpair()
as a communication channel between the two ends of a pipe or
socket pair, sending a status code with details about why the
ParcelFileDescriptor was closed.

The writer end of a pipe or socket can closeWithError() to send a
message to the reader end.  When the reader encounters EOF, they
call checkError() to detect if any error occured.  This also detects
the case where the remote process died without sending a success
message.

This design is also extended to support regular files on disk, using
the communication channel above to detect various remote close events
or crashes, and delivering that event to a supplied OnCloseListener.

Replaces JNI with best-practice Libcore.os calls, and deprecates
some flags to match Context.

Bug: 10330121
Change-Id: I8cfa1e4fb6f57397667c7f785106193e0faccad3
2013-08-16 14:34:43 -07:00
Derek Sollenberger
5827cb5059 Changes needed to support Skia at r10377.
Change-Id: Id1e1c8c5938ee1a33c6fa3caabd2c28e89243eb4
2013-08-01 12:52:21 -04:00
Eino-Ville Talvala
2f1a2e423e Camera2 API: Rename package to android.hardware.camera2
Change-Id: I77b7939e199f9fe8e12a59393c24cff08097448c
2013-07-30 11:37:31 -07:00
Mathias Agopian
2ca204e4c0 get rid of PixelFormatInfo and simplify things
Change-Id: I487d4eef7db0095ace4babf5bb100a8769711257
2013-07-25 19:25:10 -07:00
Igor Murashkin
b519cc52ec camera2 api: Add CameraMetadata get/set support
* Add a Rational class
* Can get/set Key<T> where T is a primitive (or Rational)
* Can get/set Key<T> where T is a primitive array
* Can get/set Key<T> where T is an enum (synthetic constructor only)

Not implemented yet:
* When T is anything else, i.e. Rect, Size, etc

Bug: 9529161
Change-Id: I64438024a1e8327a38dd2672652626f0ffbb70e3
2013-07-11 13:06:56 -07:00
Jeff Brown
9d3b1a424c Move input library code to frameworks/native.
No longer compile libandroidfw as a static library on the device
since it already exists as a shared library.  Keeping the static
library would force us to provide a static library version of
libinput for the device as well which doesn't make sense.

Change-Id: I3517881b87b47dcc209d80dbd0ac6b5cf29a766f
2013-07-01 20:11:42 -07:00
Igor Murashkin
70725500dc Initial camera device implementation
* Working streaming preview requests only
* Almost everything else returns empty objects that don't do anything

Bug: 9213377
Change-Id: Ie6f02a7c0952b0f5ebc41905425b15cae221f7d3
2013-06-26 13:19:45 -07:00
Igor Murashkin
36483e9622 Revert "Initial camera device implementation"
This reverts commit 59bc67c732eab53b370b196066e8012d3f6bf09a.

Change-Id: I9e1ce3b9f4af4e2b9b98855c0ca533581c87ea7f
2013-06-25 05:13:55 +00:00
Igor Murashkin
59bc67c732 Initial camera device implementation
* Working streaming preview requests only
* Almost everything else returns empty objects that don't do anything

Bug: 9213377
Change-Id: I183dd47ddd737ec2c3c374e5c3461542a97f09b0
2013-06-24 17:41:10 -07:00
Svetoslav Ganov
b06accf34f Merge "Generate PDF from Canvas." 2013-06-21 20:09:51 +00:00
Brian Carlstrom
9f8203a159 Remove libdvm dependency
Change-Id: I7d37db4e72e9435ecd514340cf61a051dc272f04
2013-06-20 16:34:45 -07:00
Svetoslav Ganov
ff4adde573 Generate PDF from Canvas.
This change adds simple APIs that enable an Android application
to generate a PDF document by drawing content on a canvas.

Change-Id: Ibac93d7c37b01a376ce7c48238657d8c7698d588
2013-06-19 19:35:38 -07:00
Derek Sollenberger
d7a80774f0 Modifications needed for updating Skia to r9286.
bug: 8719528
Change-Id: I260fefb93c5a8c5dec86acdec66cbe55a2ee8a92
2013-05-28 10:44:26 -04:00
Brian Carlstrom
6155251c7b am bf7afa23: am 94f55b30: Merge "Tracking libnativehelper dependencies"
* commit 'bf7afa239e9541b3cac5a3c510bfb9b25b4a1348':
  Tracking libnativehelper dependencies
2013-05-10 22:49:00 -07:00
Brian Carlstrom
bf7afa239e am 94f55b30: Merge "Tracking libnativehelper dependencies"
* commit '94f55b30e3e04dbea63836197e76c7464d8d6d37':
  Tracking libnativehelper dependencies
2013-05-10 22:47:57 -07:00
Brian Carlstrom
fde1f91d9b Tracking libnativehelper dependencies
Change-Id: I05ec62c43fbe5f8ba23256abac7271ca0b1a7242
2013-05-10 21:16:12 -07:00
Jesse Hall
ce3fe5fd8a am 4d32a367: am 2787ba25: Merge "Register EGLExt JNI methods" into jb-mr2-dev
* commit '4d32a36759b619abdda9c895054f513aef3a3f03':
  Register EGLExt JNI methods
2013-05-07 10:18:38 -07:00
Jesse Hall
237c2b871f Register EGLExt JNI methods
Bug: 8678160
Change-Id: I8ecd2e6da2aee250b3433be18fff6af927b02994
2013-05-06 11:36:59 -07:00
Romain Guy
3b748a44c6 Pack preloaded framework assets in a texture atlas
When the Android runtime starts, the system preloads a series of assets
in the Zygote process. These assets are shared across all processes.
Unfortunately, each one of these assets is later uploaded in its own
OpenGL texture, once per process. This wastes memory and generates
unnecessary OpenGL state changes.

This CL introduces an asset server that provides an atlas to all processes.

Note: bitmaps used by skia shaders are *not* sampled from the atlas.
It's an uncommon use case and would require extra texture transforms
in the GL shaders.

WHAT IS THE ASSETS ATLAS

The "assets atlas" is a single, shareable graphic buffer that contains
all the system's preloaded bitmap drawables (this includes 9-patches.)
The atlas is made of two distinct objects: the graphic buffer that
contains the actual pixels and the map which indicates where each
preloaded bitmap can be found in the atlas (essentially a pair of
x and y coordinates.)

HOW IS THE ASSETS ATLAS GENERATED

Because we need to support a wide variety of devices and because it
is easy to change the list of preloaded drawables, the atlas is
generated at runtime, during the startup phase of the system process.

There are several steps that lead to the atlas generation:

1. If the device is booting for the first time, or if the device was
updated, we need to find the best atlas configuration. To do so,
the atlas service tries a number of width, height and algorithm
variations that allows us to pack as many assets as possible while
using as little memory as possible. Once a best configuration is found,
it gets written to disk in /data/system/framework_atlas

2. Given a best configuration (algorithm variant, dimensions and
number of bitmaps that can be packed in the atlas), the atlas service
packs all the preloaded bitmaps into a single graphic buffer object.

3. The packing is done using Skia in a temporary native bitmap. The
Skia bitmap is then copied into the graphic buffer using OpenGL ES
to benefit from texture swizzling.

HOW PROCESSES USE THE ATLAS

Whenever a process' hardware renderer initializes its EGL context,
it queries the atlas service for the graphic buffer and the map.

It is important to remember that both the context and the map will
be valid for the lifetime of the hardware renderer (if the system
process goes down, all apps get killed as well.)

Every time the hardware renderer needs to render a bitmap, it first
checks whether the bitmap can be found in the assets atlas. When
the bitmap is part of the atlas, texture coordinates are remapped
appropriately before rendering.

Change-Id: I8eaecf53e7f6a33d90da3d0047c5ceec89ea3af0
2013-05-02 13:32:09 -07:00
Michael Wright
a44dd26a75 Rewrite input handling for native applications
Bug: 8473020
Change-Id: Ic4353d8924ab877bec21aff8c2dba9fe725bf906
2013-04-22 17:01:51 -07:00
Jesse Hall
d830e74ff4 Add android.opengl.GLES30, hidden for now
Bug: 8566953
Change-Id: Ia5a01d5e857b4fce12a451e2dcab0359758ad648
2013-04-15 17:37:33 -07:00
Ying Wang
d685894212 Add liblog
Bug: 8580410
Change-Id: I746aa8258866508c3a725d0773faf4518096548f
2013-04-09 21:54:12 -07:00
Jeff Brown
c28867a1d6 Use input transport for communications between app and IME.
The input method manager service now supplies an input channel for
communication while creating an IME session on behalf of the
application.

This change significanly reduces the overhead of IME event dispatch
by using a standard input channel to send input events rather than
using binder.  This results in fewer thread context switches
and fewer object allocations.

What's more, the IME may perform additional batching of the motion
events that it receives which may help it catch up if it is
getting behind while processing them.

Bug: 7984576
Bug: 8473020
Change-Id: Ibe26311edd0060cdcae80194f1753482e635786f
2013-03-26 15:42:39 -07:00
Elliott Hughes
bf49422197 am 582c5b85: am 690d3435: Merge "jni: remove obsolete flag from makefile"
* commit '582c5b85c5653d93afc63b00ac1efff94d0853ab':
  jni: remove obsolete flag from makefile
2013-03-05 22:43:07 +00:00
Bruce Beare
d625127db9 jni: remove obsolete flag from makefile
Change-Id: Ia7e67694a736745333e9d36396b8cb6194fd26ec
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2013-03-05 14:29:46 -08:00
Kristian Monsen
1456758802 resolved conflicts for merge of 58a1ca66 to master-chromium
Change-Id: I06b61e6d7d52b584eae03a95220381475b8bff0e
2013-02-14 19:48:27 -08:00
Mathias Agopian
58a1ca6642 Merge "split Surface in two classes: SurfaceControl and Surface" 2013-02-14 20:25:08 +00:00
Mathias Agopian
3866f0d581 split Surface in two classes: SurfaceControl and Surface
SurfaceControl is the window manager side; it can
control the attributes of a surface but cannot push buffers
to it. Surface on the other hand is the application (producer)
side and is used to push buffers to the surface.

Change-Id: Ib6754c968924e87e8dd02a2073c7a447f729f4dd
2013-02-14 12:19:11 -08:00
Jeff Sharkey
1f6692f1f9 am aec6bcfb: Merge "Parse network stats using native code."
# Via Android (Google) Code Review (1) and Jeff Sharkey (1)
* commit 'aec6bcfb767a4b9dfd391bff338a8ff284b29549':
  Parse network stats using native code.
2013-02-13 18:14:31 -08:00
Jeff Sharkey
9a2c2a6da9 Parse network stats using native code.
Switch to parsing detailed network stats with native code, which
is 71% faster than ProcFileReader.

Change-Id: I2525aaee74d227ce187ba3a74dd08a2b06514deb
2013-02-13 17:40:49 -08:00
Chris Craik
7c1a49f5f5 Revert "Merge remote-tracking branch 'goog/master-chromium' into 'goog/master'" DO NOT MERGE
This reverts commit 6c0307dd0aefe9a08794b155fc03ee60ebd14f25, reversing
changes made to a2cd828b749c444d55c2c41c7dbb85088ff94b9f.

Conflicts:
	packages/SystemUI/res/values-sv/strings.xml

Change-Id: Ia178efe8b14751583d47b2826bfe3d3d5463dd2e
2013-02-13 10:50:20 -08:00
Derek Sollenberger
d81ec456bb Changes needed to roll Skia to r7527.
Change-Id: I84aef3f8a733c869fade06021816646001532758
2013-02-04 15:42:26 -05:00
Raph Levien
49a7e454d1 am 7cd0859a: Merge "Update framework text layout to use Harfbuzz NG"
* commit '7cd0859a735c0c6a489d70d5d96e44e9d1a27be8':
  Update framework text layout to use Harfbuzz NG
2013-01-15 11:28:40 -08:00
Raph Levien
aaedde51b7 Update framework text layout to use Harfbuzz NG
These are the frameworks changes to use the new version of Harfbuzz.

Change-Id: Idbef325e8fc1c27a9f2296414ddb1f79b778a00e
2013-01-15 09:58:06 -08:00