Implement new MockContentProvider. Also make ContentProvider aware of the class.

Rename the old MockContentProvider to MockIContentProvider since it is
more appropriate name.

Detail:
Current developers inevitably depend on the backend used by ContentProvider,
which is useful but not ideal nor "testable" from the view of them.

Current MockContentResolver only accepts exact "ContentProvider" class, not
IContentProvider interface, since we want to hide "IContentProvider" while
the old MockContentProvider implements IContentProvider and as a result some
methods we want to hide may be exposed to the public SDK now and probably
for the future.

On the other hand, ContentProvider is not interface but an exact class
heavily depends on the internal logic and not suitable for external
developers to use for tests.

The new MockContentProvider introduces the mock implementation
for ContentProvider.
It extends ContentProvider, so "is" ContentProvider, but tries to avoid
depending on any backend System like IPC in Android, etc.
This should be useful from the view of application developers who do not
want to be confused with ContentProvider/ContentResolver backend
implementation "at all" and want to use MockContentResolver without
any other ContentProvider implementations tightly connected to the
external worlds.
diff --git a/core/java/android/content/ContentProvider.java b/core/java/android/content/ContentProvider.java
index a341c9b..8d90b83 100644
--- a/core/java/android/content/ContentProvider.java
+++ b/core/java/android/content/ContentProvider.java
@@ -67,6 +67,11 @@
  * process a request is coming from.</p>
  */
 public abstract class ContentProvider implements ComponentCallbacks {
+    /*
+     * Note: if you add methods to ContentProvider, you must add similar methods to
+     *       MockContentProvider.
+     */
+
     private Context mContext = null;
     private int mMyUid;
     private String mReadPermission;
@@ -75,6 +80,33 @@
 
     private Transport mTransport = new Transport();
 
+    public ContentProvider() {
+    }
+
+    /**
+     * Constructor just for mocking.
+     *
+     * @param context A Context object which should be some mock instance (like the
+     * instance of {@link android.test.mock.MockContext}).
+     * @param readPermission The read permision you want this instance should have in the
+     * test, which is available via {@link #getReadPermission()}.
+     * @param writePermission The write permission you want this instance should have
+     * in the test, which is available via {@link #getWritePermission()}.
+     * @param pathPermissions The PathPermissions you want this instance should have
+     * in the test, which is available via {@link #getPathPermissions()}.
+     * @hide
+     */
+    public ContentProvider(
+            Context context,
+            String readPermission,
+            String writePermission,
+            PathPermission[] pathPermissions) {
+        mContext = context;
+        mReadPermission = readPermission;
+        mWritePermission = writePermission;
+        mPathPermissions = pathPermissions;
+    }
+
     /**
      * Given an IContentProvider, try to coerce it back to the real
      * ContentProvider object if it is running in the local process.  This can