legacy/v13/src/main/java/androidx/legacy/app/FragmentCompat.java
@Deprecated
    public static void requestPermissions(@NonNull Fragment fragment,
            @NonNull String[] permissions, int requestCode) {
        if (sDelegate != null && sDelegate.requestPermissions(fragment, permissions, requestCode)) {
            // Delegate has handled the request.
            return;
        }

        IMPL.requestPermissions(fragment, permissions, requestCode);
    }
/**
     * Requests permissions to be granted to this application. These permissions
     * must be requested in your manifest, they should not be granted to your app,
     * and they should have protection level {@link android.content.pm.PermissionInfo
     * #PROTECTION_DANGEROUS dangerous}, regardless whether they are declared by
     * the platform or a third-party app.
     * <p>
     * Normal permissions {@link android.content.pm.PermissionInfo#PROTECTION_NORMAL}
     * are granted at install time if requested in the manifest. Signature permissions
     * {@link android.content.pm.PermissionInfo#PROTECTION_SIGNATURE} are granted at
     * install time if requested in the manifest and the signature of your app matches
     * the signature of the app declaring the permissions.
     * </p>
     * <p>
     * If your app does not have the requested permissions the user will be presented
     * with UI for accepting them. After the user has accepted or rejected the
     * requested permissions you will receive a callback reporting whether the
     * permissions were granted or not. Your fragment has to implement {@link
     * OnRequestPermissionsResultCallback}
     * and the results of permission requests will be delivered to its
     * {@link OnRequestPermissionsResultCallback#onRequestPermissionsResult(
     * int, String[], int[])}.
     * </p>
     * <p>
     * Note that requesting a permission does not guarantee it will be granted and
     * your app should be able to run without having this permission.
     * </p>
     * <p>
     * This method may start an activity allowing the user to choose which permissions
     * to grant and which to reject. Hence, you should be prepared that your activity
     * may be paused and resumed. Further, granting some permissions may require
     * a restart of you application. In such a case, the system will recreate the
     * activity stack before delivering the result to your onRequestPermissionsResult(
     * int, String[], int[]).
     * </p>
     * <p>
     * When checking whether you have a permission you should use {@link
     * androidx.core.content.ContextCompat#checkSelfPermission(
     * android.content.Context, String)}.
     * </p>
     *
     * @param fragment The target fragment.
     * @param permissions The requested permissions.
     * @param requestCode Application specific request code to match with a result
     *    reported to {@link OnRequestPermissionsResultCallback#onRequestPermissionsResult(
     *    int, String[], int[])}.
     *
     * @see androidx.core.content.ContextCompat#checkSelfPermission(
     *     android.content.Context, String)
     * @see #shouldShowRequestPermissionRationale(android.app.Fragment, String)
     *
     * @deprecated Use {@link androidx.fragment.app.Fragment} instead of the framework
     * {@link Fragment}.
     */
Requests permissions to be granted to this application. These permissions
must be requested in your manifest, they should not be granted to your app,
and they should have protection level {@link android.content.pm.PermissionInfo
#PROTECTION_DANGEROUS dangerous}, regardless whether they are declared by
the platform or a third-party app.

Normal permissions  android.content.pm.PermissionInfo#PROTECTION_NORMAL
are granted at install time if requested in the manifest. Signature permissions
android.content.pm.PermissionInfo#PROTECTION_SIGNATURE are granted at
install time if requested in the manifest and the signature of your app matches
the signature of the app declaring the permissions.


If your app does not have the requested permissions the user will be presented
with UI for accepting them. After the user has accepted or rejected the
requested permissions you will receive a callback reporting whether the
permissions were granted or not. Your fragment has to implement {@link
OnRequestPermissionsResultCallback}
and the results of permission requests will be delivered to its
{@link OnRequestPermissionsResultCallback#onRequestPermissionsResult(
int, String[], int[])}.


Note that requesting a permission does not guarantee it will be granted and
your app should be able to run without having this permission.


This method may start an activity allowing the user to choose which permissions
to grant and which to reject. Hence, you should be prepared that your activity
may be paused and resumed. Further, granting some permissions may require
a restart of you application. In such a case, the system will recreate the
activity stack before delivering the result to your onRequestPermissionsResult(
int, String[], int[]).


When checking whether you have a permission you should use {@link
androidx.core.content.ContextCompat#checkSelfPermission(
android.content.Context, String)}.

@param fragment The target fragment.
@param permissions The requested permissions.
@param requestCode Application specific request code to match with a result
reported to {@link OnRequestPermissionsResultCallback#onRequestPermissionsResult(
int, String[], int[])}.



@deprecated Use  androidx.fragment.app.Fragment instead of the framework
Fragment.
Requests permissions to be granted to this application . These permissions must be requested in your manifest they should not be granted to your app and they should have protection level { @link android . content . pm . PermissionInfo #PROTECTION_DANGEROUS dangerous } regardless whether they are declared by the platform or a third - party app . Normal permissions android . content . pm . PermissionInfo#PROTECTION_NORMAL are granted at install time if requested in the manifest . Signature permissions android . content . pm . PermissionInfo#PROTECTION_SIGNATURE are granted at install time if requested in the manifest and the signature of your app matches the signature of the app declaring the permissions . If your app does not have the requested permissions the user will be presented with UI for accepting them . After the user has accepted or rejected the requested permissions you will receive a callback reporting whether the permissions were granted or not . Your fragment has to implement { @link OnRequestPermissionsResultCallback } and the results of permission requests will be delivered to its { @link OnRequestPermissionsResultCallback#onRequestPermissionsResult ( int String [] int [] ) } . Note that requesting a permission does not guarantee it will be granted and your app should be able to run without having this permission . This method may start an activity allowing the user to choose which permissions to grant and which to reject . Hence you should be prepared that your activity may be paused and resumed . Further granting some permissions may require a restart of you application . In such a case the system will recreate the activity stack before delivering the result to your onRequestPermissionsResult ( int String [] int [] ) . When checking whether you have a permission you should use { @link androidx . core . content . ContextCompat#checkSelfPermission ( android . content . Context String ) } . @param fragment The target fragment . @param permissions The requested permissions . @param requestCode Application specific request code to match with a result reported to { @link OnRequestPermissionsResultCallback#onRequestPermissionsResult ( int String [] int [] ) } . @deprecated Use androidx . fragment . app . Fragment instead of the framework Fragment .
@Deprecated
    public static void requestPermissions(@NonNull Fragment fragment,
            @NonNull String[] permissions, int requestCode) {
        if (sDelegate != null && sDelegate.requestPermissions(fragment, permissions, requestCode)) {
            return;
        }
        IMPL.requestPermissions(fragment, permissions, requestCode);
    }
@ Deprecated public static void requestPermissions ( @ NonNull Fragment fragment , @ NonNull String [ ] permissions , int requestCode ) { if ( sDelegate != null && sDelegate . requestPermissions ( fragment , permissions , requestCode ) ) { return ; } IMPL . requestPermissions ( fragment , permissions , requestCode ) ; }
Requests permissions to be granted to this application.
Requests permissions to be granted to this application .
// Delegate has handled the request.