Commit Graph

419 Commits

Author SHA1 Message Date
Ethan Yonker f117962eb2 Make it backwards compatible with 4.4
Change-Id: I668604cddc8e8afbf78709f3f872bea4e9f4aa06
2016-08-25 15:36:13 -05:00
Ethan Yonker 34ae483e02 Update to 7.0
Change-Id: I621cc47352f7ac552d9602485825ae3a6f9ae516
2016-08-24 15:32:18 -05:00
nailyk 61c7c5c67e Gui: replace pow() function
The old pow function doesn't work for other power than 2
- replace pow function by a squared one

Solve the TeamWin/Team-Win-Recovery-Project#646 issue.

Change-Id: Id177300d45a7b49ff983795288434d910eb35c2a
2016-08-22 17:46:04 +02:00
Matt Mower 908dd25139 GUI: Use standard routine for auto-reboot
If 'reboot after install' is enabled, follow the standard reboot
routine to process 'No OS' and 'Install SuperSU' checks.

Since the system reboot routine is repeated several times, it has been
separated into its own routine.

Change-Id: I4c1882ecb8dc2d153ec2378b2e0973ab1a2a8278
2016-08-19 11:28:27 -05:00
Matt Mower 8dc25b7984 Fixup reboot after install variables
* Create correctly named data manager variable 'tw_install_reboot'
* Make configurable through Settings
* Remove closing tag space in theme files (not personal preference,
  but should match surrounding code style)
* Fix the "two presses needed to enable" issue for the checkbox on the
  install screen

Change-Id: I0ceb60b4888a672e2f0ecb5672b03cc86615621a
2016-08-19 11:09:01 -05:00
Matt Mower 9a2a20503c GUI: Add countdown & cancel to install auto-reboot
Provide a countdown from 5 sec for the automated reboot after install.
Include a cancel button to interrupt the process.

Change-Id: Ib5e1447918adfde45eba361c088800812b690890
2016-08-19 11:06:34 -05:00
Matt Mower bfccfb8822 Finish creating disable_free_space_check variable
* Create data manager variable for 'tw_disable_free_space'
* Make configurable through Settings
* Fix the "two presses needed to enable" issue for the checkbox on the
  backup screen
* No need to capitalize every word, but do specify precedes backup

Change-Id: Id436cef13e4ca9349618420aac03862ec4e3c35e
2016-08-19 10:35:10 -05:00
James Christopher Adduono c81de8c6c0 Optimize and reduce size of PNG files
Done using:
find -type f -name *.png -exec optipng -o7 -nc -fix {} +
(-nc is required as TWRP png lib can't handle color type changes)
find -type f -name *.png -exec advdef -4 -z {} +
(use Zopfli compressor on insane prefix to reduce size even more)

Total amount of bytes saved: 317,491

Change-Id: I545c678f71942e6ceb95acb631841ea7ef82a049
2016-08-04 17:40:42 +02:00
Matt Mower 786d734a41 Remove curtainClose() remnants
Change-Id: I6ae96b60d34fa4e4b23cd1e5a4fffff3d00451c7
2016-08-01 20:41:37 +02:00
Matt Mower 25036b75ff Remove unused identifier from NotifyTouch
The 'state' parameter in GUIAction::NotifyTouch() is used in the
function.

Change-Id: I0744c7aa1542d771dbd2916638fbdd53e9681f86
2016-08-01 20:40:58 +02:00
Matt Mower 76b8afc4be Move cursor after appending date to backup name
* Send the cursor to the end of the input text

Change-Id: Id4f20717134cd38188cc1107f73dcd6bb995f377
2016-08-01 20:38:36 +02:00
that 8323ab53ee gui: fix Enter key in terminal
Translating CR to LF was an old hack that breaks Enter in nano.

Change-Id: If259e8b133f2f56f4126a1fb68856bf014a2daae
2016-08-01 20:36:23 +02:00
bigbiff ce8f83c48d ADB: Add adb backup for TWRP.
Functionality for client side to backup
tar and image streams over adbd to the client under backup.ab.

Using adb backup on the client side you can backup the partitions
TWRP knows about.

On the client side you can do the following:
adb backup -f <filename> --twrp <options> where options are
--compress: compress data
system: backup system
cache: backup cache
data: backup data
boot: backup boot
etc for each partition.

You can string multiple options,
i.e. adb backup -f <filename> --twrp --compress cache system data

adb backup in TWRP will take any option corresponding
to TWRP fstab partitions, e.g. efs boot as well.

If you do not specify the filename with the -f option,
adb will backup your data to a filename backup.ab on the client.
You can then rename the file and encrypt it with desktop tools.

If you don't want to use command line arguments:
adb backup --twrp

will bring up the gui and allow you to choose partitions
from the backup page.

To restore the backup use the following convention:
adb restore <filename>

Structures are used to store metadata in binary inside
of the file itself. If the metadata structure is modified,
update the adb version so that it will invalidate older
backups and not cause issues on restore. When restoring,
we currently do not support picking specific partitions.
It's all or nothing.

Change-Id: Idb92c37fc9801dc8d89ed2a4570e9d12e76facf8
2016-07-31 22:20:18 -05:00
Alex Kalles c62332beeb Improve greek translation
Some words are too big for the boxes

Change-Id: I48c2361dd9c7937361c3fb63b9bd8834c57fe0e0
2016-04-28 17:32:45 +01:00
AndroPlus f09a4fbc37 Languages: Add font for Japanese
Japanese font is NotoSans which is licensed under SIL OFL.

Change-Id: I6f50edbca72c7e58ce0e96aee98a0303bd1a4254
2016-04-28 17:15:27 +01:00
AndroPlus a9a4b50fa6 Languages: Update Japanese translation
Change-Id: I4ec685a9d70173c1e008beb61cdead6af5c2aae0
2016-04-28 17:14:56 +01:00
magdeoz b146a62093 Update spanish translation
Change-Id: I4591a5fae396e7a993d4f70d80a1d1f3b2a83654
2016-04-09 22:46:25 +02:00
Wechy77 b894cd2a89 Update hungarian translation
Change-Id: Iabd66596c0d1b83935c4adc4ac048f3881284269
2016-04-06 03:46:52 +01:00
thecrazyskull 30f0c228db translate install reboot option to dutch
Change-Id: I23b2c44afca5c903becd201503f81766828c9304
2016-04-05 11:17:05 -04:00
Alex Kalles 2e21597212 Greek Translation from the updated en.xml
Change-Id: I5cd1b9c394c2777503e5567aaaa01210cfdb4caa
2016-04-04 20:30:08 +01:00
Sultan Qasim Khan 14138d9f74 gui: don't mix up display value with actual value
In the case of password entry, the two differ. Password entry was broken
by the earlier commit entitled "Improve input box text handling" because
it started using the displayValue as the actual value, even in cases where
they differ because of a mask value.

Change-Id: Iaf5a67e1d928f34595962a1f1b80eebb64e8b493
2016-04-04 08:26:33 -05:00
SlimShadys b85189658a language: add 2 new strings in it.xml
Change-Id: I45a6a75d2b9332e523a7f61f19594c4029665ed7
2016-04-04 14:02:41 +01:00
SevenMaxs f7b048c0c4 languages: add 2 new strings for RU
Added translation Reboot Option and minor fix for Russian localization.

Change-Id: Ibeade0ce85ac65daf68dfd6b085a32148f66d1cb
2016-04-04 14:02:14 +01:00
thecrazyskull c53323af21 fix typo
Change-Id: I65f16530565c4b510274c72227a5f1483519a677
2016-04-03 10:02:00 -04:00
Dees Troy eac1412e82 Merge "language: add 2 new strings to DE" into android-6.0 2016-03-31 21:31:42 +02:00
z31s1g ca859576b3 language: add 2 new strings to DE
Change-Id: Ic9d51ddb7a8e47c62399d2e3101e788994276104
2016-03-31 21:28:33 +02:00
Dees Troy 325e4dfa24 Merge "languages: add Reboot Option translation" into android-6.0 2016-03-31 21:28:11 +02:00
Daniel Sikorski f4d1686a5f languages: add Reboot Option translation
Change-Id: I33acec5b4d0a371978bf2a6ab3beb26d0d18400f
2016-03-31 20:08:38 +01:00
Ethan Yonker ec0b4320d4 HACK: fix input focus on terminal
This makes the terminal grab focus no matter what on SetPageFocus
which isn't ideal but it's unlikely that any other visible input
elements will be on the page with a terminal anyway.

Credit _that for pointing me in the right direction for this fix.

Change-Id: I2b0e6fc1169521f58e863c58f7ef3578413dfb21
2016-03-31 14:07:59 -05:00
bigbiff a869fc79bc TWRP Install Reboot Option
This is a simple patch to allow users to reboot
after installation of zip queue. Current timeout
is 5 seconds before reboot.

Change-Id: I1a18cbf7025086e35031ab7241b330babebb8343
2016-03-31 13:34:49 -05:00
Ethan Yonker 472f506817 Improve progress bar handling for backup / restore / image flash
The progress bar will now be updated during image backups, restores
and during image flashing (except for sparse images which will require
significant changes to libsparse, and except for mtd nand using
flash_utils).

The progress bar will now be updated mid-file for file systems (tar) so
the user will see changes even during large file backup / restore.

Add a new progress tracking class to simplify handling of progress bar
updates. The class will only update the progress bar 5 times a second to
reduce the CPU load from updating the GUI frequently which does affect
backup times.

Change-Id: Iff382faef3df1f86604af336c1a8ce8993cd12c5
2016-03-31 15:44:24 +01:00
Andreas Blaesius d4f30822a0 languages: fix and improve german translation
Change-Id: I7c5a0fbb1853836cfb5a7d1dfbbeb5f5613572b7
2016-03-31 15:37:27 +01:00
dadi11 67940a2a28 languages: add Polish translation
translated by @dadi11 & @linar10

Change-Id: I09a550c3ee99d44c4ada0bb7d71eb763471c7fda
2016-03-31 15:36:41 +01:00
Andreas Blaesius 0d2a82209b twrp: update Dutch translations
Change-Id: Ibcad999a1276b4519fc2b104b458ee77c984dc8b
2016-03-31 15:25:09 +01:00
Dees Troy f78cc2c4eb Merge "recovery: czech translation" into android-6.0 2016-03-31 16:23:51 +02:00
SevenMaxs d905c8d5f4 Update & Fix ru.xml
Updating and minor fix of the translation for Russian localization.

Change-Id: Ic68e0580a12521e71a8da926901a30a31489a079
2016-03-31 15:19:49 +01:00
Andreas Blaesius 6e64e8ee0f recovery: update italian translation
Translated by: Death Mask Salesman

Change-Id: I87f1f4417689b62c171264bfc05bf58e2ddfea03
2016-03-31 15:16:36 +01:00
Diegool c17f5f3577 gui: add italian translation
Change-Id: Ia0bf0a3e1831016a0a418095356e236d55b07fe6
2016-03-31 15:03:18 +01:00
Wechy77 e9d3fc280f TWRP: hungarian translation
add more strings
and fixes my mistakes in crowdin

ps2 remove whitespace

Change-Id: If79e61fba5c1b2e54be29286b23a1b418095b07c
2016-03-31 15:01:33 +01:00
Ethan Yonker 4f74d14f8c Stop loading languages for the splash screen
We don't translate anything for the splash screen currently so
this will slightly reduce startup times and prevent the code from
running when it's not needed.

Change-Id: I8a8e8be5247d8e8b148db578c12bce5d370123a8
2016-03-31 08:10:40 -05:00
Ethan Yonker 86404bda2c Stop trying to load /script/ui.xml
I think this feature was used way back in the very early days of
TWRP 2.0 on the Kindle Fire and has not been used since. I see no
reason to keep it around for now and we can always reinstate it
later if for some reason we need this feature again.

Change-Id: Ie9f3e5db7190732f813ae1e152aab2d85a4ca98c
2016-03-31 08:01:12 -05:00
Ethan Yonker a5db7121ab Improve input box text handling
Change-Id: I79cfaac1adf85d1ee5514bf5266930823c1a15ff
2016-03-29 20:05:35 +01:00
that 6a89459ec1 gui: rewrite theme loading code
- Reduce code duplication for parsing of include files
- Fix crash when styles and templates from included files are referenced
- Fix bug with path concatenation if more than one file is included

Change-Id: I06cd720188df272180fb359097afd73a85952fa8
2016-03-29 19:38:30 +01:00
that b240f4a6a3 gui: fix font scaling for zip themes
All fonts were extracted to /tmp/extract.bin which was deleted after
the initial load, so reloading for scaling failed.

- extract fonts to /tmp with original name and don't delete them
- minor code cleanup

Change-Id: If8a0f657a7ef4c418fd5cc8550a24de44a38f303
2016-03-17 21:59:26 +01:00
Andreas Blaesius 9023b1c629 recovery: czech translation
Uploaded on XDA from XDA-User "kodein"
http://forum.xda-developers.com/showpost.php?p=65371227&postcount=1400

Change-Id: I6c3c4fe90b91a21400b11541f3895d92cc80ea1d
2016-03-05 13:58:23 +01:00
Matt Mower 64ffe730a6 Unix file endings and remove execute permission
Change-Id: Iceaae3f7f20c3c6f23da807786b4cf4739c887c9
2016-02-29 17:14:17 +01:00
Ethan Yonker 07926a3845 Fix OEM compile
Change-Id: I39218f2485a2c2c95f0e400c31356bedc4973f6c
2016-02-19 03:58:06 +01:00
Sultan Qasim Khan 7a48a664fd patternpassword: update large grid password scheme
CM13 and up no longer use the two method scheme.

Change-Id: I21154becb5d7e77a54a5a07e649fe64829173a01
2016-02-17 22:45:21 +01:00
Andreas Blaesius 455a0ede03 twrp: translations: formatting and fix Turkish language file
Change-Id: I3159a2a0c37589f9472aba83b699840356da33a7
2016-02-05 20:55:56 +01:00
Matt Mower b26c1167fc GUI: Set brightness after gr_init()
On at least one device I've tested (htc msm8960), setting the
brightness after gr_init() is necessary for the splash to show.

Note that at this point in the boot process, the settings file has
not yet been read, so tw_brightness has its default value of max
brightness. When settings are finally loaded, the correct brightness
is loaded for the GUI.

Change-Id: Ifc58c1dc80ed9e6f6b2a269a9bb6764038626c84
2016-02-05 12:18:55 -06:00