Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
twrp
android_bootable_recovery
Commits
078cc2cc
Commit
078cc2cc
authored
9 years ago
by
nkk71
Browse files
Options
Download
Email Patches
Plain Diff
Add progress tracking in mrom 'restore' install
parent
21ff5ee4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
multirom/multirom.cpp
multirom/multirom.cpp
+5
-2
No files found.
multirom/multirom.cpp
View file @
078cc2cc
...
...
@@ -2283,12 +2283,15 @@ bool MultiROM::installFromBackup(std::string name, std::string path, int type)
unsigned
long
long
total_restore_size
=
0
;
DataManager
::
SetProgress
(
0.0
);
ProgressTracking
progress
(
total_restore_size
);
TWPartition
*
sys_part
=
PartitionManager
.
Find_Partition_By_Path
(
"/system"
);
TWPartition
*
data_part
=
PartitionManager
.
Find_Partition_By_Path
(
"/data"
);
if
(
sys_part
&&
data_part
)
{
total_restore_size
+=
sys_part
->
Get_Restore_Size
(
path
);
total_restore_size
+=
data_part
->
Get_Restore_Size
(
path
);
ProgressTracking
progress
(
total_restore_size
);
PartitionManager
.
Set_Restore_Files
(
path
);
res
=
PartitionManager
.
Restore_Partition
(
sys_part
,
path
,
&
progress
)
&&
(
!
has_data
||
PartitionManager
.
Restore_Partition
(
data_part
,
path
,
&
progress
));
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment