pub enum DocumentLaunchMode {
IntoExisting,
Always,
None,
Never,
}
Expand description
Four values which produce the following effects when the user opens a document with the application
Variants§
IntoExisting
The system searches for a task whose base intent’s ComponentName
and data URI
match those of the launching intent. If the system finds such a task, the
system clears the task, and restarts with the root activity receiving a call
to onNewIntent(android.content.Intent)
. If the system does not find such a
task, the system creates a new task.
Always
The activity creates a new task for the document, even if the document is already
opened. This is the same as setting both the FLAG_ACTIVITY_NEW_DOCUMENT
and FLAG_ACTIVITY_MULTIPLE_TASK
flags.
None
The activity does not create a new task for the activity. This is the default
value, which creates a new task only when FLAG_ACTIVITY_NEW_TASK
is set. The overview screen treats the activity as it would by
default: it displays a single task for the app, which resumes from
whatever activity the user last invoked.
Never
This activity is not launched into a new document even if the Intent contains
FLAG_ACTIVITY_NEW_DOCUMENT
. Setting this overrides the behavior of the
FLAG_ACTIVITY_NEW_DOCUMENT
and FLAG_ACTIVITY_MULTIPLE_TASK
flags, if
either of these are set in the activity, and the overview screen displays a
single task for the app, which resumes from whatever activity the user last
invoked.
Trait Implementations§
source§impl Clone for DocumentLaunchMode
impl Clone for DocumentLaunchMode
source§fn clone(&self) -> DocumentLaunchMode
fn clone(&self) -> DocumentLaunchMode
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for DocumentLaunchMode
impl Debug for DocumentLaunchMode
source§impl Default for DocumentLaunchMode
impl Default for DocumentLaunchMode
source§fn default() -> DocumentLaunchMode
fn default() -> DocumentLaunchMode
source§impl<'de> Deserialize<'de> for DocumentLaunchMode
impl<'de> Deserialize<'de> for DocumentLaunchMode
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
source§impl PartialEq<DocumentLaunchMode> for DocumentLaunchMode
impl PartialEq<DocumentLaunchMode> for DocumentLaunchMode
source§fn eq(&self, other: &DocumentLaunchMode) -> bool
fn eq(&self, other: &DocumentLaunchMode) -> bool
self
and other
values to be equal, and is used
by ==
.