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
* config_ignored_backup_transports to hide transports from the list

Co-authored-by: Michael Bestas <mkbestas@lineageos.org>
Co-authored-by: Michael W <baddaemon87@gmail.com>
Change-Id: I080d96e2c34045a0e61f3fa1b839f463550f2028
This commit is contained in:
Torsten Grote
2020-09-30 15:14:49 -03:00
committed by Michael Bestas
parent 4db73d66ce
commit c18a1ef322
13 changed files with 465 additions and 8 deletions

View File

@@ -0,0 +1,35 @@
/*
* Copyright (C) 2024 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
*/
package com.android.settings.utils;
import android.view.View;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;
public class InsetUtils {
public static void applyWindowInsetsListener(final View rootView) {
ViewCompat.setOnApplyWindowInsetsListener(rootView, (view, windowInsets) -> {
Insets insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars());
view.setPadding(insets.left, insets.top, insets.right, insets.bottom);
return WindowInsetsCompat.CONSUMED;
});
}
}