179 Commits

Author SHA1 Message Date
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
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
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
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
Andrew Hsieh
0482291f45 Fix typo
Change-Id: I58f863c4eb1eb4196d001c280027ab59bee51ce4
2012-12-19 11:21:38 +08:00
Andrew Hsieh
eba8254c8c Fix typo
Changed ANDROID_BITMAP_RESUT_SUCCESS -> ANDROID_BITMAP_RESULT_SUCCESS

Change-Id: I3d5525d7dacbf8f007e3230e1ca87b69245a96b1
2012-12-12 11:27:44 +08:00
Kenny Root
58ed5d748c am 768d9e1a: Merge "Correct executable bit for source files"
* commit '768d9e1a72ceee7d4a5f608776b87b62d6ce4a04':
  Correct executable bit for source files
2012-11-07 11:52:12 -08:00
Kenny Root
3a084af2e9 Correct executable bit for source files
Many media files and source code files were marked as executable in Git.
Remove those.

Also a shell script and python script were not marked as executable.

Change-Id: Ieb51bafb46c895a21d2e83696f5a901ba752b2c5
2012-11-07 10:27:31 -08: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
60b82263a1 move ndk headers to frameworks/native
Change-Id: I44e48b8993e8b574ae366b9e76629099154998a9
2012-03-23 14:59:35 -07:00
Mathias Agopian
7efec15fef add missing include
Change-Id: I7eb05f6cb6de170aeb3b72d28490cdcf46982d13
2012-03-23 14:57:16 -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
Dianne Hackborn
d96e3dfa02 Add xxhdpi; fix ActivityManager.getLauncherLargeIconSize() etc.
Change-Id: I519d6cdc527a402d93b98df17a64fc1da52ad598
2012-01-25 15:14:50 -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
Joe Onorato
44fcb83b38 Add a new ui mode for "appliance"
The idea is that this is a device which is more-or-less headless.  It
might have some limited interaction capabilities, but it's not something
that you want to rely on having.

Change-Id: Ib92f53a120bf83de781728011721a4859def7d9f
2011-12-15 16:16:14 -08:00
Jeff Brown
0475f82c95 am c339fe30: am be6ab576: Merge "Fix application launch shortcuts." into ics-mr1
* commit 'c339fe302bc5083f0a110569eec06676be511088':
  Fix application launch shortcuts.
2011-11-29 13:17:42 -08:00
Jeff Brown
6651a63834 Fix application launch shortcuts.
Improved quick launch bookmarks to support category-based shortcuts
instead of hardcoding package and class names for all apps.

Added a set of Intent categories for typical applications on the
platform.

Added support for some of the HID application launch usages to
reduce reliance on quick launch for special purpose keys.  Some
keyboard vendors have hardcoded launch keys that synthesize
"Search + X" type key combos.  The goal is to encourage them
to stop doing this by implementing more of HID.

Bug: 5674723
Change-Id: I79f1147c65a208efc3f67228c9f0fa5cd050c593
2011-11-29 12:17:22 -08:00
Glenn Kasten
2c42edf3c0 Merge "Remove obsolete NativeWindow_fromSurfaceTexture" 2011-11-15 15:25:38 -08:00
David 'Digit' Turner
dd00e734f3 NDK: ANativeActivity: Fix documentation for 'clazz' member.
As discussed on the android-ndk forum, it turns out that the
member named 'clazz' is really a global reference to the NativeActivity
instance. As such, it's really a handle to a VM object, not a VM class.

Ideally, we would rename it to 'activity', but this cannot be done
without breaking NDK source compatibility.

Change-Id: I82ca1549b35346a3eacf9e84c4c836387fc883a6
2011-11-08 14:18:11 +01:00
Glenn Kasten
809820e28b Remove obsolete NativeWindow_fromSurfaceTexture
Change-Id: I9351103929da515cb411fb2e7906bb9f27c4da20
2011-10-21 12:52:29 -07:00
Mathias Agopian
83b186a246 fix the float Rect in OpenGLRenderer to handle NANs
- we want functions like isEmpty() to return true if NANs are
involved in the Rect

- also clean-up the intersect familly of calls

- minor cleanup in the int32_t Rect as well

These played a role in http://b/5331198.

Bug: 5331198

Change-Id: I5369725ab482e4b83da9f1bd4cee5256e5de75b2
2011-09-19 16:50:07 -07:00
Jeff Brown
65fd251c39 Input system bug fixes, particularly for stylus.
Bug: 5049148

Finished stylus support, including support for indirect stylus
and mouse tools.

Added TILT axis.  When stylus tilt X/Y is available, it is transformed
into an orientation and tilt inclination which is a more convenient
representation and a simpler extension to the exiting API.

Touch devices now only report touch data using a single input
source.  Previously touch devices in pointer mode would report
both absolute touch pad data and cooked pointer gestures.
Now we just pick one.  The touch device switches modes as needed
when the focused application enables/disables pointer gestures.
This change greatly simplifies the code and reduces the load
on the input dispatcher.

Fixed an incorrect assumption that the value of ABS_(MT_)DISTANCE
would be zero whenever the stylus was in direct contact.  It appears
that the correct way to determine whether the stylus is in direct
contact (rather than hovering) is by checking for a non-zero
reported pressure.

Added code to read the initial state of tool buttons and axis values
when the input devices are initialized or reset.  This fixes
problems where the input mapper state might have the wrong initial
state.

Moved responsibility for cancelling pending inputs (keys down,
touches, etc.) to the InputDispatcher by sending it a device reset
notification.  This frees the InputReader from having to synthesize
events during reset, which was cumbersome and somewhat brittle
to begin with.

Consolidated more of the common accumulator logic from
SingleTouchInputMapper and MultiTouchInputMapper into
TouchInputMapper.

Improved the PointerLocation output.

Change-Id: I595d3647f7fd7cb1e3eff8b3c76b85043b5fe2f0
2011-08-19 15:02:26 -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
Romain Guy
b3a900d7cd Merge "Add notifyPixelsChanged() call to NDK unlockPixels()." 2011-07-28 16:26:08 -07:00
Jeff Brown
49754db5a3 Handle stylus buttons and tool types.
Added TOOL_TYPE_ERASER.

Refactored the InputReader to share more code between the
various input mappers that handle button states and to
simplify the accumulator implementations by having each
one only handle a single type of input.

Removed the concept of direct/indirect tool types from the API.
If we add it back, it should be done in a manner that is orthogonal
to the tool type itself, perhaps as a flags field on the pointer.
The device source may well provide sufficient information anyhow.

Change-Id: I811c22d95e8304269b6ee4f6d11a6b04f3cfc1b2
2011-07-25 20:04:18 -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
Alexandre Elias
17e5f4cc70 Add notifyPixelsChanged() call to NDK unlockPixels().
Without this call, the NDK bitmap methods don't work in
hardware-accelerated mode ( http://b/5017848 ).

Change-Id: Icae6975757c9c9e83c0e9fc132161aa3004f8f28
2011-07-12 18:08:10 -07:00
Jeff Brown
53ca3f13e7 Hover and stylus API cleanup.
Added missing setOnHoverListener method.
Removed BUTTON_STATE_ERASER.

Change-Id: I5d820d0a8e47fe5fd2d88e9fd9fc3fc6ce0dea0d
2011-06-27 21:35:59 -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
8a7d44e824 resolved conflicts for merge of 54cb63e2 to master
Change-Id: I5b741a1781e3f76c03fc1534ffce871117effd10
2011-06-02 16:44:52 -07:00
Dianne Hackborn
b96cbbd11c Add "tv" density for 720p screens.
Change-Id: I028969b007f2fceea66947d77a2ae31ef1d1a630
2011-05-27 13:40:26 -07:00
Dianne Hackborn
e2c7715c77 resolved conflicts for merge of bbca8133 to master
Change-Id: I81493674dceab848e41d380a77a37e5a9be06db6
2011-05-24 11:27:11 -07:00
Dianne Hackborn
e360bb6bd8 Add "television" mode.
Change-Id: Ida1fdb61b036a8b489dbeda196fb4bc82e651b2b
2011-05-23 15:11:08 -07:00