Commit Graph

9577 Commits

Author SHA1 Message Date
Tao Bao 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 Bao 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 Bao 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 Yi 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 Yi 91487964b0 Import translations. DO NOT MERGE
am: 20fa1a92cc  -s ours

Change-Id: I2849c371f53a02857ec9d14a7565def9130305ea
2017-08-16 15:44:34 +00:00
Tao Bao 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 Bao 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 Bao 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 Bao ae0af37111 Merge "screen_ui: Word-wrap menu headers." am: 162b92323b
am: 623bac4ed9

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

Change-Id: I93c959422c5b56a15875580159ecfc1a1d44087d
2017-08-16 05:07:55 +00:00
Tao Bao 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
android-build-team Robot 84ca8048c5 release-request-8c6f0e6c-413f-4241-b3dc-c159fdcc7655-for-git_pi-release-4273687 snap-temp-L51400000093075386
Change-Id: Ib9e24a7a6c2a488f7e204f62e26b7f5fe97487cd
2017-08-15 08:10:39 +00:00
big biff c0c5c3a1a4 Merge "Fix typos / inconsistencies in German language" into android-7.1 2017-08-15 02:49:40 +02:00
Tianjie Xu 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 Xu 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 Xu 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 Xu 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 Xu 5bde1d9ef8 Merge "Add a new PatchChunk class in imgdiff"
am: 11214d9062

Change-Id: Ic2d4b218b36ace3dd1d49be1d17adeaf2d37b108
2017-08-14 17:26:56 +00:00
Tianjie Xu 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
android-build-team Robot f02be7d57a release-request-631994b2-37c0-4d03-8caa-bfd01530db29-for-git_pi-release-4269836 snap-temp-L23500000092503827
Change-Id: Id836cdf1bb8604695d72dac52bc50d0805a97843
2017-08-13 08:07:36 +00:00
android-build-team Robot 52f0e206e2 release-request-68cc9b2a-98ae-4fbf-8b56-3e535855f399-for-git_oc-mr1-release-4269864 snap-temp-L25700000092502312
Change-Id: Id98067953ca0ac14a01276b2387aeaa6a7dfdef8
2017-08-13 07:34:31 +00: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
big biff 5302ec42b7 Merge "SHA2: Enable in landscape and watch xml" into android-7.1 2017-08-13 01:51:57 +02: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 Zeuthen 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 Zeuthen 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 Zeuthen db9ec51c39 update_verifier: Support androidboot.veritymode being empty or 'disabled'.
am: 3222dc0d76

Change-Id: I31ce6bf1e82269a45e3d49bda961359f7dd8bab9
2017-08-10 21:00:09 +00:00
David Zeuthen 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 Zeuthen 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
David Zeuthen 9cf2e9798f update_verifier: Support androidboot.veritymode being empty or 'disabled'.
am: 3222dc0d76

Change-Id: I20dc5fce9e5adf002acf0e918d843c681286a8fc
2017-08-10 20:53:08 +00:00
Tao Bao c3c85bd889 Merge "update_verifier: verify blocks in parallel" am: 0459799ea8 am: 1fa82a2af4 am: 5156e24ccf am: 37b9d108a9
am: 0bbd31b865

Change-Id: Ib0248c92d2f0bf267134e1b0b1f8bce842e7f3f9
2017-08-10 16:44:55 +00:00
Tao Bao 0bbd31b865 Merge "update_verifier: verify blocks in parallel" am: 0459799ea8 am: 1fa82a2af4 am: 5156e24ccf
am: 37b9d108a9

Change-Id: I99ce9776fc0597d93315295a7a81600231efa3ed
2017-08-10 16:41:23 +00:00
Tao Bao 37b9d108a9 Merge "update_verifier: verify blocks in parallel" am: 0459799ea8 am: 1fa82a2af4
am: 5156e24ccf

Change-Id: I84945b9ef0d8ae985e5200c2e5dec95ce4da2b9d
2017-08-10 16:37:22 +00:00
Tao Bao 5156e24ccf Merge "update_verifier: verify blocks in parallel" am: 0459799ea8
am: 1fa82a2af4

Change-Id: Ieeabe5fc76d25a4c22164c0e61d3a93b046cd8c7
2017-08-10 16:33:23 +00:00
Tao Bao 0470ceea38 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
2017-08-10 09:31:17 -07:00
Tao Bao 1fa82a2af4 Merge "update_verifier: verify blocks in parallel"
am: 0459799ea8

Change-Id: Ic8ce7a45de3a7501f7e1f758c7ddf56ff5d919e3
2017-08-10 16:30:03 +00:00
Tao Bao 0459799ea8 Merge "update_verifier: verify blocks in parallel" 2017-08-10 16:24:38 +00:00
android-build-team Robot 5a2732630e release-request-0b474cbb-ff20-424d-a570-a0a7b83a7705-for-git_pi-release-4262110 snap-temp-L42700000091449286
Change-Id: I043978b21821e896ca840dcd6a9749c8743c7ad4
2017-08-10 08:10:01 +00:00
android-build-team Robot e6dd71bcdb release-request-7f84484c-eec6-4577-8d5a-55079be4f3c5-for-git_oc-mr1-release-4262309 snap-temp-L02100000091441105
Change-Id: I1acbef57e3d5e8dbe11e770522894543f5d06b08
2017-08-10 07:27:31 +00:00
Tao Bao 8bbcf6d75f Merge "tests: Add the missing dependency on libhidlbase." am: 05b2e982ad am: 43df6cfeee am: 46c13f3f05 am: 6f1c38c9ad
am: b5fa329795

Change-Id: Idd39efb798d72cb96235a1ba01e633dee7be1c92
2017-08-10 06:36:12 +00:00
Tao Bao b5fa329795 Merge "tests: Add the missing dependency on libhidlbase." am: 05b2e982ad am: 43df6cfeee am: 46c13f3f05
am: 6f1c38c9ad

Change-Id: I6e32f2653681816140d06cf3135d343937dd3bc4
2017-08-10 06:23:46 +00:00