Loading Android.mk +2 −0 Original line number Diff line number Diff line Loading @@ -88,8 +88,10 @@ LOCAL_SRC_FILES += \ core/java/android/bluetooth/IBluetoothDevice.aidl \ core/java/android/bluetooth/IBluetoothDeviceCallback.aidl \ core/java/android/bluetooth/IBluetoothHeadset.aidl \ core/java/android/content/IContentService.aidl \ core/java/android/content/ISyncAdapter.aidl \ core/java/android/content/ISyncContext.aidl \ core/java/android/content/ISyncStatusObserver.aidl \ core/java/android/content/pm/IPackageDataObserver.aidl \ core/java/android/content/pm/IPackageDeleteObserver.aidl \ core/java/android/content/pm/IPackageInstallObserver.aidl \ Loading api/current.xml +43 −0 Original line number Diff line number Diff line Loading @@ -94547,6 +94547,19 @@ visibility="public" > </method> <method name="getBroadcastCookie" return="java.lang.Object" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="index" type="int"> </parameter> </method> <method name="getBroadcastItem" return="E" abstract="false" Loading Loading @@ -94584,6 +94597,21 @@ <parameter name="callback" type="E"> </parameter> </method> <method name="onCallbackDied" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="callback" type="E"> </parameter> <parameter name="cookie" type="java.lang.Object"> </parameter> </method> <method name="register" return="boolean" abstract="false" Loading @@ -94597,6 +94625,21 @@ <parameter name="callback" type="E"> </parameter> </method> <method name="register" return="boolean" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="callback" type="E"> </parameter> <parameter name="cookie" type="java.lang.Object"> </parameter> </method> <method name="unregister" return="boolean" abstract="false" core/java/android/content/ActiveSyncInfo.aidl 0 → 100644 +19 −0 Original line number Diff line number Diff line /* * Copyright (C) 2009 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.content; parcelable ActiveSyncInfo; core/java/android/content/ActiveSyncInfo.java 0 → 100644 +65 −0 Original line number Diff line number Diff line /* * Copyright (C) 2009 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.content; import android.accounts.Account; import android.os.Parcel; import android.os.Parcelable.Creator; /** @hide */ public class ActiveSyncInfo { public final int authorityId; public final Account account; public final String authority; public final long startTime; ActiveSyncInfo(int authorityId, Account account, String authority, long startTime) { this.authorityId = authorityId; this.account = account; this.authority = authority; this.startTime = startTime; } public int describeContents() { return 0; } public void writeToParcel(Parcel parcel, int flags) { parcel.writeInt(authorityId); account.writeToParcel(parcel, 0); parcel.writeString(authority); parcel.writeLong(startTime); } ActiveSyncInfo(Parcel parcel) { authorityId = parcel.readInt(); account = new Account(parcel); authority = parcel.readString(); startTime = parcel.readLong(); } public static final Creator<ActiveSyncInfo> CREATOR = new Creator<ActiveSyncInfo>() { public ActiveSyncInfo createFromParcel(Parcel in) { return new ActiveSyncInfo(in); } public ActiveSyncInfo[] newArray(int size) { return new ActiveSyncInfo[size]; } }; } No newline at end of file core/java/android/content/ContentResolver.java +26 −7 Original line number Diff line number Diff line Loading @@ -25,10 +25,14 @@ import android.database.CursorWrapper; import android.database.IContentObserver; import android.net.Uri; import android.os.Bundle; import android.os.IBinder; import android.os.ParcelFileDescriptor; import android.os.RemoteException; import android.os.ServiceManager; import android.text.TextUtils; import android.accounts.Account; import android.util.Config; import android.util.Log; import java.io.File; import java.io.FileInputStream; Loading Loading @@ -86,8 +90,7 @@ public abstract class ContentResolver { */ public static final String CURSOR_DIR_BASE_TYPE = "vnd.android.cursor.dir"; public ContentResolver(Context context) { public ContentResolver(Context context) { mContext = context; } Loading Loading @@ -646,7 +649,7 @@ public abstract class ContentResolver { ContentObserver observer) { try { ContentServiceNative.getDefault().registerContentObserver(uri, notifyForDescendents, getContentService().registerContentObserver(uri, notifyForDescendents, observer.getContentObserver()); } catch (RemoteException e) { } Loading @@ -662,7 +665,7 @@ public abstract class ContentResolver { try { IContentObserver contentObserver = observer.releaseContentObserver(); if (contentObserver != null) { ContentServiceNative.getDefault().unregisterContentObserver( getContentService().unregisterContentObserver( contentObserver); } } catch (RemoteException e) { Loading Loading @@ -692,7 +695,7 @@ public abstract class ContentResolver { */ public void notifyChange(Uri uri, ContentObserver observer, boolean syncToNetwork) { try { ContentServiceNative.getDefault().notifyChange( getContentService().notifyChange( uri, observer == null ? null : observer.getContentObserver(), observer != null && observer.deliverSelfNotifications(), syncToNetwork); } catch (RemoteException e) { Loading @@ -718,7 +721,7 @@ public abstract class ContentResolver { public void startSync(Uri uri, Bundle extras) { validateSyncExtrasBundle(extras); try { ContentServiceNative.getDefault().startSync(uri, extras); getContentService().startSync(uri, extras); } catch (RemoteException e) { } } Loading Loading @@ -761,7 +764,7 @@ public abstract class ContentResolver { public void cancelSync(Uri uri) { try { ContentServiceNative.getDefault().cancelSync(uri); getContentService().cancelSync(uri); } catch (RemoteException e) { } } Loading Loading @@ -822,6 +825,22 @@ public abstract class ContentResolver { } } /** @hide */ public static final String CONTENT_SERVICE_NAME = "content"; /** @hide */ public static IContentService getContentService() { if (sContentService != null) { return sContentService; } IBinder b = ServiceManager.getService(CONTENT_SERVICE_NAME); if (Config.LOGV) Log.v("ContentService", "default service binder = " + b); sContentService = IContentService.Stub.asInterface(b); if (Config.LOGV) Log.v("ContentService", "default service = " + sContentService); return sContentService; } private static IContentService sContentService; private final Context mContext; private static final String TAG = "ContentResolver"; } Loading
Android.mk +2 −0 Original line number Diff line number Diff line Loading @@ -88,8 +88,10 @@ LOCAL_SRC_FILES += \ core/java/android/bluetooth/IBluetoothDevice.aidl \ core/java/android/bluetooth/IBluetoothDeviceCallback.aidl \ core/java/android/bluetooth/IBluetoothHeadset.aidl \ core/java/android/content/IContentService.aidl \ core/java/android/content/ISyncAdapter.aidl \ core/java/android/content/ISyncContext.aidl \ core/java/android/content/ISyncStatusObserver.aidl \ core/java/android/content/pm/IPackageDataObserver.aidl \ core/java/android/content/pm/IPackageDeleteObserver.aidl \ core/java/android/content/pm/IPackageInstallObserver.aidl \ Loading
api/current.xml +43 −0 Original line number Diff line number Diff line Loading @@ -94547,6 +94547,19 @@ visibility="public" > </method> <method name="getBroadcastCookie" return="java.lang.Object" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="index" type="int"> </parameter> </method> <method name="getBroadcastItem" return="E" abstract="false" Loading Loading @@ -94584,6 +94597,21 @@ <parameter name="callback" type="E"> </parameter> </method> <method name="onCallbackDied" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="callback" type="E"> </parameter> <parameter name="cookie" type="java.lang.Object"> </parameter> </method> <method name="register" return="boolean" abstract="false" Loading @@ -94597,6 +94625,21 @@ <parameter name="callback" type="E"> </parameter> </method> <method name="register" return="boolean" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="callback" type="E"> </parameter> <parameter name="cookie" type="java.lang.Object"> </parameter> </method> <method name="unregister" return="boolean" abstract="false"
core/java/android/content/ActiveSyncInfo.aidl 0 → 100644 +19 −0 Original line number Diff line number Diff line /* * Copyright (C) 2009 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.content; parcelable ActiveSyncInfo;
core/java/android/content/ActiveSyncInfo.java 0 → 100644 +65 −0 Original line number Diff line number Diff line /* * Copyright (C) 2009 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.content; import android.accounts.Account; import android.os.Parcel; import android.os.Parcelable.Creator; /** @hide */ public class ActiveSyncInfo { public final int authorityId; public final Account account; public final String authority; public final long startTime; ActiveSyncInfo(int authorityId, Account account, String authority, long startTime) { this.authorityId = authorityId; this.account = account; this.authority = authority; this.startTime = startTime; } public int describeContents() { return 0; } public void writeToParcel(Parcel parcel, int flags) { parcel.writeInt(authorityId); account.writeToParcel(parcel, 0); parcel.writeString(authority); parcel.writeLong(startTime); } ActiveSyncInfo(Parcel parcel) { authorityId = parcel.readInt(); account = new Account(parcel); authority = parcel.readString(); startTime = parcel.readLong(); } public static final Creator<ActiveSyncInfo> CREATOR = new Creator<ActiveSyncInfo>() { public ActiveSyncInfo createFromParcel(Parcel in) { return new ActiveSyncInfo(in); } public ActiveSyncInfo[] newArray(int size) { return new ActiveSyncInfo[size]; } }; } No newline at end of file
core/java/android/content/ContentResolver.java +26 −7 Original line number Diff line number Diff line Loading @@ -25,10 +25,14 @@ import android.database.CursorWrapper; import android.database.IContentObserver; import android.net.Uri; import android.os.Bundle; import android.os.IBinder; import android.os.ParcelFileDescriptor; import android.os.RemoteException; import android.os.ServiceManager; import android.text.TextUtils; import android.accounts.Account; import android.util.Config; import android.util.Log; import java.io.File; import java.io.FileInputStream; Loading Loading @@ -86,8 +90,7 @@ public abstract class ContentResolver { */ public static final String CURSOR_DIR_BASE_TYPE = "vnd.android.cursor.dir"; public ContentResolver(Context context) { public ContentResolver(Context context) { mContext = context; } Loading Loading @@ -646,7 +649,7 @@ public abstract class ContentResolver { ContentObserver observer) { try { ContentServiceNative.getDefault().registerContentObserver(uri, notifyForDescendents, getContentService().registerContentObserver(uri, notifyForDescendents, observer.getContentObserver()); } catch (RemoteException e) { } Loading @@ -662,7 +665,7 @@ public abstract class ContentResolver { try { IContentObserver contentObserver = observer.releaseContentObserver(); if (contentObserver != null) { ContentServiceNative.getDefault().unregisterContentObserver( getContentService().unregisterContentObserver( contentObserver); } } catch (RemoteException e) { Loading Loading @@ -692,7 +695,7 @@ public abstract class ContentResolver { */ public void notifyChange(Uri uri, ContentObserver observer, boolean syncToNetwork) { try { ContentServiceNative.getDefault().notifyChange( getContentService().notifyChange( uri, observer == null ? null : observer.getContentObserver(), observer != null && observer.deliverSelfNotifications(), syncToNetwork); } catch (RemoteException e) { Loading @@ -718,7 +721,7 @@ public abstract class ContentResolver { public void startSync(Uri uri, Bundle extras) { validateSyncExtrasBundle(extras); try { ContentServiceNative.getDefault().startSync(uri, extras); getContentService().startSync(uri, extras); } catch (RemoteException e) { } } Loading Loading @@ -761,7 +764,7 @@ public abstract class ContentResolver { public void cancelSync(Uri uri) { try { ContentServiceNative.getDefault().cancelSync(uri); getContentService().cancelSync(uri); } catch (RemoteException e) { } } Loading Loading @@ -822,6 +825,22 @@ public abstract class ContentResolver { } } /** @hide */ public static final String CONTENT_SERVICE_NAME = "content"; /** @hide */ public static IContentService getContentService() { if (sContentService != null) { return sContentService; } IBinder b = ServiceManager.getService(CONTENT_SERVICE_NAME); if (Config.LOGV) Log.v("ContentService", "default service binder = " + b); sContentService = IContentService.Stub.asInterface(b); if (Config.LOGV) Log.v("ContentService", "default service = " + sContentService); return sContentService; } private static IContentService sContentService; private final Context mContext; private static final String TAG = "ContentResolver"; }