forked from flutter/plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[android_intent] Add missing DartDocs (flutter#2268)
Also adds a rule just for `android_intent` that makes sure that there are no undocumented public members. This will prevent the DartDocs from regressing. Also updates the main repo's analysis options to migrate from some deprecated options. If/when all the plugins have their DartDocs updated this package-specific `analysis_options.yaml` should be removed, and the DartDoc rule should be moved up to the top level.
- Loading branch information
Michael Klimushyn
authored
Nov 13, 2019
1 parent
7d7be76
commit 35e984f
Showing
7 changed files
with
221 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
## 0.3.4+6 | ||
|
||
* Add missing DartDocs for public members. | ||
|
||
## 0.3.4+5 | ||
|
||
* Remove AndroidX warning. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# This exists to add a lint for missing API docs just on this specific package, | ||
# since not all packages have coverage for all their public members yet and | ||
# adding it in would be non-trivial. `public_member_api_docs` should be applied | ||
# to new packages going forward, and ideally the main `analysis_options.yaml` | ||
# file as soon as possible. | ||
|
||
include: ../../analysis_options.yaml | ||
|
||
linter: | ||
rules: | ||
- public_member_api_docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,193 @@ | ||
// flag values from https://developer.android.com/reference/android/content/Intent.html | ||
/// Special flags that can be set on an intent to control how it is handled. | ||
/// | ||
/// See | ||
/// https://developer.android.com/reference/android/content/Intent.html#setFlags(int) | ||
/// for the official documentation on Intent flags. The constants here mirror | ||
/// the existing [android.content.Intent] ones. | ||
class Flag { | ||
/// Specifies how an activity should be launched. Generally set by the system | ||
/// in conjunction with SINGLE_TASK. | ||
/// | ||
/// See https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_BROUGHT_TO_FRONT. | ||
static const int FLAG_ACTIVITY_BROUGHT_TO_FRONT = 4194304; | ||
|
||
/// Causes any existing tasks associated with the activity to be cleared. | ||
/// | ||
/// See https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_CLEAR_TASK | ||
static const int FLAG_ACTIVITY_CLEAR_TASK = 32768; | ||
|
||
/// Closes any activities on top of this activity and brings it to the front, | ||
/// if it's currently running. | ||
/// | ||
/// See https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_CLEAR_TOP | ||
static const int FLAG_ACTIVITY_CLEAR_TOP = 67108864; | ||
|
||
/// @deprecated Use [FLAG_ACTIVITY_NEW_DOCUMENT] instead when on API 21 or above. | ||
/// | ||
/// See https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET | ||
@deprecated | ||
static const int FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET = 524288; | ||
|
||
/// Keeps the activity from being listed with other recently launched | ||
/// activities. | ||
/// | ||
/// See https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS | ||
static const int FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS = 8388608; | ||
|
||
/// Forwards the result from this activity to the existing one. | ||
/// | ||
/// See https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_FORWARD_RESULT | ||
static const int FLAG_ACTIVITY_FORWARD_RESULT = 33554432; | ||
|
||
/// Generally set by the system if the activity is being launched from | ||
/// history. | ||
/// | ||
/// See https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY | ||
static const int FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY = 1048576; | ||
|
||
/// Used in split-screen mode to set the launched activity adjacent to the | ||
/// launcher. | ||
/// | ||
/// See https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_LAUNCH_ADJACENT | ||
static const int FLAG_ACTIVITY_LAUNCH_ADJACENT = 4096; | ||
|
||
/// Used in split-screen mode to set the launched activity adjacent to the | ||
/// launcher. | ||
/// | ||
/// See https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_MATCH_EXTERNAL | ||
static const int FLAG_ACTIVITY_MATCH_EXTERNAL = 2048; | ||
|
||
/// Creates and launches the activity into a new task. Should always be | ||
/// combined with [FLAG_ACTIVITY_NEW_DOCUMENT] or [FLAG_ACTIVITY_NEW_TASK]. | ||
/// | ||
/// See https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_MULTIPLE_TASK. | ||
static const int FLAG_ACTIVITY_MULTIPLE_TASK = 134217728; | ||
|
||
/// Opens a document into a new task rooted in this activity. | ||
/// | ||
/// See https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_NEW_DOCUMENT. | ||
static const int FLAG_ACTIVITY_NEW_DOCUMENT = 524288; | ||
|
||
/// The launched activity starts a new task on the activity stack. | ||
/// | ||
/// See https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_NEW_TASK. | ||
static const int FLAG_ACTIVITY_NEW_TASK = 268435456; | ||
|
||
/// Prevents the system from playing an activity transition animation when | ||
/// launching this. | ||
/// | ||
/// See https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_NO_ANIMATION. | ||
static const int FLAG_ACTIVITY_NO_ANIMATION = 65536; | ||
|
||
/// Does not keep the launched activity in history. | ||
/// | ||
/// See https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_NO_HISTORY. | ||
static const int FLAG_ACTIVITY_NO_HISTORY = 1073741824; | ||
|
||
/// Prevents a typical callback from occuring when the activity is paused. | ||
/// | ||
/// https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_NO_USER_ACTION | ||
static const int FLAG_ACTIVITY_NO_USER_ACTION = 262144; | ||
|
||
/// Uses the previous activity as top when applicable. | ||
/// | ||
/// See https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_PREVIOUS_IS_TOP. | ||
static const int FLAG_ACTIVITY_PREVIOUS_IS_TOP = 16777216; | ||
|
||
/// Brings any already instances of this activity to the front. | ||
/// | ||
/// See https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_REORDER_TO_FRONT. | ||
static const int FLAG_ACTIVITY_REORDER_TO_FRONT = 131072; | ||
|
||
/// Launches the activity in a way that resets the task in some cases. | ||
/// | ||
/// See https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_RESET_TASK_IF_NEEDED. | ||
static const int FLAG_ACTIVITY_RESET_TASK_IF_NEEDED = 2097152; | ||
|
||
/// Keeps an entry in recent tasks. Used with [FLAG_ACTIVITY_NEW_DOCUMENT]. | ||
/// | ||
/// See https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_RETAIN_IN_RECENTS. | ||
static const int FLAG_ACTIVITY_RETAIN_IN_RECENTS = 8192; | ||
|
||
/// Will not re-launch the activity if it is already at the top of the history | ||
/// stack. | ||
/// | ||
/// See https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_SINGLE_TOP. | ||
static const int FLAG_ACTIVITY_SINGLE_TOP = 536870912; | ||
|
||
/// Places the activity on top of the home task. Must be used with | ||
/// [FLAG_ACTIVITY_NEW_TASK]. | ||
/// | ||
/// See https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_TASK_ON_HOME. | ||
static const int FLAG_ACTIVITY_TASK_ON_HOME = 16384; | ||
|
||
/// Prints debug logs while the intent is resolving. | ||
/// | ||
/// See https://developer.android.com/reference/android/content/Intent.html#FLAG_DEBUG_LOG_RESOLUTION. | ||
static const int FLAG_DEBUG_LOG_RESOLUTION = 8; | ||
|
||
/// Does not match to any stopped components. | ||
/// | ||
/// See https://developer.android.com/reference/android/content/Intent.html#FLAG_EXCLUDE_STOPPED_PACKAGES. | ||
static const int FLAG_EXCLUDE_STOPPED_PACKAGES = 16; | ||
|
||
/// Can be set by the caller to flag the intent as not being launched directly | ||
/// by the user. | ||
/// | ||
/// See https://developer.android.com/reference/android/content/Intent.html#FLAG_FROM_BACKGROUND. | ||
static const int FLAG_FROM_BACKGROUND = 4; | ||
|
||
/// Will persist the URI permision across device reboots. | ||
/// | ||
/// See https://developer.android.com/reference/android/content/Intent.html#FLAG_GRANT_PERSISTABLE_URI_PERMISSION. | ||
static const int FLAG_GRANT_PERSISTABLE_URI_PERMISSION = 64; | ||
|
||
/// Applies the URI permission grant based on prefix matching. | ||
/// | ||
/// See https://developer.android.com/reference/android/content/Intent.html#FLAG_GRANT_PREFIX_URI_PERMISSION. | ||
static const int FLAG_GRANT_PREFIX_URI_PERMISSION = 128; | ||
|
||
/// Grants the intent listener permission to read extra data from the Intent's | ||
/// URI. | ||
/// | ||
/// See https://developer.android.com/reference/android/content/Intent.html#FLAG_GRANT_READ_URI_PERMISSION. | ||
static const int FLAG_GRANT_READ_URI_PERMISSION = 1; | ||
|
||
/// Grants the intent listener permission to write extra data from the | ||
/// Intent's URI. | ||
/// | ||
/// See https://developer.android.com/reference/android/content/Intent.html#FLAG_GRANT_WRITE_URI_PERMISSION. | ||
static const int FLAG_GRANT_WRITE_URI_PERMISSION = 2; | ||
|
||
/// Always matches stopped components. This is the default behavior. | ||
/// | ||
/// See https://developer.android.com/reference/android/content/Intent.html#FLAG_INCLUDE_STOPPED_PACKAGES. | ||
static const int FLAG_INCLUDE_STOPPED_PACKAGES = 32; | ||
|
||
/// Allows the listener to run at a high priority. | ||
/// | ||
/// See https://developer.android.com/reference/android/content/Intent.html#FLAG_RECEIVER_FOREGROUND. | ||
static const int FLAG_RECEIVER_FOREGROUND = 268435456; | ||
|
||
/// Doesn't allow listeners to cancel the broadcast. | ||
/// | ||
/// See https://developer.android.com/reference/android/content/Intent.html#FLAG_RECEIVER_NO_ABORT. | ||
static const int FLAG_RECEIVER_NO_ABORT = 134217728; | ||
|
||
/// Only allows registered receivers to listen for the intent. | ||
/// | ||
/// See https://developer.android.com/reference/android/content/Intent.html#FLAG_RECEIVER_REGISTERED_ONLY. | ||
static const int FLAG_RECEIVER_REGISTERED_ONLY = 1073741824; | ||
|
||
/// Will drop any pending broadcasts of this intent in favor of the newest | ||
/// one. | ||
/// | ||
/// See https://developer.android.com/reference/android/content/Intent.html#FLAG_RECEIVER_REPLACE_PENDING. | ||
static const int FLAG_RECEIVER_REPLACE_PENDING = 536870912; | ||
|
||
/// Instant Apps will be able to listen for the intent (not the default | ||
/// behavior). | ||
/// | ||
/// See https://developer.android.com/reference/android/content/Intent.html#FLAG_RECEIVER_VISIBLE_TO_INSTANT_APPS. | ||
static const int FLAG_RECEIVER_VISIBLE_TO_INSTANT_APPS = 2097152; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters