GitBook: [master] one page and 2 assets modified

This commit is contained in:
CPol 2021-06-17 13:29:24 +00:00 committed by gitbook-bot
parent 1ea9767037
commit a05e62d48a
No known key found for this signature in database
GPG key ID: 07D2180C7B12D0FF
3 changed files with 13 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 MiB

View file

@ -15,6 +15,18 @@ This is some simple activity flow:
![](../../.gitbook/assets/image%20%28550%29.png)
### Android Multi-tasking - One Task
One task is composed by several activities
![](../../.gitbook/assets/image%20%28552%29.png)
### Android Multi-tasking - Several Tasks
Android usually manages several tasks
![](../../.gitbook/assets/image%20%28551%29.png)
## Task affinity and Launch Modes
**Task affinity** is an attribute that is defined in each `<activity>` tag in the `AndroidManifest.xml` file. It describes which Task an Activity prefers to join.
@ -48,7 +60,7 @@ The victim needs to have the **malicious** **app** **installed** in his device.
## Preventing task hijacking
Setting taskAffinity="" can be a quick fix for this issue. The launch mode can also be set to **singleInstance** if the app does not want other activities to join tasks belonging to it. A custom **onBackPressed\(\)** function can also be added, to override the default behaviour.
Setting `taskAffinity=""` can be a quick fix for this issue. The launch mode can also be set to **singleInstance** if the app does not want other activities to join tasks belonging to it. A custom **onBackPressed\(\)** function can also be added, to override the default behaviour.
## **References**