Austin Huang
4 years ago
No known key found for this signature in database
GPG Key ID: 84C23AA04587A91F
7 changed files with 71 additions and 14 deletions
-
2app/src/main/AndroidManifest.xml
-
24app/src/main/java/awais/instagrabber/backup/BarinstaBackupAgent.kt
-
40app/src/main/java/awais/instagrabber/fragments/settings/BackupPreferencesFragment.java
-
1app/src/main/java/awais/instagrabber/fragments/settings/PreferenceKeys.kt
-
12app/src/main/java/awais/instagrabber/utils/SettingsHelper.kt
-
5app/src/main/res/values/strings.xml
-
1app/src/main/res/xml/backup_descriptor.xml
@ -0,0 +1,24 @@ |
|||
package awais.instagrabber.backup |
|||
|
|||
import android.app.backup.BackupAgent |
|||
import android.app.backup.BackupDataInput |
|||
import android.app.backup.BackupDataOutput |
|||
import android.app.backup.FullBackupDataOutput |
|||
import android.os.ParcelFileDescriptor |
|||
import awais.instagrabber.fragments.settings.PreferenceKeys |
|||
import awais.instagrabber.utils.Utils.settingsHelper |
|||
|
|||
class BarinstaBackupAgent : BackupAgent() { |
|||
override fun onFullBackup(data: FullBackupDataOutput?) { |
|||
if (data != null && settingsHelper.getBoolean(PreferenceKeys.PREF_AUTO_BACKUP_ENABLED)) { |
|||
super.onFullBackup(data) |
|||
} |
|||
} |
|||
|
|||
// no key-value backups |
|||
override fun onBackup(oldState: ParcelFileDescriptor?, |
|||
data: BackupDataOutput?, newState: ParcelFileDescriptor?) {} |
|||
|
|||
override fun onRestore(data: BackupDataInput, appVersionCode: Int, |
|||
newState: ParcelFileDescriptor) {} |
|||
} |
@ -1,3 +1,4 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<full-backup-content> |
|||
|
|||
</full-backup-content> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue