Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
platform_frameworks_base-old
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Farzin Kazemzadeh
platform_frameworks_base-old
Commits
ee219795
Commit
ee219795
authored
7 years ago
by
Michal Karpinski
Committed by
Android (Google) Code Review
7 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Drop support for full backup of com.android.providers.settings"
parents
efd3bab0
fbcb2458
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java
+3
-59
3 additions, 59 deletions
...c/com/android/providers/settings/SettingsBackupAgent.java
with
3 additions
and
59 deletions
packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java
+
3
−
59
View file @
ee219795
...
...
@@ -288,65 +288,9 @@ public class SettingsBackupAgent extends BackupAgentHelper {
@Override
public
void
onFullBackup
(
FullBackupDataOutput
data
)
throws
IOException
{
byte
[]
systemSettingsData
=
getSystemSettings
();
byte
[]
secureSettingsData
=
getSecureSettings
();
byte
[]
globalSettingsData
=
getGlobalSettings
();
byte
[]
lockSettingsData
=
getLockSettings
(
UserHandle
.
myUserId
());
byte
[]
locale
=
mSettingsHelper
.
getLocaleData
();
byte
[]
softApConfigData
=
getSoftAPConfiguration
();
byte
[]
netPoliciesData
=
getNetworkPolicies
();
byte
[]
wifiFullConfigData
=
getNewWifiConfigData
();
// Write the data to the staging file, then emit that as our tarfile
// representation of the backed-up settings.
String
root
=
getFilesDir
().
getAbsolutePath
();
File
stage
=
new
File
(
root
,
STAGE_FILE
);
try
{
FileOutputStream
filestream
=
new
FileOutputStream
(
stage
);
BufferedOutputStream
bufstream
=
new
BufferedOutputStream
(
filestream
);
DataOutputStream
out
=
new
DataOutputStream
(
bufstream
);
if
(
DEBUG_BACKUP
)
Log
.
d
(
TAG
,
"Writing flattened data version "
+
FULL_BACKUP_VERSION
);
out
.
writeInt
(
FULL_BACKUP_VERSION
);
if
(
DEBUG_BACKUP
)
Log
.
d
(
TAG
,
systemSettingsData
.
length
+
" bytes of settings data"
);
out
.
writeInt
(
systemSettingsData
.
length
);
out
.
write
(
systemSettingsData
);
if
(
DEBUG_BACKUP
)
{
Log
.
d
(
TAG
,
secureSettingsData
.
length
+
" bytes of secure settings data"
);
}
out
.
writeInt
(
secureSettingsData
.
length
);
out
.
write
(
secureSettingsData
);
if
(
DEBUG_BACKUP
)
{
Log
.
d
(
TAG
,
globalSettingsData
.
length
+
" bytes of global settings data"
);
}
out
.
writeInt
(
globalSettingsData
.
length
);
out
.
write
(
globalSettingsData
);
if
(
DEBUG_BACKUP
)
Log
.
d
(
TAG
,
locale
.
length
+
" bytes of locale data"
);
out
.
writeInt
(
locale
.
length
);
out
.
write
(
locale
);
if
(
DEBUG_BACKUP
)
Log
.
d
(
TAG
,
lockSettingsData
.
length
+
" bytes of lock settings data"
);
out
.
writeInt
(
lockSettingsData
.
length
);
out
.
write
(
lockSettingsData
);
if
(
DEBUG_BACKUP
)
Log
.
d
(
TAG
,
softApConfigData
.
length
+
" bytes of softap config data"
);
out
.
writeInt
(
softApConfigData
.
length
);
out
.
write
(
softApConfigData
);
if
(
DEBUG_BACKUP
)
Log
.
d
(
TAG
,
netPoliciesData
.
length
+
" bytes of net policies data"
);
out
.
writeInt
(
netPoliciesData
.
length
);
out
.
write
(
netPoliciesData
);
if
(
DEBUG_BACKUP
)
{
Log
.
d
(
TAG
,
wifiFullConfigData
.
length
+
" bytes of wifi config data"
);
}
out
.
writeInt
(
wifiFullConfigData
.
length
);
out
.
write
(
wifiFullConfigData
);
out
.
flush
();
// also flushes downstream
// now we're set to emit the tar stream
fullBackupFile
(
stage
,
data
);
}
finally
{
stage
.
delete
();
}
// Full backup of SettingsBackupAgent support was removed in Android P. If you want to adb
// backup com.android.providers.settings package use \"-keyvalue\" flag.
// Full restore of SettingsBackupAgent is still available for backwards compatibility.
}
@Override
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment