Filter out @end@ helper package

it doesn't really exist and should probably not even be in the backup metadata. It messes up progress reporting, if we keep it in.
This commit is contained in:
Torsten Grote 2024-05-31 17:11:21 -03:00
parent fa19261d8e
commit 0e224b1238
No known key found for this signature in database
GPG key ID: 3E5F77D92CF891FF

View file

@ -10,6 +10,7 @@ import android.util.Log
import androidx.lifecycle.LiveData
import androidx.lifecycle.asLiveData
import com.stevesoltys.seedvault.MAGIC_PACKAGE_MANAGER
import com.stevesoltys.seedvault.NO_DATA_END_SENTINEL
import com.stevesoltys.seedvault.R
import com.stevesoltys.seedvault.metadata.PackageMetadata
import com.stevesoltys.seedvault.metadata.PackageMetadataMap
@ -149,6 +150,7 @@ internal class AppSelectionManager(
@Suppress("IfThenToElvis") // the code is more readable like this
if (isSelected == null) { // was not in list
if (packageName == MAGIC_PACKAGE_MANAGER) true // @pm@ is essential for restore
else if (packageName == NO_DATA_END_SENTINEL) false // @end@ is not real
// internal system apps were not in the list and are controlled by meta item,
// so allow them only if meta item was selected
else if (metadata.isInternalSystem) restoreSystemApps