diff options
author | Svet Ganov <svetoslavganov@google.com> | 2015-07-16 16:28:51 -0700 |
---|---|---|
committer | Svet Ganov <svetoslavganov@google.com> | 2015-07-16 16:29:04 -0700 |
commit | 0f45c7c7c40f2863560988a24bc06f395e12244d (patch) | |
tree | 3093bc762a2894539734c3eee8a9537fb9336645 /core | |
parent | b09b84cafde5ac31f5ef5c79f7a78db540824471 (diff) | |
download | frameworks_base-0f45c7c7c40f2863560988a24bc06f395e12244d.zip frameworks_base-0f45c7c7c40f2863560988a24bc06f395e12244d.tar.gz frameworks_base-0f45c7c7c40f2863560988a24bc06f395e12244d.tar.bz2 |
Improve documentation of onRequestPermissionsResult
bug:22524902
Change-Id: Ic435171fa016d8841bea432c5c39d7b0a6a7b9e9
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/app/Activity.java | 5 | ||||
-rw-r--r-- | core/java/android/app/Fragment.java | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java index 7572799..e66da47 100644 --- a/core/java/android/app/Activity.java +++ b/core/java/android/app/Activity.java @@ -3771,6 +3771,11 @@ public class Activity extends ContextThemeWrapper /** * Callback for the result from requesting permissions. This method * is invoked for every call on {@link #requestPermissions(String[], int)}. + * <p> + * <strong>Note:</strong> It is possible that the permissions request interaction + * with the user is interrupted. In this case you will receive empty permissions + * and results arrays which should be treated as a cancellation. + * </p> * * @param requestCode The request code passed in {@link #requestPermissions(String[], int)}. * @param permissions The requested permissions. Never null. diff --git a/core/java/android/app/Fragment.java b/core/java/android/app/Fragment.java index 66e2733..82206ea 100644 --- a/core/java/android/app/Fragment.java +++ b/core/java/android/app/Fragment.java @@ -1213,6 +1213,11 @@ public class Fragment implements ComponentCallbacks2, OnCreateContextMenuListene /** * Callback for the result from requesting permissions. This method * is invoked for every call on {@link #requestPermissions(String[], int)}. + * <p> + * <strong>Note:</strong> It is possible that the permissions request interaction + * with the user is interrupted. In this case you will receive empty permissions + * and results arrays which should be treated as a cancellation. + * </p> * * @param requestCode The request code passed in {@link #requestPermissions(String[], int)}. * @param permissions The requested permissions. Never null. |