Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ public static int update(Context c, Uri uri, ContentValues values, String select
}

try {
Object obj = ProxyRePluginProviderClientVar.update.call(null, c, uri);
Object obj = ProxyRePluginProviderClientVar.update.call(null, c, uri, values, selection, selectionArgs);
if (obj != null) {
return (Integer) obj;
}
Expand Down Expand Up @@ -225,6 +225,44 @@ public static String getType(Context c, Uri uri) {
return null;
}

/**
* 调用插件里的Provider
*
* @see android.content.ContentResolver#notifyChange(Uri, ContentObserver)
*/
public static void notifyChange(Context c, Uri uri, ContentObserver observer) {
if (c == null) {
return;
}

try {
ProxyRePluginProviderClientVar.notifyChange.call(null, c, uri, observer);
} catch (Exception e) {
if (DEBUG) {
LogUtils.logError(TAG, "", e);
}
}
}

/**
* 调用插件里的Provider
*
* @see android.content.ContentResolver#registerContentObserver(Uri, boolean, ContentObserver)
*/
public static void registerContentObserver(Context c, Uri uri, boolean notifyForDescendants, ContentObserver observer) {
if (c == null) {
return;
}

try {
ProxyRePluginProviderClientVar.registerContentObserver.call(null, c, uri, notifyForDescendants, observer);
} catch (Exception e) {
if (DEBUG) {
LogUtils.logError(TAG, "", e);
}
}
}

public static class ProxyRePluginProviderClientVar {

private static MethodInvoker query;
Expand Down Expand Up @@ -285,12 +323,12 @@ public static void initLocked(final ClassLoader classLoader) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
openFileDescriptor2 = new MethodInvoker(classLoader, rePluginProviderClient, "openFileDescriptor", new Class<?>[]{Context.class, Uri.class, String.class, CancellationSignal.class});
}
registerContentObserver = new MethodInvoker(classLoader, rePluginProviderClient, "registerContentObserver", new Class<?>[]{Context.class, Uri.class, Boolean.class, ContentObserver.class});
registerContentObserver = new MethodInvoker(classLoader, rePluginProviderClient, "registerContentObserver", new Class<?>[]{Context.class, Uri.class, boolean.class, ContentObserver.class});
acquireContentProviderClient = new MethodInvoker(classLoader, rePluginProviderClient, "acquireContentProviderClient", new Class<?>[]{Context.class, String.class});
notifyChange = new MethodInvoker(classLoader, rePluginProviderClient, "notifyChange", new Class<?>[]{Context.class, Uri.class, ContentObserver.class});
notifyChange2 = new MethodInvoker(classLoader, rePluginProviderClient, "notifyChange", new Class<?>[]{Context.class, Uri.class, ContentObserver.class, Boolean.class});
notifyChange2 = new MethodInvoker(classLoader, rePluginProviderClient, "notifyChange", new Class<?>[]{Context.class, Uri.class, ContentObserver.class, boolean.class});
toCalledUri = new MethodInvoker(classLoader, rePluginProviderClient, "toCalledUri", new Class<?>[]{Context.class, Uri.class});
toCalledUri2 = new MethodInvoker(classLoader, rePluginProviderClient, "toCalledUri", new Class<?>[]{Context.class, String.class, Uri.class, Integer.class});
toCalledUri2 = new MethodInvoker(classLoader, rePluginProviderClient, "toCalledUri", new Class<?>[]{Context.class, String.class, Uri.class, int.class});
}
}
}
Expand Down