Commit Graph

37 Commits

Author SHA1 Message Date
Ethan Yonker
751a85e759 Allow for X and Y offsets in GUI
These can be used to center a lower resolution theme onto a
higher resolution screen. May be useful for Nexus 9 unless or
until we decide to do a 1536x2048 theme or on devices like the
Moto 360 and LG G Watch R.

The build flags will only affect the stock theme. If a custom
theme wishes to apply an offset, it can be done by setting
tw_x_offset and / or tw_y_offset in the variables section of the
XML.

Change-Id: I2390769ed861b96a4a3bb8a0f06d9021ec91b6b9
2015-01-09 23:37:04 +01:00
Ethan Yonker
0d47eb5686 Improve GUI handling of zip flashing
- change the page sooner so that users cannot activate the slider
  twice
- improve GUI messaging if a zip requests a cache wipe
- move update of the file count to the end so it is less visible
  to the user (e.g. during a cache wipe the counter should not
  read 0)

Change-Id: I5d478f07effe61ca37f3521a77c9e9243a9cb692
2015-01-09 23:07:25 +01:00
Ethan Yonker
96af84a409 Allow flashing of images via the GUI
- Use the Images... button in the lower right of the zip install
  page
- Unify image flashing functions between restore and image flash
- boot and recovery partitions are flashable by default
- use fstab flag flashimg=1 or 0 to override defaults
- file system partitions are currently not flashable

Change-Id: I822dc446030543c55d2153e219d67a1292374ffc
2015-01-09 23:07:07 +01:00
that
7d3b54f3c2 gui: fix action threading if background thread is busy
When the background thread is already running and we have at least one
threaded action in the list, we should not run any non-threaded actions
before ignoring the threaded action and following ones - it might cause
invalid state variables to be set. Run or ignore the whole list in the
background thread instead.

Change-Id: Ie634105b80f038893898a21539886bd757eb47ce
2015-01-09 22:52:51 +01:00
that
c608548633 Run some actions in a separate thread
Some actions need to be threaded so we will run those in a
separate thread and deny requests to thread more actions if new
requests come in while a thread is already running.

Change-Id: I966c538e67860a6d8fe556e5a2eb7f7d1a987e74
Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
2015-01-09 22:12:43 +01:00
Ethan Yonker
24e7eb73ce Thread openrecoveryscript action to properly display action page
The action page fails to display properly during ORS processing
unless we thread the ORS action. Based upon the work done in this
patch set by _that:
https://gerrit.omnirom.org/#/c/11226

Change-Id: I6dac790ac26d9b3a02df778516fea011d67aea70
2015-01-04 19:41:10 -06:00
that
cc8ddca9bd fix adb sideload
- "Cancel" button handling requires another thread
- simplify handling of child pid
- merge duplicated code for reinjecting TWRP after installation
- fix error that showed on host PC after sideload finished
- fix problem where adbd sometimes does not stop correctly

Change-Id: I536877f024b606756c6a3289c6ddfdba423a60d6
2015-01-03 22:34:48 -06:00
that
3f7b1aced8 gui: Move action functions to function pointer map.
This allows the functions to be more readable and make
doActions readable.

Patch set 5: gui: remove threading in GUIAction

Multiple actions were started in another thread that was joined
immediately after starting it, so the input thread was blocked anyway.

Selected single actions were started in their own thread, but this
caused bugs like being able to install the same package twice in
parallel by quickly swiping the slider twice.

Change-Id: I28adadaedd032efc7bff3aaa48e659627aa3a3b3
2014-12-30 11:30:13 +01:00
Ethan Yonker
738be7a3ff Use one mizip for all
The new minzip did not compile in older trees due to needing
mmap64. For older trees we will just use mmap instead. Remove all
files and code pertaining to minzipold. Updater should now build
properly in older trees as well.

Eliminate use of PLATFORM_VERSION in favor of PLATFORM_SDK_VERSION
which should be more consistent and reliable.

Change-Id: I38d2b604a73d1b17a2072c7d60e990b81ece0c10
2014-12-10 11:54:02 -06:00
Vojtech Bocek
18d7c98688 Add possibility to use images as background or handle of slidevalue
* Add tag <resource background="x" handle="y" handlehover="z" />
  to the slidervalue object.
* All images are optional, e.g. you can use just handle or just
  background image or no images whatsoever

Change-Id: Ie0fee92965c6e883c4e532732756008dcc9e385e
Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
2014-08-07 15:37:43 +02:00
Ethan Yonker
bf2cb1c4d8 Color in the console
Allow each gui_print command to specify a color
Change LOGERR to use the error color
Theme should specify colors for error, warning, and highlight

Change-Id: Ie8ece34111f604e25fcb79e5b731cd4e61038ff9
2014-07-09 15:46:35 +02: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
31218ec952 Add word wrap to console output and fix scrolling in console
Change-Id: Ibcf89952ee1391350c715f1ec82cf0cdb9b0ca7d
2014-02-26 08:52:05 -06:00
Ethan Yonker
c3120d41b8 Add capslock support to keyboard
Change-Id: I4be3849ff0485536575395d798aa5edbe12651a7
2014-02-17 08:11:14 -06:00
Vojtech Bocek
072205626c Cache results of GUIObject::isConditionTrue()
Signed-off-by: Vojtech Bocek <vbocek@gmail.com>

Change-Id: Ia50f7c365b2dc0a65ee046bb42972e3594264878
2014-02-12 19:19:32 +01:00
Vojtech Bocek
ede51c528e Conditional -> GUIObject and make all gui objects children of GUIObject
Signed-off-by: Vojtech Bocek <vbocek@gmail.com>

Change-Id: Ic0a7d6354dabe5919b83942f2f1aa0715625e522
2014-02-12 18:30:41 +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
Samer Diab (S.a.M.e.R_d)
71e9b049c2 Add haptic feedback
Change-Id: I15d723f73c0b0bb4a40645d1c3f4c1c616f36998
2014-02-06 20:27:28 +01:00
Dees Troy
3be70a897e Update licenses to all match 2013-10-22 14:25:12 +00:00
Vojtech Bocek
6041a78f8f Add conditions support to GUIImage
Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
2013-10-11 14:41:39 +02:00
Dees Troy
b21cc64ca8 Pull ROM info from build.prop for backup names
Change-Id: I7847fca22b5d4f0a35da41625b15bd677a1e9768
2013-09-12 09:11:13 -05:00
Dees Troy
b7ae098e21 Kang in older minzip for building in CM9 & CM7
CM7 and CM9 do not have libselinux needed in the newer minzip.
2013-09-10 20:47:46 +00:00
Vojtech Bocek
fafb0c541b Unify indentation and little clean-up in TWRP files
Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
2013-08-24 07:56:48 -05:00
Vojtech Bocek
85932344cd Add new SliderValue GUI widget
Signed-off-by: Vojtech Bocek <vbocek@gmail.com>

Change-Id: Ic5d44314f501341140dd7059d1cb753341f5844c
2013-04-04 18:59:08 +00:00
Dees_Troy
a13d74fc95 Add partition list GUI element
Add partition list GUI element and update backup, restore, mount,
storage selection, and wipe sections of GUI and partition manager
code to reflect the new GUI element. Update ORS engine to handle
new backup and restore setup.

Fix a bug with decrypt.
Add 1080x1920 layout.

Change-Id: Iaa2f44cb707167e66f935452f076ba00e68a2aa4
2013-03-30 08:56:39 -05:00
Dees_Troy
146d72a739 Remove mutex from file seselector
mutex would, in some rare cases fail to lock and cause a freeze
of the GUI.

Also restored some code that was removed before and should not
have been removed to fix a bug with folder selection where you
select the same file or folder twice (e.g. select a backup on the
restore page, press back, then select that backup again.)
2013-03-11 17:46:33 +00:00
Dees_Troy
4622cf9f52 More file selector fixes
Fix a freeze that occurs when you move or delete a file in the
file manager
Make file sort buttons work again

Change-Id: Ifcb68edf3c29c475946d538748729485d0840842
2013-03-04 19:10:37 +00:00
Dees_Troy
c0583f54e4 Fix file selector crash
Sometimes a var change event came in while the file selector was
being rendered. Changes to the mFolderList or mFileList vectors
sometimes resulted in a crash. This patch set moves the
GetFileList call to the Render function to prevent the vectors
from changing while the render is taking place.
2013-02-28 11:29:36 -06:00
Dees_Troy
58f5cf0ab5 Copy fast scroll feature to listbox 2013-02-27 22:21:41 +00:00
Vojtech Bocek
7cc278bb99 Add fast scroll bar to fileselector
Also fix build problems with libblkid in CM7

Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
Change-Id: I1cd4573e25b247171e4bd8cc05b70543f897a454
2013-02-27 21:59:21 +00:00
Dees_Troy
eead985c57 Update listbox code 2013-02-15 14:31:58 -06:00
Dees_Troy
e7585ca9b5 Add highlight to file selector 2013-02-15 11:42:29 -06:00
Dees_Troy
1a7a6675ea Add button highlight 2013-02-15 09:42:35 -06:00
Dees_Troy
30b962eb51 Add keyboard key highlight 2012-10-19 20:51:12 -04:00
Dees_Troy
4d12f969b8 Add ability for buttons to have highlights on touch 2012-10-19 13:13:15 -04:00
Dees_Troy
657c309486 Zip install works again 2012-09-10 20:32:20 -04:00
Dees_Troy
51a0e82eb2 TWRP-ify AOSP code
Pull in most TWRP sources
Stub out partition management code
Make it compile -- probably will not boot
Kind of a mess but have to start somewhere
2012-09-05 15:24:31 -04:00