Commit Graph

54 Commits

Author SHA1 Message Date
Ethan Yonker 32f68a3c92 Add TW_IGNORE_MT_POSITION_0 touch flag
This fixes touch on the a11 when fastboot booting the image. We
are also adding event logging for ABS_MT_POSITION data which we
should have been logging before but for some reason we did not.

Change-Id: I1b38c31c716efdcbe48db4faa5d0cef97c91c58e
2014-12-29 16:21:57 +01:00
Kra1o5 0024e3826b Add support for custom kernel headers
Change-Id: I39fe4de8919e59dd75e8cb535fa0648948035c26
2014-12-17 11:47:33 +01:00
Ethan Yonker ac21cb5ae3 Fix loading of png images in custom themes
Change-Id: I7eebc474c025eda534adb04d061795623ebecdda
2014-12-12 15:21:52 +01:00
soyu d5a7c0edf1 add support unicode font not only ascii
need to define custom theme(include custom ttf files)
  in device tree :

  TW_CUSTOM_THEME := device/xxxx/yyyy/recovery/res

  For example:
  https://github.com/twrp/android_device_xiaomi_armani

Change-Id: I6bebdfbdd75c99bfe216a8c0789af63c6fe4b9de
2014-12-09 21:14:48 +01:00
Ethan Yonker 448c8dc4c1 Fix png graphics load / display on AArch64
This is mostly kang from AOSP resources.c for loading png files
into RAM, but for ease of compatibility we retained the older
gr_surface data types throughout and ensured that we retain
support for alpha blended png files.

Change-Id: Ieea552173d3bfe885460407be73088bbad75663f
2014-12-09 04:46:00 +01:00
Ethan Yonker bcc502cff9 Make TWRP compile for arm64
-Remove dosfstools for arm64 until we can make it compile
-Fix TW_USE_TOOLBOX flag to work again
-Fix symlinking and handling of sh when using mksh
-Fix legacy properties to find futex_wake function
-Fix libcrecovery to not use bsd_signal anymore
-Fix rules for building with regards to libcrecovery
-Update toolbox_recovery rules to compile tools in lollipop
-Fix a few compile errors specific to arm64

Testers report that TWRP does not boot on Nexus 9 and we fail to
get a shell for adb shell. At least it compiles without errors.

Change-Id: I286be8628defb60cc527b8a548c0bdfcb0ebb574
2014-11-12 11:03:50 -06:00
Ethan Yonker 5a95c3ff41 Disable custom theme and fix png loading
We will have to update the zip handling later. Now at least TWRP
boots up to the GUI.

Change-Id: I4182896eb095cab52fb0f1c9c20b6605e35677b9
2014-11-07 13:33:07 -06:00
Ethan Yonker 304f32fa98 Fix up old libminui to compile
Implement some needed updates to libminui to make it compile for
healthd. Note that res_create_multi_display_surface is not fully
implemented so healthd may still have issues with displaying some
graphics. Will update later when we are able to test these changes.

Change-Id: Ic1095a998f5dfe7e36a08384c86da28e0524a03f
2014-11-07 10:14:08 -06:00
Dees Troy f171e103a8 Revert "Make libminuitwrp compile"
This reverts commit a27d02fab9.

Change-Id: I62d143044749f101cd70fef048057f896e46c208
2014-11-06 22:20:20 +01:00
Ethan Yonker a27d02fab9 Make libminuitwrp compile
Odds are this is horribly broken, but we are not able to work on
it just yet.

Change-Id: I8cd12a6dba7957b1ccc1275b8d72c24797856db0
2014-11-06 10:24:42 -06:00
Vojtech Bocek 76ee903d84 Add support for TrueType fonts
* Keeps original font system in place
* Uses the same API as original font system:
   - You can render only one line at a time
   - You can only use one font and color for one gr_text* call
* Caches all rendered text, with a string cache limited to 400
  entries, then it trucates to 250, which results in memory
  usage hovering around 5-10MB

Change-Id: I36107b9dcd8d57bae4486fce8b8f64e49ef3d906
Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
2014-10-14 15:06:56 +02:00
Matt Mower 55c75cad80 Build block TWRP with RECOVERY_VARIANT
Enable TWRP to reside alongside other recoveries with the naming
convention: bootable/recovery(-flag). If TWRP resides at
bootable/recovery and a device does not specify RECOVERY_VARIANT, then
it will build like normal. If TWRP resides at bootable/recovery-twrp,
then its makefiles will only be parsed if a device specifies
'RECOVERY_VARIANT := twrp'. This prevents TWRP specific makefile
warnings/errors (notably, missing DEVICE_RESOLUTION) when another
recovery is being built.

Change-Id: I8f02fffcd79c309c7123b9428eedc69af02e126e
2014-09-03 10:53:37 -05:00
Ethan Yonker 3c4ac3bc32 Fix derp
Change-Id: Idf41990258361e612635980700fd694b11c1c625
2014-08-14 11:15:32 -05:00
Ethan Yonker 5742a40b87 Allow blacklisting input devices by build flag
Usage:
TW_INPUT_BLACKLIST := accelerometer
TW_INPUT_BLACKLIST := "accelerometer\x0agyroscope"

This can be used to fix touch input on devices where an input
device is breaking touch processing in TWRP.

We are using new line chars to separate multiple devices and in
the make file you specify the new line character with \x0a which
is the hex code in ASCII for a new line.

The new line character might be a bit of a pain to use as a
delimeter, but it is highly unlikely that an OEM will ever name
an input device with a new line character in the name.

Change-Id: I255136b7a686909a23e649918c661843153c2853
2014-08-14 10:05:40 -05:00
xNUTx cd56f8cb29 TW_SCREEN_BLANK_ON_BOOT will jolt the screen/touch driver.
If on the default settings the screen will only kick in to action
AFTER it has gone to sleep once and has been woken up again with a
key press, this will be needed to set to 'true' in the
BoardConfig.mk

The code was already there, Dees_Troy and I thought it would be
nice to make it a switch to control at compile time.

Change-Id: I5116a27afe9cba57122761c192ea3ee153d98162
2014-08-10 07:59:35 -05:00
Ethan Yonker b24caab14c Set font based on resolution if not set already
Change-Id: I6efaeb1c508c06513ac9ace7aa72a2eefa0cb1bb
2014-08-07 09:28:04 -05:00
Dees Troy 05d18c9a74 Stop memory management on blanking overlay graphics
This prevents a crash in TWRP when trying to blank
the screen on devices that are using overlay graphics.

Change-Id: I155868616ffa1b211e97be97e4abe8b03dad7ca0
2014-08-07 15:36:33 +02:00
Vojtech Bocek 03fd6c56fe Implement "take a screenshot" feature
* Like in android - press power+volume down, screenshots are saved
  in /sdcard/Pictures/Screenshots (if /sdcard is mounted) or /tmp

Change-Id: Iaefa15b11a1d5fdfac57d77388db1621f378a8d4
Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
2014-07-09 17:35:36 +02:00
Flemmard f4674619a2 minuitwrp: use a whitelist for the input device instead of a hardcoded ignore list
* use a whitelist for the input device to listen on, every other will be ignored

Change-Id: I1296a45ec3d5ca0bca2a9e2601b0710e2c030fde
2014-06-30 11:45:40 -05:00
Andrew Dodd bb687f4b13 minui: Do not return true from target_has_overlay() if MSM_BSP is not set
Since target_has_overlay() was not ifdefed with MSM_BSP,
it would return true on some devices even if MSM_BSP was unset,
breaking LPM and some other minui functions.

Change-Id: Ic6b524fa0b5e36fc9ffe67d53e2bf33e9d4fd2d3
2014-06-29 21:14:06 -04:00
Matt Mower fb1c4ffaaf Whitespace and minor code cleanup
This is by no means comprehensive, but is quite a bit better already.

Change-Id: Ibc8654a5dfb0eec39cbd0b64bdb52bb4fbfe2f7e
2014-06-04 09:13:37 -05:00
Dees Troy 62b75ab66a Update minui to support overlay graphics
Fix path in minuitwrp for includes

Change-Id: I9e9e5f67e8574cdcbc6f8873ceeb56eab71143ed
2014-05-02 16:51:52 +00:00
Vojtech Bocek 0b7fe504dc Add support for actions triggered by key combination
Change-Id: I9dfa7de40229f00412d63fc9c1eb3a809a6eb2e6
Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
2014-04-16 17:51:17 +02:00
Dees Troy b0425385b1 Fix overlay graphics detection
Change-Id: Ic1ef3f6a4e9c74efb07d8a0103543d124567f0d4
2014-04-03 00:10:03 +00:00
Ethan Yonker 4ee5ad751f Support Qualcomm overlay graphics in recovery
Change-Id: Ia75c34ab1a45b7c8802c902906198517aa3437d5
2014-04-01 11:13:58 -05:00
Dees Troy 31218ec952 Add word wrap to console output and fix scrolling in console
Change-Id: Ibcf89952ee1391350c715f1ec82cf0cdb9b0ca7d
2014-02-26 08:52:05 -06:00
Vojtech Bocek 971d318d34 Look also for buttons when checking if input device is mouse
* Some touchscreens have REL_* events

Signed-off-by: Vojtech Bocek <vbocek@gmail.com>

Change-Id: I332637ff58324895896ad09bf4ac08a2f127e49f
2014-02-20 21:44:32 +01:00
Dees Troy e492e27d77 Merge "Implement mouse cursor" into android-4.4 2014-02-07 19:39:53 +01:00
Dees Troy 50b24dd57c Merge "Add haptic feedback" into android-4.4 2014-02-07 19:38:55 +01:00
Vojtech Bocek 1fc30fc77b Implement mouse cursor
Signed-off-by: Vojtech Bocek <vbocek@gmail.com>

Change-Id: I66d6db7b3ed9cca50b469d125b36224332e06913
2014-02-07 12:37:13 -06:00
Vojtech Bocek 6c694b6f0b Disable alpha blending for non-transparent bitmaps
* The difference isn't as big as there are not many big non-transparent
  bitmaps in TWRP, on install screen on flo it is about 5-10ms better.
  Only place where the difference is noticable is keyboard, which is
  pretty big non-transparent bitmap, where it speeds up the render
  by ~40ms on flo.

Signed-off-by: Vojtech Bocek <vbocek@gmail.com>

Change-Id: I4c51ef957ae2a1829ada4eb566e9964f708efcf0
2014-02-06 20:38:33 +01:00
Samer Diab (S.a.M.e.R_d) 71e9b049c2 Add haptic feedback
Change-Id: I15d723f73c0b0bb4a40645d1c3f4c1c616f36998
2014-02-06 20:27:28 +01:00
Vojtech Bocek 1a4744a493 Disable alpha blending for fully opaque rectangles
* This makes the rendering several times faster, because the giant
  rectangle used as background no longer uses expensive blending
  calculations, and there are also many other big rectangles which
  don't need it (fileselector, ...).

* Results on hammerhead:
  - WITHOUT the patch - scrolling in fileselector on install page:

      I:render 67 ms, flip 6 ms, total 73 ms
      I:render 82 ms, flip 6 ms, total 88 ms
      I:render 81 ms, flip 6 ms, total 87 ms
      I:render 80 ms, flip 5 ms, total 85 ms

  - WITH the patch - scrolling in fileselector on install page:

      I:render 32 ms, flip 6 ms, total 38 ms
      I:render 16 ms, flip 6 ms, total 22 ms
      I:render 16 ms, flip 7 ms, total 23 ms
      I:render 18 ms, flip 3 ms, total 21 ms
      I:render 18 ms, flip 2 ms, total 20 ms

* On flo, the results are even more noticable - 160ms -> 40ms

Signed-off-by: Vojtech Bocek <vbocek@gmail.com>

Change-Id: I5685763ba21745d7cd93133adf5f0bcb4c9a581f
2014-02-06 19:57:03 +01:00
Ibrahim Awwal 2e9cb01bda Don't interpret ABS_MT_TOUCH_MAJOR == 0 as touch release
On n8013 at least, this event is sometimes/often sent on touch start which
causes touches to be randomly rejected and throws you back to the start screen.

Touch releases still work fine for me, since it sends ABS_MT_TRACKING_ID == -1
for that purpose.

Adds a flag TW_IGNORE_MAJOR_AXIS_0 to configure this behavior.

Change-Id: I14bb036a2c2d4ee676b642c3ab297c55bb6c2084
2014-01-04 12:38:26 -08:00
OliverG96 06b91e7965 crypto: Fix crypto dependencies for ICS/Samsung methods
- libmincrypt renamed to libmincrypttwrp that is an static library
- libjpegtwrp does not exist
- libfs_mgrtwrp is for JB decryption methods

This fixes making full builds when TW_INCLUDE_CRYPTO_SAMSUNG := true and TW_INCLUDE_CRYPTO := true are set.
Somehow typing make recoveryimage doesnt push the mentioned issue.

Change-Id: I7cad5db4f51152a1a8209e619b188ca88d7c74d1
2013-12-19 17:08:31 +00:00
Dees_Troy b7ecc09d93 Revert "Fix touch not working due to gr_fb_width returning 0 in some cases"
This reverts commit 70e1129612.
No longer needed after http://review.teamw.in/#/c/655/
2013-08-24 07:43:14 -05:00
Dees Troy 5111611121 Merge "graphics: update BOARD_HAS_FLIPPED_SCREEN function to work with 16bpp or 32bpp" into twrp2.5 2013-08-24 07:41:42 -05:00
Dees_Troy 70e1129612 Fix touch not working due to gr_fb_width returning 0 in some cases
Change-Id: Id5ce607a181110118ebc647fc07d387a7a3dc660
2013-08-11 13:47:26 +00:00
Dees_Troy 930bf01caf Remove libjpegtwrp and use CM provided libjpeg 2013-08-10 22:19:03 +00:00
Dees_Troy 8b7c1b7dec Remove unneeded touch code changes 2013-07-08 13:13:28 +00:00
Hashcode 232b9fd7ed graphics: update BOARD_HAS_FLIPPED_SCREEN function to work with 16bpp or 32bpp
Change-Id: I93391596eece6b08ecf2e54f443e9821573cb871
2013-07-03 11:19:17 -07:00
Dees_Troy d86400b598 Fix touch on some Samsung devices
Change-Id: I3e2a67979c60a8e9f37f46f4fb0b0682c56ec95b
2013-07-01 20:27:21 +00:00
Dees_Troy 3f23d9eeca Allow for more input devices 2013-05-03 21:04:05 +00:00
Dees_Troy 66fc8b5887 Tweak libs 2013-04-05 19:42:15 +00:00
Dees_Troy 2673cec07a Move all AOSP code out of recovery binary
Improves license compatibility between GPL and Apache

Change-Id: I2b165aa575bb6213af6b07936f99610c113443f0
2013-04-04 18:57:34 +00:00
Dees_Troy 70237dc675 Add 2 second pre-dim and bugfix blank timer
2 second predim code courtesy of bigbiff

Change-Id: I052ac422f78dc82c05f58c188587534b800b935a
2013-02-28 19:36:09 -06:00
Dees_Troy 86382ca223 Add build flag for custom graphics 2013-01-15 16:54:59 +00:00
Dees_Troy 9c74244421 Merge "Ignore bma150 in event handler" into jb-wip 2012-12-12 13:31:06 -06:00
Dees_Troy 07a3a74e9e Ignore bma150 in event handler 2012-12-11 15:13:21 +00:00
Hiemanshu Sharma acf6a9b4d9 minuitwrp: fix screen update issue 2012-11-21 11:28:36 -06:00