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

Commit e494e87c authored by /e/ robot's avatar /e/ robot
Browse files

Merge remote-tracking branch 'origin/lineage-17.1' into v1-q

parents 58dabc59 aafff5d4
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -3323,6 +3323,18 @@
                android:value="com.android.settings.OpenKeychainSettings" />
        </activity>

        <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>
+4 −0
Original line number Diff line number Diff line
@@ -197,4 +197,8 @@
    <!-- Heads-up -->
    <string name="heads_up_notifications_enabled_title">Heads-up</string>
    <string name="heads_up_notifications_enabled_summary">Display priority notifications in a small floating window</string>

    <!-- 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>
+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.
     */
+7 −7
Original line number Diff line number Diff line
@@ -30,24 +30,24 @@ public class BackupSettingsPreferenceController extends AbstractPreferenceContro
        implements PreferenceControllerMixin {
    private static final String BACKUP_SETTINGS = "backup_settings";
    private static final  String MANUFACTURER_SETTINGS = "manufacturer_backup";
    private Intent mBackupSettingsIntent;
    private CharSequence mBackupSettingsTitle;
    private String mBackupSettingsSummary;
    private final BackupSettingsHelper settingsHelper;
    private Intent mManufacturerIntent;
    private String mManufacturerLabel;

    public BackupSettingsPreferenceController(Context context) {
        super(context);
        BackupSettingsHelper settingsHelper = new BackupSettingsHelper(context);
        mBackupSettingsIntent = settingsHelper.getIntentForBackupSettings();
        mBackupSettingsTitle = settingsHelper.getLabelForBackupSettings();
        mBackupSettingsSummary = settingsHelper.getSummaryForBackupSettings();
        settingsHelper = new BackupSettingsHelper(context);
        mManufacturerIntent = settingsHelper.getIntentProvidedByManufacturer();
        mManufacturerLabel = settingsHelper.getLabelProvidedByManufacturer();
    }

    @Override
    public void displayPreference(PreferenceScreen screen) {
        // we don't get these in the constructor, so we can get updates for them later
        Intent mBackupSettingsIntent = settingsHelper.getIntentForBackupSettings();
        CharSequence mBackupSettingsTitle = settingsHelper.getLabelForBackupSettings();
        String mBackupSettingsSummary = settingsHelper.getSummaryForBackupSettings();

        Preference backupSettings = screen.findPreference(BACKUP_SETTINGS);
        Preference manufacturerSettings = screen.findPreference(MANUFACTURER_SETTINGS);
        backupSettings.setIntent(mBackupSettingsIntent);
Loading