Do not set contexts during a factory reset

We should not need to set or change the contexts of the media
folder when doing a factory reset. We should only do this when
we need to recreate the media folder.

Change-Id: I9f9918743d687b0aa0eb1e50747677f883037047
This commit is contained in:
Ethan Yonker
2014-10-14 10:04:44 -05:00
committed by Dees Troy
parent a7f5ce31da
commit 5ef301ec95

View File

@@ -1733,10 +1733,6 @@ bool TWPartition::Wipe_Data_Without_Wiping_Media() {
}
closedir(d);
#ifdef HAVE_SELINUX
perms.fixDataInternalContexts();
#endif
gui_print("Done.\n");
return true;
}
@@ -2076,9 +2072,9 @@ void TWPartition::Recreate_Media_Folder(void) {
PartitionManager.Mount_By_Path(Symlink_Mount_Point, true);
LOGINFO("Recreating /data/media folder.\n");
mkdir("/data/media", S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH);
#ifdef HAVE_SELINUX
#ifdef HAVE_SELINUX
perms.fixDataInternalContexts();
#endif
#endif
// Toggle mount to ensure that "internal sdcard" gets mounted
PartitionManager.UnMount_By_Path(Symlink_Mount_Point, true);
PartitionManager.Mount_By_Path(Symlink_Mount_Point, true);