Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

android:allowBackup=true forces me to use tools:replace #21

Closed
black-snow opened this issue Oct 22, 2015 · 1 comment
Closed

android:allowBackup=true forces me to use tools:replace #21

black-snow opened this issue Oct 22, 2015 · 1 comment

Comments

@black-snow
Copy link
Contributor

The following line from the android manifest forces users of this library to utilize tools:replace="android:allowBackup" when switiching to android:allowBackup="false" in their manifest:

 <application android:allowBackup="true" android:label="@string/app_name">

allowBackupt=true is implicit. If there's no special reason for having this explicitly added to the lib's manifest I'd suggest to drop it, leading to this:

 <application android:label="@string/app_name">

Dropping the allowBackup part should not lead to any trouble as it's implicitly true and depends on the top level manifest anyway. Right now I need to add two lines to my manifest just to have allowBackup=false (1x tools:replace and 1x tools namespace import).

For the sake of completeness, this is what my manifest looks with explicit allowBackup in msa-auth:

<?xml version="1.0" encoding="utf-8"?>
<manifest
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    ...
    >
    ...
    <application
        android:allowBackup="false"
        tools:replace="android:allowBackup"
        ...

This is how it would look without:

<?xml version="1.0" encoding="utf-8"?>
<manifest
    xmlns:android="http://schemas.android.com/apk/res/android"
    ...
    >
    ...
    <application
        android:allowBackup="false"
        ...

This is nothing urgent (to me) but I'll file a PR. Please leave a note how you think about this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants