Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 69cc746c authored by Torsten Grote's avatar Torsten Grote Committed by Bruno Martins
Browse files

Allow the user to change the BackupTransport

Set the following config overlays to activate this feature:

* config_backup_settings_intent to settings://com.android.settings.backup.transport
* config_backup_settings_label to some user-facing label
  e.g. Change backup provider

Squashed with:

Author: Michael Bestas <mkbestas@lineageos.org>
Date:   Wed Nov 18 16:08:44 2020 +0200

    Backup: Don't hardcode ignored backup transports

    * Allow extending the ignored backup transport list
      by moving it to an overlay
    * Set config_ignored_backup_transports to override

    Change-Id: If4ccad0acac708cac272f791392f9ac827a7491f

Change-Id: I080d96e2c34045a0e61f3fa1b839f463550f2028
parent 81dfbb64
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -4967,6 +4967,18 @@
            android:authorities="${applicationId}.androidx-startup"
            tools:node="remove" />

        <activity android:name=".backup.transport.TransportActivity"
                  android:label="@string/backup_transport_title"
                  android:icon="@drawable/ic_settings_backup"
                  android:exported="false">
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <data android:scheme="settings"
                      android:host="com.android.settings.backup.transport" />
            </intent-filter>
        </activity>

        <!-- This is the longest AndroidManifest.xml ever. -->
    </application>
</manifest>
+21 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2017-2021 The LineageOS Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
    <!-- Backup Transport selection settings menu and activity title -->
    <string name="backup_transport_setting_label">Change backup provider</string>
    <string name="backup_transport_title">Select backup provider</string>
</resources>
+21 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2020-2021 The LineageOS Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<resources>
    <string-array name="config_ignored_backup_transports" translatable="false">
        <item>com.android.localtransport/.LocalTransport</item>
    </string-array>
</resources>
+24 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2020 The Calyx Institute
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License
  -->

<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:settings="http://schemas.android.com/apk/res-auto"
    android:title="@string/backup_transport_title">

    <!-- content gets filled programmatically -->

</PreferenceScreen>
+7 −0
Original line number Diff line number Diff line
@@ -42,6 +42,13 @@ public class BackupSettingsFragment extends DashboardFragment {
        super.onCreate(savedInstanceState);
    }

    @Override
    public void onStart() {
        super.onStart();
        // update information when we navigate back from TransportActivity
        displayResourceTilesToScreen(getPreferenceScreen());
    }

    /**
     * Get the tag string for logging.
     */
Loading