1225ae2587712b06a354b4ad4625aadc780fa4e80Martijn Coenen/* 2225ae2587712b06a354b4ad4625aadc780fa4e80Martijn Coenen * Copyright (C) 2011 The Android Open Source Project 3225ae2587712b06a354b4ad4625aadc780fa4e80Martijn Coenen * 4225ae2587712b06a354b4ad4625aadc780fa4e80Martijn Coenen * Licensed under the Apache License, Version 2.0 (the "License"); 5225ae2587712b06a354b4ad4625aadc780fa4e80Martijn Coenen * you may not use this file except in compliance with the License. 6225ae2587712b06a354b4ad4625aadc780fa4e80Martijn Coenen * You may obtain a copy of the License at 7225ae2587712b06a354b4ad4625aadc780fa4e80Martijn Coenen * 8225ae2587712b06a354b4ad4625aadc780fa4e80Martijn Coenen * http://www.apache.org/licenses/LICENSE-2.0 9225ae2587712b06a354b4ad4625aadc780fa4e80Martijn Coenen * 10225ae2587712b06a354b4ad4625aadc780fa4e80Martijn Coenen * Unless required by applicable law or agreed to in writing, software 11225ae2587712b06a354b4ad4625aadc780fa4e80Martijn Coenen * distributed under the License is distributed on an "AS IS" BASIS, 12225ae2587712b06a354b4ad4625aadc780fa4e80Martijn Coenen * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13225ae2587712b06a354b4ad4625aadc780fa4e80Martijn Coenen * See the License for the specific language governing permissions and 14225ae2587712b06a354b4ad4625aadc780fa4e80Martijn Coenen * limitations under the License. 15225ae2587712b06a354b4ad4625aadc780fa4e80Martijn Coenen */ 16225ae2587712b06a354b4ad4625aadc780fa4e80Martijn Coenen 17225ae2587712b06a354b4ad4625aadc780fa4e80Martijn Coenenpackage com.android.nfc; 18225ae2587712b06a354b4ad4625aadc780fa4e80Martijn Coenen 19225ae2587712b06a354b4ad4625aadc780fa4e80Martijn Coenenimport android.app.backup.BackupAgentHelper; 20225ae2587712b06a354b4ad4625aadc780fa4e80Martijn Coenenimport android.app.backup.SharedPreferencesBackupHelper; 21225ae2587712b06a354b4ad4625aadc780fa4e80Martijn Coenen 22225ae2587712b06a354b4ad4625aadc780fa4e80Martijn Coenenpublic class NfcBackupAgent extends BackupAgentHelper { 23225ae2587712b06a354b4ad4625aadc780fa4e80Martijn Coenen // Backup identifier 24225ae2587712b06a354b4ad4625aadc780fa4e80Martijn Coenen static final String SHARED_PREFS_BACKUP_KEY = "shared_prefs"; 25225ae2587712b06a354b4ad4625aadc780fa4e80Martijn Coenen 26225ae2587712b06a354b4ad4625aadc780fa4e80Martijn Coenen @Override 27225ae2587712b06a354b4ad4625aadc780fa4e80Martijn Coenen public void onCreate() { 28225ae2587712b06a354b4ad4625aadc780fa4e80Martijn Coenen SharedPreferencesBackupHelper helper = 29225ae2587712b06a354b4ad4625aadc780fa4e80Martijn Coenen new SharedPreferencesBackupHelper(this, NfcService.PREF); 30225ae2587712b06a354b4ad4625aadc780fa4e80Martijn Coenen addHelper(SHARED_PREFS_BACKUP_KEY, helper); 31225ae2587712b06a354b4ad4625aadc780fa4e80Martijn Coenen } 32225ae2587712b06a354b4ad4625aadc780fa4e80Martijn Coenen} 33225ae2587712b06a354b4ad4625aadc780fa4e80Martijn Coenen 34