Commit Graph
6437 Commits
Author SHA1 Message Date
Tianjie XuandGerrit Code Review b4bc57ed39 Merge "Move Image/ImageChunk/PatchChunk declaration into header files" 2017-08-19 04:21:05 +00:00
Tianjie Xu 57dd961995 Move Image/ImageChunk/PatchChunk declaration into header files
1. Move the declaration of the Image classes to the header file to make
testing easier.
2. Also move rangeset.h to bootable/recovery to allow access in imgdiff.

Test: recovery component test
Change-Id: I68a863e60a3f2e7ae46ee48f48eb15391f5f4330
2017-08-18 17:56:22 -07:00
Tianjie Xuandandroid-build-merger 8a913dfaad Merge "update_verifier now logs to kmesg" am: f7ad94313d am: 473606847a am: 8c9c22a3a9 am: 14b3f5e5cc
am: f579907b8a

Change-Id: I4854759427257b18ecb13819c22d95ebfb93b5a8
2017-08-17 19:32:31 +00:00
Tianjie Xuandandroid-build-merger f579907b8a Merge "update_verifier now logs to kmesg" am: f7ad94313d am: 473606847a am: 8c9c22a3a9
am: 14b3f5e5cc

Change-Id: Ie5ac1c1604669563e2bb7be550e5b0c5945f5d3a
2017-08-17 19:29:59 +00:00
Tianjie Xuandandroid-build-merger 14b3f5e5cc Merge "update_verifier now logs to kmesg" am: f7ad94313d am: 473606847a
am: 8c9c22a3a9

Change-Id: I2e9d3883edb4de803924ff127cf876cc1f6dd485
2017-08-17 19:26:35 +00:00
Tianjie Xuandandroid-build-merger 8c9c22a3a9 Merge "update_verifier now logs to kmesg" am: f7ad94313d
am: 473606847a

Change-Id: I90f254955823bc815d96bf94ae1b2f37c2b0a44a
2017-08-17 19:22:59 +00:00
Tianjie Xuandandroid-build-merger 473606847a Merge "update_verifier now logs to kmesg"
am: f7ad94313d

Change-Id: I24438ea3f7975608358cf676606dc54b98e7092a
2017-08-17 19:19:32 +00:00
Tianjie XuandGerrit Code Review f7ad94313d Merge "update_verifier now logs to kmesg" 2017-08-17 19:16:11 +00:00
TreeHugger RobotandAndroid (Google) Code Review 462a7eed46 Merge "Import translations. DO NOT MERGE" 2017-08-17 12:15:41 +00:00
Bill Yi e332c5ad0e Import translations. DO NOT MERGE
Auto-generated-cl: translation import
Exempt-From-Owner-Approval: translation import

Bug: 64680434
Change-Id: Ie356071f322238a5fb3a4610d2a79141c9aa9377
2017-08-17 00:34:01 -07:00
Tao Baoandandroid-build-merger 78c08cf6da screen_ui: Fix a case that may truncate the last char. am: 2cf6fe2ced
am: 96210f88ce

Change-Id: I8396ade4136e6554ced169ad503b11599a37c57c
2017-08-17 04:57:40 +00:00
Tao Baoandandroid-build-merger 4af9235dc1 screen_ui: Word-wrap menu headers. am: ee6fefd2f2 -s ours
am: 0a7f4d4f71

Change-Id: I379cbd56489a7cba1279a88841f0c001cb37790c
2017-08-17 04:57:35 +00:00
Tao Baoandandroid-build-merger 96210f88ce screen_ui: Fix a case that may truncate the last char.
am: 2cf6fe2ced

Change-Id: Icb478835c9ad403cee686176c24d74cad4c7a0c3
2017-08-17 04:33:25 +00:00
Tao Baoandandroid-build-merger 0a7f4d4f71 screen_ui: Word-wrap menu headers.
am: ee6fefd2f2  -s ours

Change-Id: I92adb84d393433db89bb267c8b049fb1a191bfdb
2017-08-17 04:33:22 +00:00
Tao Baoandandroid-build-merger a0c3b1392e Merge "screen_ui: Fix a case that may truncate the last char." am: 2e99c38cfd am: 151126360e am: 228a2f2a37 am: 7f7d9b2f37
am: fbd7429ca3

Change-Id: I3533d4e2c9c242577e8cb05a3590649c3d2697de
2017-08-17 02:36:03 +00:00
Tao Baoandandroid-build-merger fbd7429ca3 Merge "screen_ui: Fix a case that may truncate the last char." am: 2e99c38cfd am: 151126360e am: 228a2f2a37
am: 7f7d9b2f37

Change-Id: I460893bd4661d4338d482b3f66a2371458228acf
2017-08-17 00:53:39 +00:00
Tao Baoandandroid-build-merger 7f7d9b2f37 Merge "screen_ui: Fix a case that may truncate the last char." am: 2e99c38cfd am: 151126360e
am: 228a2f2a37

Change-Id: I5c672cbf0171be019f7240135f9cf6d26e68de9f
2017-08-17 00:48:48 +00:00
Tao Baoandandroid-build-merger 228a2f2a37 Merge "screen_ui: Fix a case that may truncate the last char." am: 2e99c38cfd
am: 151126360e

Change-Id: Id7117e58e1353ce3e9929908a4de0e8f6f8fe1d2
2017-08-17 00:44:08 +00:00
Tao Baoandandroid-build-merger 151126360e Merge "screen_ui: Fix a case that may truncate the last char."
am: 2e99c38cfd

Change-Id: I948a78eb97fbc098610d3410f126843e360e5f65
2017-08-17 00:42:39 +00:00
Tao BaoandGerrit Code Review 2e99c38cfd Merge "screen_ui: Fix a case that may truncate the last char." 2017-08-17 00:16:04 +00:00
Tao Bao 2cf6fe2ced screen_ui: Fix a case that may truncate the last char.
ScreenRecoveryUI::DrawWrappedTextLines() should be called with
kMarginWidth only. Because it's using a line limit of text_cols_,
which is unaware of kMenuIdent.

Bug: 64293520
Test: No missing char with long header text.
Change-Id: Ib4d08de2c56473a483ff9964eb6cec31f8a74c9a
(cherry picked from commit 13aa4a902b)
2017-08-16 17:04:53 -07:00
Tao Bao 13aa4a902b screen_ui: Fix a case that may truncate the last char.
ScreenRecoveryUI::DrawWrappedTextLines() should be called with
kMarginWidth only. Because it's using a line limit of text_cols_,
which is unaware of kMenuIdent.

Bug: 64293520
Test: No missing char with long header text.
Change-Id: Ib4d08de2c56473a483ff9964eb6cec31f8a74c9a
2017-08-16 13:38:17 -07:00
Tao Bao ee6fefd2f2 screen_ui: Word-wrap menu headers.
This CL adds ScreenRecoveryUI::DrawWrappedTextLines() to better handle
long menu header texts. It does a word wrap at spaces, if available.
This avoids fixed-length menu headers being truncated on small screens.

Bug: 64293520
Test: On bullhead, boot into recovery with --prompt_and_wipe_data, and
      check the prompt texts.
Change-Id: Ia22746583516dd230567a267584aca558429395e
(cherry picked from commit 2bbc6d642d)
2017-08-16 11:03:31 -07:00
Bill Yiandandroid-build-merger 1c568e3342 Import translations. DO NOT MERGE am: 20fa1a92cc -s ours
am: 91487964b0  -s ours

Change-Id: Ic68759c25fba8d762db9b09e8cf2cb1a161dc43e
2017-08-16 15:48:33 +00:00
Bill Yiandandroid-build-merger 91487964b0 Import translations. DO NOT MERGE
am: 20fa1a92cc  -s ours

Change-Id: I2849c371f53a02857ec9d14a7565def9130305ea
2017-08-16 15:44:34 +00:00
Tao Baoandandroid-build-merger 4e279cf5d7 Merge "screen_ui: Word-wrap menu headers." am: 162b92323b am: 623bac4ed9 am: ae0af37111 am: f1397b597a
am: 5cfb65af51

Change-Id: I08997dedf6684cfe80f29e4f329aca226c00241e
2017-08-16 05:19:26 +00:00
Tao Baoandandroid-build-merger 5cfb65af51 Merge "screen_ui: Word-wrap menu headers." am: 162b92323b am: 623bac4ed9 am: ae0af37111
am: f1397b597a

Change-Id: Iaccb1c1f1b8eeb5c226f51daaca95403fd6aa21d
2017-08-16 05:16:25 +00:00
Tao Baoandandroid-build-merger f1397b597a Merge "screen_ui: Word-wrap menu headers." am: 162b92323b am: 623bac4ed9
am: ae0af37111

Change-Id: Ibb4a439d7a864e8fc44b06cad66a07f18f3376f7
2017-08-16 05:13:56 +00:00
Tao Baoandandroid-build-merger ae0af37111 Merge "screen_ui: Word-wrap menu headers." am: 162b92323b
am: 623bac4ed9

Change-Id: If8d200cd487aed9ee5eedbe831e1436e4c3551da
2017-08-16 05:10:55 +00:00
Tao Baoandandroid-build-merger 623bac4ed9 Merge "screen_ui: Word-wrap menu headers."
am: 162b92323b

Change-Id: I93c959422c5b56a15875580159ecfc1a1d44087d
2017-08-16 05:07:55 +00:00
Tao BaoandGerrit Code Review 162b92323b Merge "screen_ui: Word-wrap menu headers." 2017-08-16 05:02:05 +00:00
Bill Yi 20fa1a92cc Import translations. DO NOT MERGE
Auto-generated-cl: translation import
Exempt-From-Owner-Approval: translation import

Bug: 64712476
Change-Id: I7e9049129d9a886cac53a1f6438d9c733fb3d3d8
2017-08-15 20:14:00 -07:00
Tao Bao 2bbc6d642d screen_ui: Word-wrap menu headers.
This CL adds ScreenRecoveryUI::DrawWrappedTextLines() to better handle
long menu header texts. It does a word wrap at spaces, if available.
This avoids fixed-length menu headers being truncated on small screens.

Bug: 64293520
Test: On bullhead, boot into recovery with --prompt_and_wipe_data, and
      check the prompt texts.
Change-Id: Ia22746583516dd230567a267584aca558429395e
2017-08-15 15:10:21 -07:00
Tianjie Xu a009ce05e2 update_verifier now logs to kmesg
Set up update_verifier logging to be written to kmsg; because we may
not have Logd during boot time.

Bug: 64713327
Test: logs show up in `adb shell dmesg`
Change-Id: If02f460bda121cd3e9062bc0e08107c6da66492c
2017-08-15 18:57:17 +00:00
Tianjie Xuandandroid-build-merger 4de77886e4 Merge "Add a new PatchChunk class in imgdiff" am: 11214d9062 am: 5bde1d9ef8 am: 96b490acec am: bfd3123a6a
am: cc41fc4384

Change-Id: I92156cbe77678253265feea4288ac96bfed486d9
2017-08-14 17:42:27 +00:00
Tianjie Xuandandroid-build-merger cc41fc4384 Merge "Add a new PatchChunk class in imgdiff" am: 11214d9062 am: 5bde1d9ef8 am: 96b490acec
am: bfd3123a6a

Change-Id: I63526e65325b53afd630343a6a55bbca39f1b74f
2017-08-14 17:38:30 +00:00
Tianjie Xuandandroid-build-merger bfd3123a6a Merge "Add a new PatchChunk class in imgdiff" am: 11214d9062 am: 5bde1d9ef8
am: 96b490acec

Change-Id: I9656f313d5d3746ac9c9ecd98311b88d8754b3e1
2017-08-14 17:34:57 +00:00
Tianjie Xuandandroid-build-merger 96b490acec Merge "Add a new PatchChunk class in imgdiff" am: 11214d9062
am: 5bde1d9ef8

Change-Id: Iccd45b9c2673237a0e8775d9527eb35f0aa2b869
2017-08-14 17:31:26 +00:00
Tianjie Xuandandroid-build-merger 5bde1d9ef8 Merge "Add a new PatchChunk class in imgdiff"
am: 11214d9062

Change-Id: Ic2d4b218b36ace3dd1d49be1d17adeaf2d37b108
2017-08-14 17:26:56 +00:00
Tianjie XuandGerrit Code Review 11214d9062 Merge "Add a new PatchChunk class in imgdiff" 2017-08-14 17:21:16 +00:00
Tao Bao f2be3bd74a wear_ui: Expose menu_unusable_rows via Makefile var.
This variable is useful on small screens (e.g. on watches) to handle
long menus. We should have better way to handle this value smartly.
Prior to that, expose the value to be overridable by using the generic
wearable UI module (librecovery_ui_wear).

Bug: 64307776
Test: Define the variable, build and boot into recovery image and check
      the UI menu.
Change-Id: I5d7a6baa8bb4cc852bfcc2a7b3cc9686c1c8817e
(cherry picked from commit eea3af3f91)
2017-08-13 11:24:56 -07:00
Tao Bao 016120f395 Allow customizing WearRecoveryUI via Makefile variables.
With the following Makefile variables, we can reduce the work of writing
(copy/pasting) device-specific WearRecoveryUI classes.

The list of Makefile variables (the ones useful for Wear devices):
- TARGET_RECOVERY_UI_MARGIN_HEIGHT (default: 0)
- TARGET_RECOVERY_UI_MARGIN_WIDTH (default: 0)
  Specify the margin space that we don't want to display texts. They
  replace the former outer_width and outer_height.

- TARGET_RECOVERY_UI_TOUCH_LOW_THRESHOLD (default: 50)
- TARGET_RECOVERY_UI_TOUCH_HIGH_THRESHOLD (default: 90)
  Specify the sensitivity of recognizing a swipe. Devices give absolute
  positions, so for some devices we need to adjust the thresholds.

- TARGET_RECOVERY_UI_PROGRESS_BAR_BASELINE
  Specify the progress bar vertical position, which should be adjusted
  to the actual height of a device. It replaces the former
  progress_bar_y.

- TARGET_RECOVERY_UI_ANIMATION_FPS (default: 30)
  Specify the animation FPS if using device-specific animation images.
  It replaces the former animation_fps.

Devices can specify "TARGET_RECOVERY_UI_LIB := librecovery_ui_wear",
with optionally defined Makefile vars above, in BoardConfig.mk to
customize their WearRecoveryUI.

Also remove the obsolete wear_touch.{cpp,h}, which has been merged into
ui.cpp in commit 5f8dd9951d.

Bug: 64307776
Test: Change the device BoardConfig.mk and test recovery image.
Change-Id: Id0fb2d4e3977ab5ddd31e71f9535470cab70e41b
(cherry picked from commit 0470ceea38)
2017-08-13 11:24:33 -07:00
Tianjie Xu d82a2ed50b Add a new PatchChunk class in imgdiff
This way we can keep the input images const when calling
genetatepatches().

Test: recovery component test; diff and patch on chrome.apk; generate
recovery-from-boot.p for angler.
Change-Id: I65b5689b88f6719c6ede46bb82def0c4caeb8a61
2017-08-12 22:07:43 -07:00
Bill Yi 616256e739 Import translations. DO NOT MERGE
Change-Id: I99a2cf060c75a70b3baf3c22d538fbfa08828474
Auto-generated-cl: translation import
Exempt-From-Owner-Approval: translation import
2017-08-12 06:53:13 -07:00
Tao Bao eea3af3f91 wear_ui: Expose menu_unusable_rows via Makefile var.
This variable is useful on small screens (e.g. on watches) to handle
long menus. We should have better way to handle this value smartly.
Prior to that, expose the value to be overridable by using the generic
wearable UI module (librecovery_ui_wear).

Bug: 64307776
Test: Define the variable, build and boot into recovery image and check
      the UI menu.
Change-Id: I5d7a6baa8bb4cc852bfcc2a7b3cc9686c1c8817e
2017-08-11 13:53:58 -07:00
David Zeuthenandandroid-build-merger 57eeb9b70a update_verifier: Support androidboot.veritymode being empty or 'disabled'. am: 3222dc0d76 am: db9ec51c39
am: 5cb56fbf76

Change-Id: I2cf483c1f99d042a34b477ecf949cff35f0450c4
2017-08-10 21:28:21 +00:00
David Zeuthenandandroid-build-merger 5cb56fbf76 update_verifier: Support androidboot.veritymode being empty or 'disabled'. am: 3222dc0d76
am: db9ec51c39

Change-Id: I74ed15e22a3f78d673e838515cf989863575044e
2017-08-10 21:11:40 +00:00
David Zeuthenandandroid-build-merger db9ec51c39 update_verifier: Support androidboot.veritymode being empty or 'disabled'.
am: 3222dc0d76

Change-Id: I31ce6bf1e82269a45e3d49bda961359f7dd8bab9
2017-08-10 21:00:09 +00:00
David Zeuthenandandroid-build-merger dd9939fc9b update_verifier: Support androidboot.veritymode being empty or 'disabled'. am: 3222dc0d76 am: 9cf2e9798f
am: da7c1e4492

Change-Id: If52ddeb0189abe8e83bfac418f1a6661c351df8f
2017-08-10 21:00:09 +00:00
David Zeuthenandandroid-build-merger da7c1e4492 update_verifier: Support androidboot.veritymode being empty or 'disabled'. am: 3222dc0d76
am: 9cf2e9798f

Change-Id: I4af28a7b975393f9f789c200577d9bd83d1902c1
2017-08-10 20:56:39 +00:00