14a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate/*
24a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate * Copyright (C) 2009 The Android Open Source Project
34a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate *
44a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate * Licensed under the Apache License, Version 2.0 (the "License");
54a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate * you may not use this file except in compliance with the License.
64a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate * You may obtain a copy of the License at
74a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate *
84a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate *      http://www.apache.org/licenses/LICENSE-2.0
94a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate *
104a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate * Unless required by applicable law or agreed to in writing, software
114a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate * distributed under the License is distributed on an "AS IS" BASIS,
124a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
134a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate * See the License for the specific language governing permissions and
144a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate * limitations under the License.
154a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate */
164a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate
174a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tatepackage android.app.backup;
184a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate
194a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tateimport android.os.ParcelFileDescriptor;
2075a99709accef8cf221fd436d646727e7c8dd1f1Christopher Tateimport java.io.IOException;
214a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate
224a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate/**
2379ec80db70d788f35aa13346e4684ecbd401bd84Christopher Tate * Simple concrete class that merely provides the default BackupAgent full backup/restore
2479ec80db70d788f35aa13346e4684ecbd401bd84Christopher Tate * implementations for applications that do not supply their own.
254a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate *
264a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate * {@hide}
274a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate */
284a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate
294a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tatepublic class FullBackupAgent extends BackupAgent {
304a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate    @Override
314a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate    public void onBackup(ParcelFileDescriptor oldState, BackupDataOutput data,
32b0628bfd5aac480a0d412ac96b8af1d97ac01c30Christopher Tate            ParcelFileDescriptor newState) throws IOException {
3379ec80db70d788f35aa13346e4684ecbd401bd84Christopher Tate        // Doesn't do incremental backup/restore
344a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate    }
354a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate
3675a99709accef8cf221fd436d646727e7c8dd1f1Christopher Tate    @Override
3775a99709accef8cf221fd436d646727e7c8dd1f1Christopher Tate    public void onRestore(BackupDataInput data, int appVersionCode, ParcelFileDescriptor newState)
3875a99709accef8cf221fd436d646727e7c8dd1f1Christopher Tate            throws IOException {
3979ec80db70d788f35aa13346e4684ecbd401bd84Christopher Tate        // Doesn't do incremental backup/restore
404a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate    }
414a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate}
42