Merge change 817 into donut
* changes: Hide the backup stuff for now
This commit is contained in:
106
api/current.xml
106
api/current.xml
@@ -21740,112 +21740,6 @@
|
|||||||
</field>
|
</field>
|
||||||
</class>
|
</class>
|
||||||
</package>
|
</package>
|
||||||
<package name="android.backup"
|
|
||||||
>
|
|
||||||
<class name="BackupManager"
|
|
||||||
extends="java.lang.Object"
|
|
||||||
abstract="false"
|
|
||||||
static="false"
|
|
||||||
final="false"
|
|
||||||
deprecated="not deprecated"
|
|
||||||
visibility="public"
|
|
||||||
>
|
|
||||||
<constructor name="BackupManager"
|
|
||||||
type="android.backup.BackupManager"
|
|
||||||
static="false"
|
|
||||||
final="false"
|
|
||||||
deprecated="not deprecated"
|
|
||||||
visibility="public"
|
|
||||||
>
|
|
||||||
<parameter name="context" type="android.content.Context">
|
|
||||||
</parameter>
|
|
||||||
</constructor>
|
|
||||||
<method name="dataChanged"
|
|
||||||
return="void"
|
|
||||||
abstract="false"
|
|
||||||
native="false"
|
|
||||||
synchronized="false"
|
|
||||||
static="false"
|
|
||||||
final="false"
|
|
||||||
deprecated="not deprecated"
|
|
||||||
visibility="public"
|
|
||||||
>
|
|
||||||
</method>
|
|
||||||
</class>
|
|
||||||
<class name="BackupService"
|
|
||||||
extends="android.app.Service"
|
|
||||||
abstract="true"
|
|
||||||
static="false"
|
|
||||||
final="false"
|
|
||||||
deprecated="not deprecated"
|
|
||||||
visibility="public"
|
|
||||||
>
|
|
||||||
<constructor name="BackupService"
|
|
||||||
type="android.backup.BackupService"
|
|
||||||
static="false"
|
|
||||||
final="false"
|
|
||||||
deprecated="not deprecated"
|
|
||||||
visibility="public"
|
|
||||||
>
|
|
||||||
</constructor>
|
|
||||||
<method name="onBackup"
|
|
||||||
return="void"
|
|
||||||
abstract="true"
|
|
||||||
native="false"
|
|
||||||
synchronized="false"
|
|
||||||
static="false"
|
|
||||||
final="false"
|
|
||||||
deprecated="not deprecated"
|
|
||||||
visibility="public"
|
|
||||||
>
|
|
||||||
<parameter name="oldStateFd" type="int">
|
|
||||||
</parameter>
|
|
||||||
<parameter name="dataFd" type="int">
|
|
||||||
</parameter>
|
|
||||||
<parameter name="newStateFd" type="int">
|
|
||||||
</parameter>
|
|
||||||
</method>
|
|
||||||
<method name="onBind"
|
|
||||||
return="android.os.IBinder"
|
|
||||||
abstract="false"
|
|
||||||
native="false"
|
|
||||||
synchronized="false"
|
|
||||||
static="false"
|
|
||||||
final="false"
|
|
||||||
deprecated="not deprecated"
|
|
||||||
visibility="public"
|
|
||||||
>
|
|
||||||
<parameter name="intent" type="android.content.Intent">
|
|
||||||
</parameter>
|
|
||||||
</method>
|
|
||||||
<method name="onRestore"
|
|
||||||
return="void"
|
|
||||||
abstract="true"
|
|
||||||
native="false"
|
|
||||||
synchronized="false"
|
|
||||||
static="false"
|
|
||||||
final="false"
|
|
||||||
deprecated="not deprecated"
|
|
||||||
visibility="public"
|
|
||||||
>
|
|
||||||
<parameter name="dataFd" type="int">
|
|
||||||
</parameter>
|
|
||||||
<parameter name="newStateFd" type="int">
|
|
||||||
</parameter>
|
|
||||||
</method>
|
|
||||||
<field name="SERVICE_ACTION"
|
|
||||||
type="java.lang.String"
|
|
||||||
transient="false"
|
|
||||||
volatile="false"
|
|
||||||
value=""android.service.action.BACKUP""
|
|
||||||
static="true"
|
|
||||||
final="true"
|
|
||||||
deprecated="not deprecated"
|
|
||||||
visibility="public"
|
|
||||||
>
|
|
||||||
</field>
|
|
||||||
</class>
|
|
||||||
</package>
|
|
||||||
<package name="android.content"
|
<package name="android.content"
|
||||||
>
|
>
|
||||||
<class name="ActivityNotFoundException"
|
<class name="ActivityNotFoundException"
|
||||||
|
|||||||
@@ -34,6 +34,8 @@ import android.os.ServiceManager;
|
|||||||
* <p>The backup operation itself begins with the system launching the
|
* <p>The backup operation itself begins with the system launching the
|
||||||
* {@link BackupService} subclass declared in your manifest. See the documentation
|
* {@link BackupService} subclass declared in your manifest. See the documentation
|
||||||
* for {@link BackupService} for a detailed description of how the backup then proceeds.
|
* for {@link BackupService} for a detailed description of how the backup then proceeds.
|
||||||
|
*
|
||||||
|
* @hide pending API solidification
|
||||||
*/
|
*/
|
||||||
public class BackupManager {
|
public class BackupManager {
|
||||||
private Context mContext;
|
private Context mContext;
|
||||||
@@ -47,7 +49,7 @@ public class BackupManager {
|
|||||||
* one of your application's {@link android.app.Activity Activities}
|
* one of your application's {@link android.app.Activity Activities}
|
||||||
* was created.
|
* was created.
|
||||||
*/
|
*/
|
||||||
public BackupManager (Context context) {
|
public BackupManager(Context context) {
|
||||||
mContext = context;
|
mContext = context;
|
||||||
mService = IBackupManager.Stub.asInterface(
|
mService = IBackupManager.Stub.asInterface(
|
||||||
ServiceManager.getService(Context.BACKUP_SERVICE));
|
ServiceManager.getService(Context.BACKUP_SERVICE));
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ import android.util.Log;
|
|||||||
* </intent-filter>
|
* </intent-filter>
|
||||||
* </service></pre>
|
* </service></pre>
|
||||||
*
|
*
|
||||||
* <p><em>Not hidden but API subject to change and should not be published</em>
|
* @hide pending API solidification
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public abstract class BackupService extends Service {
|
public abstract class BackupService extends Service {
|
||||||
@@ -53,7 +53,7 @@ public abstract class BackupService extends Service {
|
|||||||
* IntentFilter} that accepts this action.
|
* IntentFilter} that accepts this action.
|
||||||
*/
|
*/
|
||||||
@SdkConstant(SdkConstantType.SERVICE_ACTION)
|
@SdkConstant(SdkConstantType.SERVICE_ACTION)
|
||||||
public static final String SERVICE_ACTION = "android.service.action.BACKUP";
|
public static final String SERVICE_ACTION = "android.backup.BackupService";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The application is being asked to write any data changed since the
|
* The application is being asked to write any data changed since the
|
||||||
@@ -95,8 +95,15 @@ public abstract class BackupService extends Service {
|
|||||||
|
|
||||||
// ----- Core implementation -----
|
// ----- Core implementation -----
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the private interface called by the backup system. Applications will
|
||||||
|
* not typically override this.
|
||||||
|
*/
|
||||||
public IBinder onBind(Intent intent) {
|
public IBinder onBind(Intent intent) {
|
||||||
return mBinder;
|
if (intent.getAction().equals(SERVICE_ACTION)) {
|
||||||
|
return mBinder;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private final IBinder mBinder = new BackupServiceBinder().asBinder();
|
private final IBinder mBinder = new BackupServiceBinder().asBinder();
|
||||||
|
|||||||
Reference in New Issue
Block a user