Commit Graph

4124 Commits

Author SHA1 Message Date
Tao Bao 91d12f9ef1 Merge "Const modifiers" am: 4efd353d8f am: 92d8772c49
am: d51bd8770a

Change-Id: I7a8f14bde0359dcd3d1a29d8ba37f373b205c47a
2017-03-24 20:37:08 +00:00
Tao Bao 3bea64c9f3 Merge "Removed C-style casts" am: 110155a604 am: 6a831e02b6
am: 6b3df6486e

Change-Id: Ib917ebb9e4bd7a5cd7dcd785593f0a2f4ef0aefb
2017-03-24 20:36:58 +00:00
Tao Bao d51bd8770a Merge "Const modifiers" am: 4efd353d8f
am: 92d8772c49

Change-Id: I453dbfb45e3f70586e77cb28207c164fe9cb72fa
2017-03-24 20:34:37 +00:00
Tao Bao 6b3df6486e Merge "Removed C-style casts" am: 110155a604
am: 6a831e02b6

Change-Id: If512cbe096ad18388fea2800d12182832d0ecda8
2017-03-24 20:34:27 +00:00
Tao Bao 92d8772c49 Merge "Const modifiers"
am: 4efd353d8f

Change-Id: I8ae993749d5f2c58cc5ef23f90845cf5a0bf756d
2017-03-24 20:32:39 +00:00
Tao Bao 6a831e02b6 Merge "Removed C-style casts"
am: 110155a604

Change-Id: I363e172a8f7f9e67dfc9474e0e10463690cdd833
2017-03-24 20:32:29 +00:00
Tao Bao 4efd353d8f Merge "Const modifiers" 2017-03-24 20:28:09 +00:00
Tao Bao 110155a604 Merge "Removed C-style casts" 2017-03-24 20:28:00 +00:00
Tao Bao 4db650ca10 Merge "Fix the wrong parameter when calling read_metadata_from_package()." am: 6014db5da6 am: 5da7e41ec8
am: be4578f009

Change-Id: I46cf74bc32cd1d2666a1b14df62b9fe96445c971
2017-03-24 20:20:57 +00:00
Tao Bao be4578f009 Merge "Fix the wrong parameter when calling read_metadata_from_package()." am: 6014db5da6
am: 5da7e41ec8

Change-Id: I56222c4a4bf245ca7c5a9506750125f23bed443f
2017-03-24 20:18:27 +00:00
Tao Bao 5da7e41ec8 Merge "Fix the wrong parameter when calling read_metadata_from_package()."
am: 6014db5da6

Change-Id: I55b44f34491f8103487bcd7b871d3615666b45d9
2017-03-24 20:16:26 +00:00
Tao Bao 6014db5da6 Merge "Fix the wrong parameter when calling read_metadata_from_package()." 2017-03-24 20:11:53 +00:00
Tao Bao 1b2a98bda3 Fix the wrong parameter when calling read_metadata_from_package().
The call to read_metadata_from_package() is broken due to being passed
an invalid pointer (ZipArchiveHandle vs ZipArchiveHandle*). It's
introduced when switching from minzip to libziparchive. Compiler didn't
complain, because ZipArchiveHandle is typedef'd as void*, which legitly
accepts a void**.

Also clean up secure_wipe_partition() logs a bit by using android-base
logging.

Bug: 36427762
Test: Send a wipe package.
Change-Id: I791a0f09a066f1c257dae890e7ae13d02a02e78b
2017-03-24 11:02:05 -07:00
Paul Crowley f5991542fa Merge "Reword the wipe warning message to be more comprehensible." am: f09efaff89 am: eddc9a15f9
am: 25bf90201c

Change-Id: Ie7451d7ed8acb7118655ca90ed1bd738447eef0d
2017-03-23 23:44:42 +00:00
Paul Crowley 25bf90201c Merge "Reword the wipe warning message to be more comprehensible." am: f09efaff89
am: eddc9a15f9

Change-Id: I41c7a52fda6b0df63869640193a198a98801ed75
2017-03-23 23:41:41 +00:00
Paul Crowley eddc9a15f9 Merge "Reword the wipe warning message to be more comprehensible."
am: f09efaff89

Change-Id: I4078499b8019361979a8d47cf9205e1ee865303c
2017-03-23 23:39:43 +00:00
Treehugger Robot f09efaff89 Merge "Reword the wipe warning message to be more comprehensible." 2017-03-23 23:36:42 +00:00
Paul Crowley 31ac0c61fe Reword the wipe warning message to be more comprehensible.
Test: My device was crashing anyway, so observed message on crash.
Bug: 34669779
Change-Id: Ib85d1d137139f5e14f735c972c2312acce2caf5f
2017-03-23 14:54:20 -07:00
Tao Bao 2bf8ff6205 Merge "Redundant checking of STL container element" am: b56a3c2e3a am: 9e05f26e1a
am: bc3d2ee5e5

Change-Id: I704638b127b43b1e2964f5679bdd486384563a8e
2017-03-23 21:51:59 +00:00
Tao Bao bc3d2ee5e5 Merge "Redundant checking of STL container element" am: b56a3c2e3a
am: 9e05f26e1a

Change-Id: I269ff1530179a77f38d824f67a219adb7c666271
2017-03-23 21:36:58 +00:00
Tao Bao 9e05f26e1a Merge "Redundant checking of STL container element"
am: b56a3c2e3a

Change-Id: If1dc1bd436b7ef97fbdc848373f59ce66881c0a2
2017-03-23 21:27:27 +00:00
Tao Bao b56a3c2e3a Merge "Redundant checking of STL container element" 2017-03-23 21:13:47 +00:00
Mikhail Lappo b49767c0ba Const modifiers
This functions do not change class variables
Would be good to mark them as const, so
class variables are not changed by coincidence

Change-Id: Iea34f6d26dbd1bde813035160e07ff2a681989e6
2017-03-23 21:52:30 +01:00
Mikhail Lappo 20791bdcd7 Removed C-style casts
In c++ code would be cleaner to use
c++ retinterpret cast instead of old
c-style notation

Change-Id: Ibeef5e0c374addf108c0a8876a6be45063d8e396
2017-03-23 21:52:04 +01:00
Tao Bao ef888d1b55 Merge "Checking unsigned variable less than zero" am: 0d264bf088 am: 957f6491f8
am: cd03df0652

Change-Id: Ic5bcbe14b6db759135274fd51a35703327c3826d
2017-03-23 20:05:31 +00:00
Tao Bao 1335a3772f Merge "Fixed scanf modifier" am: 577c668861 am: d414ae465e
am: 8859e2aea8

Change-Id: I0b38bfba79de254cd30f85ab7ea68603dec53017
2017-03-23 20:05:22 +00:00
Tao Bao cd03df0652 Merge "Checking unsigned variable less than zero" am: 0d264bf088
am: 957f6491f8

Change-Id: If9516fdbb4798675330cc3accdc299445e64e258
2017-03-23 20:02:30 +00:00
Tao Bao 8859e2aea8 Merge "Fixed scanf modifier" am: 577c668861
am: d414ae465e

Change-Id: If548f8240521dacba70e969f625728160d2bde2a
2017-03-23 20:02:22 +00:00
Tao Bao 957f6491f8 Merge "Checking unsigned variable less than zero"
am: 0d264bf088

Change-Id: I3a5013ec09e81ce1daae78a91975884a1f8d7a81
2017-03-23 19:59:32 +00:00
Tao Bao d414ae465e Merge "Fixed scanf modifier"
am: 577c668861

Change-Id: I5d28d5c71996e260c5e901b66884285d6e8ba1e8
2017-03-23 19:59:23 +00:00
Tao Bao 0d264bf088 Merge "Checking unsigned variable less than zero" 2017-03-23 19:55:35 +00:00
Tao Bao 577c668861 Merge "Fixed scanf modifier" 2017-03-23 19:55:25 +00:00
Tao Bao 951a61b9a8 Merge "updater: Fix the broken case for apply_patch_check()." am: 9f2062657d am: 923d41ccd5
am: 47ee8fa42a

Change-Id: I24a2b7776779a61f786fae0cbe5dd9569250ff7b
2017-03-23 17:15:42 +00:00
Tao Bao 47ee8fa42a Merge "updater: Fix the broken case for apply_patch_check()." am: 9f2062657d
am: 923d41ccd5

Change-Id: I732705e595aadd1d50d33b4371393e54959014a6
2017-03-23 17:12:42 +00:00
Tao Bao 923d41ccd5 Merge "updater: Fix the broken case for apply_patch_check()."
am: 9f2062657d

Change-Id: Ifb3e0dc56f014322ad7227e5f2f9a5bd9cf61b43
2017-03-23 17:10:12 +00:00
Tao Bao 11159f5b64 Merge "recovery: Replace the hard-coded 1000 with AID_SYSTEM." am: 833442cf4e am: ca9c1e0965
am: f5ac45cbd9

Change-Id: I052ce543f6ae13b2f5960d6c86ebd3b5a0ed8c7c
2017-03-23 17:04:12 +00:00
Tao Bao 9f2062657d Merge "updater: Fix the broken case for apply_patch_check()." 2017-03-23 17:03:43 +00:00
Tao Bao f5ac45cbd9 Merge "recovery: Replace the hard-coded 1000 with AID_SYSTEM." am: 833442cf4e
am: ca9c1e0965

Change-Id: Ibd89df485b537f38f21956ed95527d58e8106e9f
2017-03-23 17:01:11 +00:00
Tao Bao ca9c1e0965 Merge "recovery: Replace the hard-coded 1000 with AID_SYSTEM."
am: 833442cf4e

Change-Id: Iaed8003a749dac83794db10632040179acc48869
2017-03-23 16:59:11 +00:00
Tao Bao 833442cf4e Merge "recovery: Replace the hard-coded 1000 with AID_SYSTEM." 2017-03-23 16:47:24 +00:00
Mikhail Lappo bb8bce932e Redundant checking of STL container element
As of C++ specification size_type erase( const key_type& key );
removes the element (if one exists). There is no need to perform
the check twice.

Change-Id: I4b057c08526abc7c2a483a60f9e166e4d8f56a74
2017-03-23 17:20:47 +01:00
Mikhail Lappo 8524faddd3 Checking unsigned variable less than zero
Unsinged variable can not be less than zero
Makes sense only to check if it is equal
2017-03-23 17:07:39 +01:00
Mikhail Lappo 17e6d3f3bc Fixed scanf modifier
Scanf expectation is to have same type
of pointer to store parsed value and
modifier in format string
2017-03-23 16:58:53 +01:00
Tao Bao db56eb073e updater: Fix the broken case for apply_patch_check().
It's valid to provide only 1 argument to apply_patch_check(). We
shouldn't fail the argument parsing.

Bug: 36541737
Test: recovery_component_test passes.
Test: recovery_component_test captures the failure without the fix.
Test: The previously failed update applies successfully.
Change-Id: Iee4c54ed33b877fc4885945b085341ec5c64f663
2017-03-23 06:52:45 -07:00
Tianjie Xu 5e1a2dc522 Merge "Remove malloc in edify functions" am: 1ea869b0c6 am: 137d85333e
am: eb0623b14b

Change-Id: I7c48105d9259b1713e8be5fb2c50ef8d6a92c993
2017-03-23 00:45:51 +00:00
Tianjie Xu eb0623b14b Merge "Remove malloc in edify functions" am: 1ea869b0c6
am: 137d85333e

Change-Id: I3ce3450f8385ef18f71491608da88184f3885730
2017-03-23 00:43:21 +00:00
Tianjie Xu 137d85333e Merge "Remove malloc in edify functions"
am: 1ea869b0c6

Change-Id: I1501b6a92e49a12f168a63b87a89a57eb13c262d
2017-03-23 00:40:50 +00:00
Tianjie Xu 1ea869b0c6 Merge "Remove malloc in edify functions" 2017-03-23 00:20:53 +00:00
Tao Bao e1905adf66 recovery: Replace the hard-coded 1000 with AID_SYSTEM.
Test: mmma bootable/recovery
Change-Id: Icea5bd91a976957e8b6ab46e367345ff69a53ca4
2017-03-22 14:58:58 -07:00
Tianjie Xu c444732540 Remove malloc in edify functions
And switch them to std::vector & std::unique_ptr

Bug: 32117870
Test: recovery tests passed on sailfish
Change-Id: I5a45951c4bdf895be311d6d760e52e7a1b0798c3
2017-03-22 14:20:57 -07:00