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

Commit f66381cd authored by Svet Ganov's avatar Svet Ganov
Browse files

Improve requestPermissions API docs and throw correct exception.

bug:26220898

Change-Id: Iebda3fe13b963b10829de917fb00a9a14186b72c
parent 3dbcd203
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4095,7 +4095,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
@@ -3167,7 +3167,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);