Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f9c5176a authored by Yury Zhauniarovich's avatar Yury Zhauniarovich Committed by Gerrit Code Review
Browse files

Function uri.getAuthority is called twice. Minor doc corrections.



Function uri.getAuthority was called twice in methods acquireProvider
and acquireExistingProvider was called twice although a parameter
representing the value had existed. The second call to the function is
changed to the parameter. The parameter's modifier changed to final.
Minor corrections in function descriptions in the file.

Signed-off-by: default avatarYury Zhauniarovich <y.zhalnerovich@gmail.com>
Change-Id: Id003aa38c17d644357873c41a8f5ec455e46a4b7
parent 7ad885e2
Loading
Loading
Loading
Loading
+5 −5
Original line number Original line Diff line number Diff line
@@ -518,7 +518,7 @@ public abstract class ContentResolver {
     * ContentProvider.openFile}.
     * ContentProvider.openFile}.
     * @return Returns a new ParcelFileDescriptor pointing to the file.  You
     * @return Returns a new ParcelFileDescriptor pointing to the file.  You
     * own this descriptor and are responsible for closing it when done.
     * own this descriptor and are responsible for closing it when done.
     * @throws FileNotFoundException Throws FileNotFoundException of no
     * @throws FileNotFoundException Throws FileNotFoundException if no
     * file exists under the URI or the mode is invalid.
     * file exists under the URI or the mode is invalid.
     * @see #openAssetFileDescriptor(Uri, String)
     * @see #openAssetFileDescriptor(Uri, String)
     */
     */
@@ -1049,9 +1049,9 @@ public abstract class ContentResolver {
        if (!SCHEME_CONTENT.equals(uri.getScheme())) {
        if (!SCHEME_CONTENT.equals(uri.getScheme())) {
            return null;
            return null;
        }
        }
        String auth = uri.getAuthority();
        final String auth = uri.getAuthority();
        if (auth != null) {
        if (auth != null) {
            return acquireProvider(mContext, uri.getAuthority());
            return acquireProvider(mContext, auth);
        }
        }
        return null;
        return null;
    }
    }
@@ -1068,9 +1068,9 @@ public abstract class ContentResolver {
        if (!SCHEME_CONTENT.equals(uri.getScheme())) {
        if (!SCHEME_CONTENT.equals(uri.getScheme())) {
            return null;
            return null;
        }
        }
        String auth = uri.getAuthority();
        final String auth = uri.getAuthority();
        if (auth != null) {
        if (auth != null) {
            return acquireExistingProvider(mContext, uri.getAuthority());
            return acquireExistingProvider(mContext, auth);
        }
        }
        return null;
        return null;
    }
    }