diff options
author | Dianne Hackborn <hackbod@google.com> | 2013-01-14 17:38:02 -0800 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2013-01-16 12:11:01 -0800 |
commit | 35654b61e8fe7bc85afcb076ddbb590d51c5865f (patch) | |
tree | 0f42a90b4deaa0156d84df5d79b78cd6f2ac8807 /tools/layoutlib/bridge | |
parent | 8a8b047f2d28f6b2d728731a7e71eeaf16f89700 (diff) | |
download | frameworks_base-35654b61e8fe7bc85afcb076ddbb590d51c5865f.zip frameworks_base-35654b61e8fe7bc85afcb076ddbb590d51c5865f.tar.gz frameworks_base-35654b61e8fe7bc85afcb076ddbb590d51c5865f.tar.bz2 |
More work on App Ops service.
Implemented reading and writing state to retain information
across boots, API to retrieve state from it, improved location
manager interaction to monitor both coarse and fine access
and only note operations when location data is being delivered
back to app (not when it is just registering to get the data at
some time in the future).
Also implement tracking of read/write ops on contacts and the
call log. This involved tweaking the content provider protocol
to pass over the name of the calling package, and some
infrastructure in the ContentProvider transport to note incoming
calls with the app ops service. The contacts provider and call
log provider turn this on for themselves.
This also implements some of the mechanics of being able to ignore
incoming provider calls... all that is left are some new APIs for
the real content provider implementation to be involved with
providing the correct behavior for query() (return an empty
cursor with the right columns) and insert() (need to figure out
what URI to return).
Change-Id: I36ebbcd63dee58264a480f3d3786891ca7cbdb4c
Diffstat (limited to 'tools/layoutlib/bridge')
-rw-r--r-- | tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContentProvider.java | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContentProvider.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContentProvider.java index f770ccc..4aea38f 100644 --- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContentProvider.java +++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContentProvider.java @@ -40,26 +40,30 @@ import java.util.ArrayList; */ public final class BridgeContentProvider implements IContentProvider { @Override - public ContentProviderResult[] applyBatch(ArrayList<ContentProviderOperation> arg0) + public ContentProviderResult[] applyBatch(String callingPackage, + ArrayList<ContentProviderOperation> arg0) throws RemoteException, OperationApplicationException { // TODO Auto-generated method stub return null; } @Override - public int bulkInsert(Uri arg0, ContentValues[] arg1) throws RemoteException { + public int bulkInsert(String callingPackage, Uri arg0, ContentValues[] arg1) + throws RemoteException { // TODO Auto-generated method stub return 0; } @Override - public Bundle call(String arg0, String arg1, Bundle arg2) throws RemoteException { + public Bundle call(String callingPackage, String arg0, String arg1, Bundle arg2) + throws RemoteException { // TODO Auto-generated method stub return null; } @Override - public int delete(Uri arg0, String arg1, String[] arg2) throws RemoteException { + public int delete(String callingPackage, Uri arg0, String arg1, String[] arg2) + throws RemoteException { // TODO Auto-generated method stub return 0; } @@ -71,35 +75,35 @@ public final class BridgeContentProvider implements IContentProvider { } @Override - public Uri insert(Uri arg0, ContentValues arg1) throws RemoteException { + public Uri insert(String callingPackage, Uri arg0, ContentValues arg1) throws RemoteException { // TODO Auto-generated method stub return null; } @Override - public AssetFileDescriptor openAssetFile(Uri arg0, String arg1) throws RemoteException, - FileNotFoundException { + public AssetFileDescriptor openAssetFile(String callingPackage, Uri arg0, String arg1) + throws RemoteException, FileNotFoundException { // TODO Auto-generated method stub return null; } @Override - public ParcelFileDescriptor openFile(Uri arg0, String arg1) throws RemoteException, - FileNotFoundException { + public ParcelFileDescriptor openFile(String callingPackage, Uri arg0, String arg1) + throws RemoteException, FileNotFoundException { // TODO Auto-generated method stub return null; } @Override - public Cursor query(Uri arg0, String[] arg1, String arg2, String[] arg3, String arg4, - ICancellationSignal arg5) throws RemoteException { + public Cursor query(String callingPackage, Uri arg0, String[] arg1, String arg2, String[] arg3, + String arg4, ICancellationSignal arg5) throws RemoteException { // TODO Auto-generated method stub return null; } @Override - public int update(Uri arg0, ContentValues arg1, String arg2, String[] arg3) - throws RemoteException { + public int update(String callingPackage, Uri arg0, ContentValues arg1, String arg2, + String[] arg3) throws RemoteException { // TODO Auto-generated method stub return 0; } @@ -117,8 +121,8 @@ public final class BridgeContentProvider implements IContentProvider { } @Override - public AssetFileDescriptor openTypedAssetFile(Uri arg0, String arg1, Bundle arg2) - throws RemoteException, FileNotFoundException { + public AssetFileDescriptor openTypedAssetFile(String callingPackage, Uri arg0, String arg1, + Bundle arg2) throws RemoteException, FileNotFoundException { // TODO Auto-generated method stub return null; } |