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

Commit f15a419e authored by Danny Baumann's avatar Danny Baumann
Browse files

Fix documentation of requestCode parameter.

It's not correct to state requestCode is 'currently not used'. It can be
used to differentiate multiple PendingIntents since a number of Android
versions now. Also, the introduction block of the PendingIntent
documentation explicitly states this as a possible use:
"If you truly need multiple distinct PendingIntent objects active at the same
time [...], then you will need to ensure there is something that is different
about them to associate them with different PendingIntents. This may be
any of the Intent attributes considered by Intent.filterEquals, or
different request code integers supplied [...]"

So fix the documentation inconsistency to make the possible use
immediately clear.

Change-Id: Ia65d7a5ab12c2c3ee1aa1c5107e5ea8fd937b765
parent 9658de2d
Loading
Loading
Loading
Loading
+6 −12
Original line number Diff line number Diff line
@@ -202,8 +202,7 @@ public final class PendingIntent implements Parcelable {
     *
     * @param context The Context in which this PendingIntent should start
     * the activity.
     * @param requestCode Private request code for the sender (currently
     * not used).
     * @param requestCode Private request code for the sender
     * @param intent Intent of the activity to be launched.
     * @param flags May be {@link #FLAG_ONE_SHOT}, {@link #FLAG_NO_CREATE},
     * {@link #FLAG_CANCEL_CURRENT}, {@link #FLAG_UPDATE_CURRENT},
@@ -229,8 +228,7 @@ public final class PendingIntent implements Parcelable {
     *
     * @param context The Context in which this PendingIntent should start
     * the activity.
     * @param requestCode Private request code for the sender (currently
     * not used).
     * @param requestCode Private request code for the sender
     * @param intent Intent of the activity to be launched.
     * @param flags May be {@link #FLAG_ONE_SHOT}, {@link #FLAG_NO_CREATE},
     * {@link #FLAG_CANCEL_CURRENT}, {@link #FLAG_UPDATE_CURRENT},
@@ -315,8 +313,7 @@ public final class PendingIntent implements Parcelable {
     *
     * @param context The Context in which this PendingIntent should start
     * the activity.
     * @param requestCode Private request code for the sender (currently
     * not used).
     * @param requestCode Private request code for the sender
     * @param intents Array of Intents of the activities to be launched.
     * @param flags May be {@link #FLAG_ONE_SHOT}, {@link #FLAG_NO_CREATE},
     * {@link #FLAG_CANCEL_CURRENT}, {@link #FLAG_UPDATE_CURRENT},
@@ -361,8 +358,7 @@ public final class PendingIntent implements Parcelable {
     *
     * @param context The Context in which this PendingIntent should start
     * the activity.
     * @param requestCode Private request code for the sender (currently
     * not used).
     * @param requestCode Private request code for the sender
     * @param intents Array of Intents of the activities to be launched.
     * @param flags May be {@link #FLAG_ONE_SHOT}, {@link #FLAG_NO_CREATE},
     * {@link #FLAG_CANCEL_CURRENT}, {@link #FLAG_UPDATE_CURRENT},
@@ -425,8 +421,7 @@ public final class PendingIntent implements Parcelable {
     *
     * @param context The Context in which this PendingIntent should perform
     * the broadcast.
     * @param requestCode Private request code for the sender (currently
     * not used).
     * @param requestCode Private request code for the sender
     * @param intent The Intent to be broadcast.
     * @param flags May be {@link #FLAG_ONE_SHOT}, {@link #FLAG_NO_CREATE},
     * {@link #FLAG_CANCEL_CURRENT}, {@link #FLAG_UPDATE_CURRENT},
@@ -475,8 +470,7 @@ public final class PendingIntent implements Parcelable {
     *
     * @param context The Context in which this PendingIntent should start
     * the service.
     * @param requestCode Private request code for the sender (currently
     * not used).
     * @param requestCode Private request code for the sender
     * @param intent An Intent describing the service to be started.
     * @param flags May be {@link #FLAG_ONE_SHOT}, {@link #FLAG_NO_CREATE},
     * {@link #FLAG_CANCEL_CURRENT}, {@link #FLAG_UPDATE_CURRENT},