diff options
author | Assam Boudjelthia <assam.boudjelthia@qt.io> | 2021-10-06 14:19:09 +0300 |
---|---|---|
committer | Assam Boudjelthia <assam.boudjelthia@qt.io> | 2022-04-26 11:18:35 +0000 |
commit | 56dee3de5e4ac1c4d37a2c5e27361e7ddbdea1a7 (patch) | |
tree | ffbec50b2a5cc97be6beecc20d799e084d9f7714 /src/android | |
parent | 63b042fb219a42194485e152acf6d305e4594c5c (diff) | |
download | qtbase-56dee3de5e4ac1c4d37a2c5e27361e7ddbdea1a7.tar.gz |
Android: add missing properties in AndroidManifest.xml
Some missing values has to be defined in AndroidManifest.xml, otherwise,
warnings might be thrown.
* android:exported="true": because the manifest sets an intent-filter,
and it then has to explicitly to avoid the warning [1].
* android:allowBackup="true": this has to be explicitly set, we set it
to the default value here [2].
* android:fullBackupOnly="false": SDK 23+ use this to deteremine to
user auto backup or not, we set it to the default value here [3].
[1] https://developer.android.com/guide/topics/manifest/activity-
element#exported
[2] https://developer.android.com/guide/topics/manifest/application-
element#allowbackup
[3] https://developer.android.com/guide/topics/manifest/application-
element#fullBackupOnly
Pick-to: 6.2 6.3 5.15
Fixes: QTBUG-101320
Change-Id: I0872dc00e48a867154ec9ded26620383fb747918
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
Diffstat (limited to 'src/android')
-rw-r--r-- | src/android/templates/AndroidManifest.xml | 7 | ||||
-rw-r--r-- | src/android/templates/doc/src/android-manifest-file-configuration.qdoc | 17 |
2 files changed, 20 insertions, 4 deletions
diff --git a/src/android/templates/AndroidManifest.xml b/src/android/templates/AndroidManifest.xml index 761272d865..a1a07f7bee 100644 --- a/src/android/templates/AndroidManifest.xml +++ b/src/android/templates/AndroidManifest.xml @@ -17,13 +17,16 @@ android:hardwareAccelerated="true" android:label="-- %%INSERT_APP_NAME%% --" android:requestLegacyExternalStorage="true" - android:allowNativeHeapPointerTagging="false"> + android:allowNativeHeapPointerTagging="false" + android:allowBackup="true" + android:fullBackupOnly="false"> <activity android:name="org.qtproject.qt.android.bindings.QtActivity" android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation|mcc|mnc|density" android:label="-- %%INSERT_APP_NAME%% --" android:launchMode="singleTop" - android:screenOrientation="unspecified"> + android:screenOrientation="unspecified" + android:exported="true"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> diff --git a/src/android/templates/doc/src/android-manifest-file-configuration.qdoc b/src/android/templates/doc/src/android-manifest-file-configuration.qdoc index 58da885567..792ceae5d9 100644 --- a/src/android/templates/doc/src/android-manifest-file-configuration.qdoc +++ b/src/android/templates/doc/src/android-manifest-file-configuration.qdoc @@ -92,7 +92,7 @@ Qt sets the following manifest configuration by default: default values are \c anyDensity, \c largeScreens, \c normalScreens, and \c smallScreens. \row - \li {1, 5} \l {Android: App Manifest <application>}{<application>} + \li {1, 8} \l {Android: App Manifest <application>}{<application>} \li android:name \li The application class name. Default value is \c {org.qtproject.qt.android.bindings.QtApplication}. @@ -116,7 +116,16 @@ Qt sets the following manifest configuration by default: For more information, see \l {Android: Tagged Pointers}{Tagged Pointers}. The default value is \c false. \row - \li {1, 6} \l {Android: App Manifest <activity>}{<activity>} + \li android:allowBackup + \li Whether to allow the application to participate in the backup and restore + infrastructure. If this is set to \c false, no backup or restore of the + application will ever be performed. The default value is \c true. +\row + \li android:fullBackupOnly + \li Whether or not to use Auto Backup on devices where it is available. + The default value is \c false. +\row + \li {1, 7} \l {Android: App Manifest <activity>}{<activity>} \li android:name \li The activity class name. The default value is \c {org.qtproject.qt.android.bindings.QtActivity}. \row @@ -141,6 +150,10 @@ Qt sets the following manifest configuration by default: <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> \endcode +\row + \li android:exported + \li Sets whether the activity can be launched by components of other applications. + The default value is \c true. \endtable \section1 Qt Specific Meta-data |