Commit Graph

7296 Commits

Author SHA1 Message Date
Tao Bao f49cc02e86 Merge "ui: Check for bootreason=recovery_ui." 2017-08-03 21:49:24 +00:00
Tao Bao 4d91ada15d ui: Move the support for touch inputs into RecoveryUI. am: af9f8b4d97
am: 74098080e0

Change-Id: I09c351bc81724428cc7af397e0baf5eac6cbdb46
2017-08-03 21:33:07 +00:00
Tao Bao 74098080e0 ui: Move the support for touch inputs into RecoveryUI.
am: af9f8b4d97

Change-Id: Ib205b133663f63b4a7413adf9ac584092c3396a3
2017-08-03 21:19:19 +00:00
Tao Bao 593ea648ff Merge "ui: Move the support for touch inputs into RecoveryUI." am: faa5b1f773 am: 5daa000068 am: 14d829b02c am: 30886cb817
am: f589396b0e

Change-Id: I0d9ad1d35ea7973272e7fc6a9852a3f36c3fbfa2
2017-08-03 19:02:21 +00:00
Tianjie Xu e7e656a25b Merge "Refactor the imgdiff" am: f411f3dcfb am: 6c1a6c389b am: e500bc3e15 am: 12cd28fb9c
am: 6eae2f7023

Change-Id: Iaa24195286b770fad16446e9f4fe4c7e80e9dcb2
2017-08-03 19:01:41 +00:00
Tao Bao f589396b0e Merge "ui: Move the support for touch inputs into RecoveryUI." am: faa5b1f773 am: 5daa000068 am: 14d829b02c
am: 30886cb817

Change-Id: Ib18bcf5bf9165e93afef26070eb5c19949d47a4e
2017-08-03 18:49:09 +00:00
Tianjie Xu 6eae2f7023 Merge "Refactor the imgdiff" am: f411f3dcfb am: 6c1a6c389b am: e500bc3e15
am: 12cd28fb9c

Change-Id: Id9b37ba12cfc534f9b59eac78bf1476e6f7a72a3
2017-08-03 18:48:45 +00:00
Tao Bao 046aae29d9 ui: Check for bootreason=recovery_ui.
Some wear bootloaders are passing bootreason=recovery_ui when booting
into recovery from fastboot, or via 'adb reboot recovery'. Allow turning
on text mode with a swipe for such a bootreason. Since we will turn on
text mode automatically for debuggable builds, this bootreason mainly
handles the case for user builds.

Note this change only applies to devices that allow touch screen inputs.

Bug: 36169090
Test: Build and boot into user build recovery image. Toggle on text mode
      with a swipe.
Change-Id: I55f19aed7b210352f8370de19935b4772cc12095
2017-08-03 11:37:37 -07:00
Tao Bao 30886cb817 Merge "ui: Move the support for touch inputs into RecoveryUI." am: faa5b1f773 am: 5daa000068
am: 14d829b02c

Change-Id: Icc07c0788a2d0fdcdb09957c7e80d2c208374e41
2017-08-03 18:35:40 +00:00
Tianjie Xu 12cd28fb9c Merge "Refactor the imgdiff" am: f411f3dcfb am: 6c1a6c389b
am: e500bc3e15

Change-Id: Ibee36f11ef600685881bb2f652216196f323ed8d
2017-08-03 18:35:23 +00:00
Tao Bao 14d829b02c Merge "ui: Move the support for touch inputs into RecoveryUI." am: faa5b1f773
am: 5daa000068

Change-Id: I5cec1eef0e5f0e648e630117b6332e1a4059f4f2
2017-08-03 18:29:38 +00:00
Tianjie Xu e500bc3e15 Merge "Refactor the imgdiff" am: f411f3dcfb
am: 6c1a6c389b

Change-Id: Ifc13d6c9fad007909f49192a8e34d37083c0a682
2017-08-03 18:29:25 +00:00
Tao Bao 5daa000068 Merge "ui: Move the support for touch inputs into RecoveryUI."
am: faa5b1f773

Change-Id: Id81f4dca012f5af9000409e93c76a176f4f5b4d3
2017-08-03 18:24:22 +00:00
Tianjie Xu 6c1a6c389b Merge "Refactor the imgdiff"
am: f411f3dcfb

Change-Id: I2b99c2f0f0c117451db80324670590f96fbbb1da
2017-08-03 18:24:08 +00:00
Tao Bao faa5b1f773 Merge "ui: Move the support for touch inputs into RecoveryUI." 2017-08-03 18:18:27 +00:00
Tianjie Xu f411f3dcfb Merge "Refactor the imgdiff" 2017-08-03 18:12:23 +00:00
Tao Bao af9f8b4d97 ui: Move the support for touch inputs into RecoveryUI.
- Added detection for EV_ABS events in minui/events.cpp, if it's
  allowed;
- Added listening and processing touch inputs in ui.cpp;
- Fixed an issue in recognizing swipe with multi-touch protocol A;
- Changed the logic in RecoveryUI::ProcessKey() to be swipe-aware. It
  now allows turning on text mode with <power> + <swipe-up>.

The last change also fixed an issue on devices with protocol A: prior
to this CL, user may accidentally toggle the text mode during an OTA.
Because it was considered as a single-button device, a long tap that
sent BTN_TOUCH event would turn on text mode.

Test: Allow detecting touch inputs. Swiping (up, down, enter) works on
      angler, angelfish, dorado respectively.
Bug: 36169090
Bug: 64307776
Change-Id: I4bc882b99114ce4ab414f8bdb8f4f7a525b8a8fd
(cherry picked from commit 5f8dd9951d)
2017-08-03 11:10:28 -07:00
android-build-team Robot 7a95d11844 release-request-d4f45cf4-9d73-4828-baa4-f73aa4280cd0-for-git_pi-release-4241208 snap-temp-L10800000088711883
Change-Id: I4084d67d30843e34ac973b676b35833fdc553c93
2017-08-03 08:18:13 +00:00
Tianjie Xu 6b03ba7902 Refactor the imgdiff
This helps us to add a new mode to handle large APKs in the follow
up CL.

Changes include:
1. Create a new interface class 'Image'
1. Create subclasses 'ZipModeImage' and 'ImageModeImage' and move the
   related functions there.

Bug: 63542719
Test: recovery_component_test passes
Change-Id: I7729b0ba39b19a9c84811636a60dd0a0b1acc2f0
2017-08-02 14:29:45 -07:00
Tao Bao 5f8dd9951d ui: Move the support for touch inputs into RecoveryUI.
- Added detection for EV_ABS events in minui/events.cpp, if it's
  allowed;
- Added listening and processing touch inputs in ui.cpp;
- Fixed an issue in recognizing swipe with multi-touch protocol A;
- Changed the logic in RecoveryUI::ProcessKey() to be swipe-aware. It
  now allows turning on text mode with <power> + <swipe-up>.

The last change also fixed an issue on devices with protocol A: prior
to this CL, user may accidentally toggle the text mode during an OTA.
Because it was considered as a single-button device, a long tap that
sent BTN_TOUCH event would turn on text mode.

Test: Allow detecting touch inputs. Swiping (up, down, enter) works on
      angler, angelfish, dorado respectively.
Bug: 36169090
Change-Id: I4bc882b99114ce4ab414f8bdb8f4f7a525b8a8fd
2017-08-01 18:30:48 -07:00
Tianjie Xu a24121576f Merge "Add implemention of SortedRangeSet" am: 64cba55fbc am: fbd4b10310 am: a09376ed90 am: 8b09001e47
am: fd0e740c61

Change-Id: I1a150ab61fd631252faa774455cd3aca83e8dd4c
2017-08-01 00:44:50 +00:00
Tianjie Xu fd0e740c61 Merge "Add implemention of SortedRangeSet" am: 64cba55fbc am: fbd4b10310 am: a09376ed90
am: 8b09001e47

Change-Id: Ib1c74e9295cf2c2f22a47135a24a884037a31555
2017-08-01 00:41:51 +00:00
Tianjie Xu 8b09001e47 Merge "Add implemention of SortedRangeSet" am: 64cba55fbc am: fbd4b10310
am: a09376ed90

Change-Id: I67b2f4e91133239d4eb35524c7f0ed41f18de8dc
2017-08-01 00:38:21 +00:00
Tianjie Xu a09376ed90 Merge "Add implemention of SortedRangeSet" am: 64cba55fbc
am: fbd4b10310

Change-Id: I2c6bc65375be433e79db8861e3c5e936847c897e
2017-08-01 00:34:49 +00:00
Tianjie Xu fbd4b10310 Merge "Add implemention of SortedRangeSet"
am: 64cba55fbc

Change-Id: I2174e4f55c85fe57014b31625dbc2d06e41350be
2017-08-01 00:31:20 +00:00
Tianjie Xu 64cba55fbc Merge "Add implemention of SortedRangeSet" 2017-08-01 00:22:33 +00:00
Tianjie Xu b9e7fc7fa9 Add implemention of SortedRangeSet
This is useful in imgdiff to maintain the block ranges of
splitted source image.

Bug: 34220646
Test: mma && unit tests pass
Change-Id: I6427f2ea50f0e3b0aa3dd01880ec0206679b7429
2017-07-31 15:13:55 -07:00
Tao Bao 99d378fa02 Merge "otautil: Clean up dirCreateHierarchy()." am: 610712101b am: 5507c3d63c am: 0863373376 am: 06db7363b0
am: cee984b929

Change-Id: Ia4fbd8f6bbfcc4fe51488b65cfe2b826564119f5
2017-07-31 00:28:14 +00:00
Tao Bao cee984b929 Merge "otautil: Clean up dirCreateHierarchy()." am: 610712101b am: 5507c3d63c am: 0863373376
am: 06db7363b0

Change-Id: Ie474f91d9ab7b9c64c2fd9ecb1930a767ceb8e84
2017-07-31 00:25:13 +00:00
Tao Bao 06db7363b0 Merge "otautil: Clean up dirCreateHierarchy()." am: 610712101b am: 5507c3d63c
am: 0863373376

Change-Id: Ia2326bca2d8a1344fccd2838e2b376cb9a843a82
2017-07-31 00:21:43 +00:00
Tao Bao 0863373376 Merge "otautil: Clean up dirCreateHierarchy()." am: 610712101b
am: 5507c3d63c

Change-Id: I811f76004d8b0346746c25d05ee4b2fda635a352
2017-07-31 00:18:43 +00:00
Tao Bao 5507c3d63c Merge "otautil: Clean up dirCreateHierarchy()."
am: 610712101b

Change-Id: I95350c4b2aab36dd89ea7813f2eb63d407b5f8ac
2017-07-31 00:15:43 +00:00
Treehugger Robot 610712101b Merge "otautil: Clean up dirCreateHierarchy()." 2017-07-31 00:10:34 +00:00
Tianjie Xu 9731c7a12c Merge "Add more specific error codes for uncrypt failures" am: 3ff8a5e2a4 am: 6f30535229 am: a86d24829b am: ce47e3792f
am: 181d514cf1

Change-Id: I0b7d24cea07ce9c51550ca73d36a457d6deddc8e
2017-07-27 21:49:30 +00:00
Tianjie Xu 181d514cf1 Merge "Add more specific error codes for uncrypt failures" am: 3ff8a5e2a4 am: 6f30535229 am: a86d24829b
am: ce47e3792f

Change-Id: I36e058c5f1337cd032ce561634dcf5b8a9193ce4
2017-07-27 21:42:00 +00:00
Tianjie Xu ce47e3792f Merge "Add more specific error codes for uncrypt failures" am: 3ff8a5e2a4 am: 6f30535229
am: a86d24829b

Change-Id: I841cd10a129cc95ca52b92708d844bfcc5adcdea
2017-07-27 21:37:33 +00:00
Tianjie Xu a86d24829b Merge "Add more specific error codes for uncrypt failures" am: 3ff8a5e2a4
am: 6f30535229

Change-Id: Iba392936c14c0af584b0dcb94bc65670cb94473e
2017-07-27 21:34:00 +00:00
Tianjie Xu 6f30535229 Merge "Add more specific error codes for uncrypt failures"
am: 3ff8a5e2a4

Change-Id: Iee5b01f59b2e0532232393c0133f0bd3b11d9ccd
2017-07-27 21:31:52 +00:00
Tianjie Xu 3ff8a5e2a4 Merge "Add more specific error codes for uncrypt failures" 2017-07-27 21:29:17 +00:00
Tianjie Xu 8b8e23d5cc Add more specific error codes for uncrypt failures
Add the error codes when we fail to find the realpath, or fail to find
the block_device.

Bug: 63737759
Test: mma
Change-Id: Icf15368ad3e7345c747d9083da2f049cc8acd571
2017-07-27 21:28:18 +00:00
Tao Bao 3fb91140ec Merge "roots.cpp: Clean up format_volume()." am: 8eef26cf3d am: dcd272fbb1 am: f93a103587 am: 264caac23d
am: b41d074c9d

Change-Id: I41fff0227044d09f5c3eb9de72a67519e082f488
2017-07-27 18:14:12 +00:00
Tao Bao b41d074c9d Merge "roots.cpp: Clean up format_volume()." am: 8eef26cf3d am: dcd272fbb1 am: f93a103587
am: 264caac23d

Change-Id: I497d29e2994f8865e4220811821b2441d6c6a63d
2017-07-27 17:48:18 +00:00
Tao Bao 264caac23d Merge "roots.cpp: Clean up format_volume()." am: 8eef26cf3d am: dcd272fbb1
am: f93a103587

Change-Id: I43a23f5bf16feb9a70379c0e1f23892215abc30e
2017-07-27 17:43:12 +00:00
Tao Bao f93a103587 Merge "roots.cpp: Clean up format_volume()." am: 8eef26cf3d
am: dcd272fbb1

Change-Id: I6983e9df9c4e7d4740050d69fd2522639c2c673d
2017-07-27 17:41:10 +00:00
Tao Bao dcd272fbb1 Merge "roots.cpp: Clean up format_volume()."
am: 8eef26cf3d

Change-Id: I0cf7d7cf82f4e14567b585b2603ba387a8f94231
2017-07-27 17:38:45 +00:00
Tao Bao 8eef26cf3d Merge "roots.cpp: Clean up format_volume()." 2017-07-27 17:33:48 +00:00
Tao Bao ac3d1edca0 otautil: Clean up dirCreateHierarchy().
- Changed to std::string based implementation (mostly moved from the
  former make_parents() in updater/install.cpp);
- Removed the timestamp parameter, which is only neeed by file-based OTA;
- Changed the type of mode from int to mode_t;
- Renamed dirCreateHierarchy() to mkdir_recursively().

Test: recovery_unit_test passes.
Test: No external user of dirCreateHierarchy() in code search.
Change-Id: I71f8c4b29bab625513bbc3af6d0d1ecdc3a2719a
2017-07-27 10:33:07 -07:00
Jin Qian 99a59f13d1 recovery: handle security footer before passing size to mke2fs am: 5e47d5161a -s ours am: 3475faf5ea -s ours
am: d674d35d0d  -s ours

Change-Id: I5dcf9bc1475e0c2a392e7d51a1008d5f86046375
2017-07-26 00:53:43 +00:00
Jin Qian d674d35d0d recovery: handle security footer before passing size to mke2fs am: 5e47d5161a -s ours
am: 3475faf5ea  -s ours

Change-Id: I1421a0934fd72b0bdbfc2e35e34f37a64b096706
2017-07-26 00:31:23 +00:00
Jin Qian 1b0c1ff23f recovery: handle security footer before passing size to mke2fs am: 5e47d5161a am: e2d31361ef -s ours
am: ac05724573  -s ours

Change-Id: Iab0233ad7a065e306834a31a19af35a45a6f2eaf
2017-07-26 00:05:30 +00:00