78 Commits

Author SHA1 Message Date
Aravind Akella
99fe165082 Sensor related changes for NDK.
i) Add ASensor_isWakeUpSensor and ASensorManager_getDefaultSensorEx
        methods.

Bug: 16399898
Change-Id: Icc252aad068fa337bef8b22f20584f98cd5a155d
2014-08-05 19:34:04 -07:00
Aravind Akella
27900358f2 Add java APIs for Sensor reportingMode.
Change-Id: Iba6bb11f990d9966b86bf02d70ced7312f3e64a8
2014-06-09 16:56:29 -07:00
Aravind Akella
b5e3f4ea13 am c7153377: am 73da981f: Merge "Remove getRequiredPermission from NDK." into klp-modular-dev
* commit 'c7153377cf03303e97185397544a13971a089961':
  Remove getRequiredPermission from NDK.
2014-05-23 18:04:18 +00:00
Aravind Akella
c7153377cf am 73da981f: Merge "Remove getRequiredPermission from NDK." into klp-modular-dev
* commit '73da981fd60f9dc855a04ea53e9fff59a011577e':
  Remove getRequiredPermission from NDK.
2014-05-22 22:44:49 +00:00
Aravind Akella
8bcdd9b7a5 Remove getRequiredPermission from NDK.
Change-Id: Ieb1e97e44ef335e6087ba9164058fe3535e9998a
2014-05-22 13:33:52 -07:00
Aravind Akella
35187bd5c1 Bug fix for wakeup sensors.
SensorService should hold a wakelock till the app reads events from a wakeup sensor. Currently drivers hold a wakelock with a
timeout while delivering events from a wake up sensor like Significant Motion. This hack can be removed now.
Bug: 9774884

Change-Id: I6cab0147c63f57a494a61f4dfe2a64a27dfe1b4e
2014-04-23 17:05:41 -07:00
Aravind Akella
8ebd66c259 am cd4c1c71: Merge "Add stringType and requiredPermissions to SensorManager.java, as well as a permission for the heart rate sensor" into klp-modular-dev
* commit 'cd4c1c714c37a1bc7ba35ebd2509eca4f0f6a314':
  Add stringType and requiredPermissions to SensorManager.java, as well as a permission for the heart rate sensor
2014-04-11 19:34:51 +00:00
Aravind Akella
cd9a7bb3ba Add stringType and requiredPermissions to SensorManager.java, as well as a permission for the heart rate sensor
This reverts commit 819239e5bec90ee3c861ac45fffac4a832a183a1.

Change-Id: I4bbb222e5c9dc65aed03aa28fd9e0f00fe335819
2014-04-11 00:05:24 +00:00
Etienne Le Grand
acf395fd94 am 819239e5: Revert "Add stringType and requiredPermissions to SensorManager.java, as well as a permission for the heart rate sensor"
* commit '819239e5bec90ee3c861ac45fffac4a832a183a1':
  Revert "Add stringType and requiredPermissions to SensorManager.java, as well as a permission for the heart rate sensor"
2014-04-05 09:05:50 +00:00
Etienne Le Grand
819239e5be Revert "Add stringType and requiredPermissions to SensorManager.java, as well as a permission for the heart rate sensor"
This reverts commit fd53d8352a4617941b0a0449390aa562a01ea1d3.

Change-Id: I1c6322d1d992147bb5ef201238374966128c1a61
2014-04-05 04:47:14 +00:00
Etienne Le Grand
bdfe384106 am fd53d835: Add stringType and requiredPermissions to SensorManager.java, as well as a permission for the heart rate sensor
* commit 'fd53d8352a4617941b0a0449390aa562a01ea1d3':
  Add stringType and requiredPermissions to SensorManager.java, as well as a permission for the heart rate sensor
2014-04-05 01:52:27 +00:00
Etienne Le Grand
fd53d8352a Add stringType and requiredPermissions to SensorManager.java, as well as a permission for the heart rate sensor
Change-Id: I16e5da68f860494e24cca64075be76fad02617bc
2014-04-04 16:31:08 -07:00
Ashok Bhat
896043d67d AArch64: Make AssetManager and related classes 64-bit compatible
Following changes have been done:

[x] Long is used to store native pointers as pointers can be
    64-bit.

[x] AssetManager openAsset native function returned -1 if
    file name was empty and java function considered any
    non-zero value as success. This has been fixed by native
    function throwing Illegal Argument Exception as well.

[x] AssetManager incRefsLocked and decRefsLocked now accept
    long as input to support 64-bit native references.

[x] AssetManager incRefsLocked method incorrecly used
    'this.hashCode()' instead of the passed parameter id.
    This has been fixed.

[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: I095b9f900d49e51f43ad6afc47cbc23116a6a64a
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Signed-off-by: Craig Barber <craig.barber@arm.com>
Signed-off-by: Kévin PETIT <kevin.petit@arm.com>
2014-01-31 14:14:29 +00:00
Brian Carlstrom
82b007d757 Track Looper decoupling from ALooper
Change-Id: I54f4d36f105e60eaaa453ae60f591d634c681fd7
2013-12-18 17:56:35 -08: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
Andrew Hsieh
64b5f7cc4c am 09377ddb: Merge "Fix AMotionEvent_getHistorical* to take const AInputEvent* motion_event"
* commit '09377ddb93a964b9e0def6d84b8beb3a515f4a18':
  Fix AMotionEvent_getHistorical* to take const AInputEvent* motion_event
2013-05-28 17:08:54 -07:00
Andrew Hsieh
c01e1ed688 Fix AMotionEvent_getHistorical* to take const AInputEvent* motion_event
See b.android.com/55873

Change-Id: Idff7b71480991e16f57e55748fafa57d5827b10b
2013-05-27 12:27:10 +08:00
Michael Wright
a44dd26a75 Rewrite input handling for native applications
Bug: 8473020
Change-Id: Ic4353d8924ab877bec21aff8c2dba9fe725bf906
2013-04-22 17:01:51 -07:00
Ying Wang
d685894212 Add liblog
Bug: 8580410
Change-Id: I746aa8258866508c3a725d0773faf4518096548f
2013-04-09 21:54:12 -07:00
Jeff Sharkey
4fbbda4cec Handle multi-user mountObb() requests.
Since emulated external storage paths differ based on execution
context, carefully fix up paths for various use-cases:

1. When sending paths to DefaultContainerService, always scope
   OBB paths as belonging to USER_OWNER.
2. When sending paths to vold, always build emulated storage paths
   visible to root.
3. Always use the original untouched path when talking with apps.

Mount OBB containers using shared app GID, so that an app can read
the mount point across users.

Handle legacy paths like "/sdcard" by resolving the canonical path
before sending to MountService.  Move tests to servicestests, and
add tests for new path generation logic.

Bug: 7212801
Change-Id: I078c52879cd08d9c8a52cc8c83ac7ced1e8035e7
2012-09-25 17:34:48 -07:00
Fabrice Di Meglio
035ce2ca92 Merge "Add support for "-rtl" in resources" into jb-mr1-dev 2012-09-04 15:01:03 -07:00
Jeff Brown
64a55af0ac Add plumbing for new surface flinger display API.
Cleaned up the implementation of Surface and SurfaceSession
to use more consistent naming and structure.

Added JNI for all of the new surface flinger display API calls.

Enforced the requirement that all Surfaces created by
the window manager be named.

Updated the display manager service to use the new methods.

Change-Id: I2a658f1bfd0437e1c6f9d22df8d4ffcce7284ca2
2012-08-27 14:34:54 -07:00
Fabrice Di Meglio
5f79799939 Add support for "-rtl" in resources
- fix bug #7035019 Need to have "-rtl" support for Resource

Change-Id: Ic82145c2ac672729d8a6c695a5f343276a1a0a2c
2012-08-23 14:55:33 -07:00
Elliott Hughes
89269cf98d libnativehelper is implicitly available.
(And is moving for the PDK.)

Bug: 6369821
Change-Id: I9e082ef294cfb2d70384255eb06d97d8cb92b382
2012-05-03 16:39:22 -07:00
Jamie Gennis
544f1c334c Merge "ANativeWindow: support for application buffer dimensions" 2012-04-11 18:52:12 -07:00
Jeff Brown
9f25b7fdf2 Request key maps from input manager service.
Instead of each application loading the KeyCharacterMap from
the file system, get them from the input manager service as
part of the InputDevice object.

Refactored InputManager to be a proper singleton instead of
having a bunch of static methods.

InputManager now maintains a cache of all InputDevice objects
that it has loaded.  Currently we never invalidate the cache
which can cause InputDevice to return stale motion ranges if
the device is reconfigured.  This will be fixed in a future change.

Added a fake InputDevice with ID -1 to represent the virtual keyboard.

Change-Id: If7a695839ad0972317a5aab89e9d1e42ace28eb7
2012-04-10 18:23:58 -07:00
Michael I. Gold
0e5ed706a2 ANativeWindow: support for application buffer dimensions
Make the NDK use the new native_window_set_buffers_user_dimensions to implement
the ANativeWindow_setBuffersGeometry call.

Change-Id: I2d5981cbd619ee2e090fe8f2ddc69217915c9d9e
2012-04-10 18:15:47 -07:00
Mathias Agopian
8335f1cccc fix libgui header location
Change-Id: Iec71706cdd4f29c6904993648ce873e83ef9cafe
2012-02-27 13:03:08 -08:00
Mathias Agopian
83c64e6b62 frameworks/base refactoring
create the new libandroidfw from parts of libui and libutils

Change-Id: I1584995616fff5d527a2aba63921b682a6194d58
2012-02-20 22:38:43 -08:00
Mathias Agopian
b13b9bdad2 frameworks/base refactoring.
step 2: move libutils headers to their new home: androidfw

Change-Id: I14624ba23db92a81f2cb929f104386e1fab293ef
2012-02-17 19:01:26 -08:00
Mathias Agopian
b93a03f841 frameworks/base refactoring.
First step. Move libui includes to their new home: androidfw.

Change-Id: Ic042b52fdba72f30edc3cc6339bf30b4c1b99662
2012-02-17 15:36:10 -08:00
Steve Block
3762c31172 Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/#/c/157220

Bug: 5449033
Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
2012-01-08 13:19:13 +00:00
Steve Block
6215d3ff4b Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/156801

Bug: 5449033
Change-Id: Ib08fe86d23db91ee153e9f91a99a35c42b9208ea
2012-01-04 20:05:49 +00:00
Glenn Kasten
809820e28b Remove obsolete NativeWindow_fromSurfaceTexture
Change-Id: I9351103929da515cb411fb2e7906bb9f27c4da20
2011-10-21 12:52:29 -07:00
Ted Bonkenburg
1ee60119c4 Remove ParcelSurfaceTexture and update MediaPlayer
This removes the ParcelSurfaceTexture class since that functionality has been
folded into Surface.java. The change also updates the MediaPlayer to get rid
of setParcelSurfaceTexture() and modifies setTexture() to use the new Surface
functionality in order to simplify the code.

Change-Id: Iafa75ea3188263928128325d8a726786971b4de4
2011-08-11 19:58:25 -07:00
Mathias Agopian
09d7ed7b39 Add set_scaling_mode() to ANativeWindow.
This allows to specify the scaling mode independently from
the buffer size.

Change-Id: Iaa2baa660445531a97d3fac192e580f4929c5d3b
2011-07-19 13:05:11 -07:00
Mathias Agopian
949be32b67 move lock/unlock implementaion outside of Surface into SurfaceTextureClient
This makes ANativeWindow_lock/ANativeWindow_unlockAndPost work
with ANativeWindows implemented by Surface and SurfaceTextureClient.

Also, Surface now inherits directly from SurfaceTextureClient.

Bug: 5003724
Change-Id: I9f285877c7bae9a262e9a7af91c2bae78804b2ef
2011-07-15 17:47:08 -07:00
tedbo
050316184b Add ParcelSurfaceTexture Java class to enable ISurfaceTexture sharing via Binder.
This adds a new ParcelSurfaceTexture.java class that can be instantiated with
a SurfaceTexture and used to send the corresponding ISurfaceTexture interface
to another process via Binder. The ParcelSurfaceTexture java object can then
be used to create an ANativeWindow based on the SurfaceTextureClient interface.

Change-Id: Ie38ea948b866e52f36a6d0f6cde19b54a8546817
2011-06-09 11:59:23 -07:00
Dianne Hackborn
161e67ff3b resolved conflicts for merge of 06a8ceac to master
Change-Id: Id51574c825affddfac14ad7214c5496d6a3d6e69
2011-05-19 21:44:52 -07:00
Dianne Hackborn
69cb87576b Add new "-swNNNdp" resource qualifier.
Change-Id: I0101e88ca9d8d44138bdcaf571f24b0352f4f6ce
2011-05-19 18:23:29 -07:00
Jeff Brown
fe9f8ab03a Add initial API for stylus and mouse buttons.
Added the concept of pointer properties in a MotionEvent.
This is currently used to track the pointer tool type to enable
applications to distinguish finger touches from a stylus.

Button states are also reported to application as part of touch events.

There are no new actions for detecting changes in button states.
The application should instead query the button state from the
MotionEvent and take appropriate action as needed.

A good time to check the button state is on ACTION_DOWN.

As a side-effect, applications that do not support multiple buttons
will treat primary, secondary and tertiary buttons identically
for all touch events.

The back button on the mouse is mapped to KEYCODE_BACK
and the forward button is mapped to KEYCODE_FORWARD.

Added basic plumbing for the secondary mouse button to invoke
the context menu, particularly in lists.

Added clamp and split methods on MotionEvent to take care of
common filtering operations so we don't have them scattered
in multiple places across the framework.

Bug: 4260011
Change-Id: Ie992b4d4e00c8f2e76b961da0a902145b27f6d83
2011-05-13 12:11:17 -07:00
Mathias Agopian
da5a4440f0 ANativeWindow_setBuffersGeometry now returns proper error codes
Change-Id: Iac59d513fa1d4a55b8378000714d344ef3e2e0a4
2011-03-31 20:59:58 -07:00
Mathias Agopian
696257ccf3 merge libsurfaceflinger_client into libgui
this is the first step in unifying surfacetexture and surface.
for this reason the header files were not moved, as most of them
will eventually go away.

NOTE: currently we keep libsurfaceflinger_client.so as an empty
library to workaround prebuilt binaries wrongly linking against
it.

Change-Id: I130f0de2428e8579033dc41394d093f4e1431a00
2011-03-25 18:42:40 -07:00
Jamie Gennis
bae716bc15 SurfaceTexture: disallow unsupported uses.
This change makes the ANativeWindow_lock NDK function error out if it is
passed an ANativeWindow with a concrete type that is not Surface.  It
also makes eglCreateWindowSurface fail if it is passed a
SurfaceTextureClient as its 'window' argument.

Bug: 4087277
Change-Id: Ie68c50c52d88f72d8a387f6c094908044c83a88c
2011-03-15 10:37:37 -07:00
Glenn Kasten
846db33313 Bug 3515073 Add ANativeWindow_fromSurfaceTexture
This is similar to ANativeWindow_fromSurface.

Change-Id: Iaadc06a5d0d50685c34876aa89488c16e7cfaa65
2011-03-04 16:39:29 -08:00
Jeff Brown
91c69ab015 Add support for arbitrary axes in MotionEvents.
This change makes it possible to extend the set of axes that
are reported in MotionEvents by defining new axis constants.

The MotionEvent object is now backed by its C++ counterpart
to avoid having to maintain multiple representations of the
same data.

Change-Id: Ibe93c90d4b390d43c176cce48d558d20869ee608
2011-02-15 19:14:37 -08:00
Jeff Brown
04970d654d am 3392b8e2: am 4a2e478a: Merge "Flush Binder commands in ndk looper." into gingerbread
* commit '3392b8e23e7eb0275071af621802ed04c829c911':
  Flush Binder commands in ndk looper.
2011-01-16 16:58:57 -08:00
Jeff Brown
c70bed01ac Flush Binder commands in ndk looper.
Bug: 3258183
Change-Id: I943808d6297a442b84ec95643e88ceb125f8c0c6
2011-01-10 14:37:46 -08:00
Kenny Root
06ea4d65e8 Introduce NDK API for 64-bit assets
Assets were switched to using 64-bit all through the system, so switch
the NDK to using this new API as well.

Change-Id: I2817b11369db3a4dd504b839ef1a3a9780b83533
2010-12-13 12:02:19 -08:00
Kenny Root
ddb76c4644 Change assets to use 64-bit API
The asset system and supporting libraries were using off_t instead of
off64_t to access files larger than 2GB (32-bit signed). This change
replaces all off_t with off64_t and lseek64.

There is a new utils/Compat.h added for Mac OS compatibility.

Also fixed some size-related compiler warnings.

Bug: 3205336
Change-Id: I9097b3cb7a602e811fe52f245939d8975da55e9e
2010-12-08 11:21:30 -08:00