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

Commit 0f3431b6 authored by Svetoslav Ganov's avatar Svetoslav Ganov Committed by Android (Google) Code Review
Browse files

Merge "Improve requestPermissions API docs and throw correct exception." into nyc-dev

parents 2e5cdb52 f66381cd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4100,7 +4100,7 @@ public class Activity extends ContextThemeWrapper
     * }
     * </code></pre></p>
     *
     * @param permissions The requested permissions.
     * @param permissions The requested permissions. Must me non-null and not empty.
     * @param requestCode Application specific request code to match with a result
     *    reported to {@link #onRequestPermissionsResult(int, String[], int[])}.
     *    Should be >= 0.
+1 −1
Original line number Diff line number Diff line
@@ -1203,7 +1203,7 @@ public class Fragment implements ComponentCallbacks2, OnCreateContextMenuListene
     * }
     * </code></pre></p>
     *
     * @param permissions The requested permissions.
     * @param permissions The requested permissions. Must me non-null and not empty.
     * @param requestCode Application specific request code to match with a result
     *    reported to {@link #onRequestPermissionsResult(int, String[], int[])}.
     *    Should be >= 0.
+1 −1
Original line number Diff line number Diff line
@@ -3175,7 +3175,7 @@ public abstract class PackageManager {
     */
    public Intent buildRequestPermissionsIntent(@NonNull String[] permissions) {
        if (ArrayUtils.isEmpty(permissions)) {
           throw new NullPointerException("permission cannot be null or empty");
           throw new IllegalArgumentException("permission cannot be null or empty");
        }
        Intent intent = new Intent(ACTION_REQUEST_PERMISSIONS);
        intent.putExtra(EXTRA_REQUEST_PERMISSIONS_NAMES, permissions);