blob: 8bea11b9d546fd6f8eaf395c6e97a4319b8626f9 [file] [log] [blame]
sunnyshao15ec2cf2018-03-29 19:50:20 +08001/*
2 * Copyright (C) 2018 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License
15 */
16
17package com.android.settings.backup;
18
19import android.content.Intent;
20
21public class PrivacySettingsConfigData {
Fan Zhang16de45d2018-04-30 13:41:56 -070022
23 private static PrivacySettingsConfigData sInstance;
24
sunnyshao15ec2cf2018-03-29 19:50:20 +080025 private boolean mBackupEnabled;
26 private boolean mBackupGray;
27 private Intent mConfigIntent;
28 private String mConfigSummary;
29 private Intent mManageIntent;
Annie Mengae536992019-03-15 12:29:27 +000030 private CharSequence mManageLabel;
sunnyshao15ec2cf2018-03-29 19:50:20 +080031
Fan Zhang16de45d2018-04-30 13:41:56 -070032 private PrivacySettingsConfigData() {
sunnyshao15ec2cf2018-03-29 19:50:20 +080033 mBackupEnabled = false;
34 mBackupGray = false;
35 mConfigIntent = null;
36 mConfigSummary = null;
37 mManageIntent = null;
38 mManageLabel = null;
39 }
40
Fan Zhang16de45d2018-04-30 13:41:56 -070041 public static PrivacySettingsConfigData getInstance() {
42 if (sInstance == null) {
43 sInstance = new PrivacySettingsConfigData();
44 }
45 return sInstance;
46 }
47
sunnyshao15ec2cf2018-03-29 19:50:20 +080048 public boolean isBackupEnabled() {
49 return mBackupEnabled;
50 }
51
52 public void setBackupEnabled(final boolean backupEnabled) {
53 mBackupEnabled = backupEnabled;
54 }
55
56 public boolean isBackupGray() {
57 return mBackupGray;
58 }
59
60 public void setBackupGray(final boolean backupGray) {
61 mBackupGray = backupGray;
62 }
63
64 public Intent getConfigIntent() {
65 return mConfigIntent;
66 }
67
68 public void setConfigIntent(final Intent configIntent) {
69 mConfigIntent = configIntent;
70 }
71
72 public String getConfigSummary() {
73 return mConfigSummary;
74 }
75
76 public void setConfigSummary(final String configSummary) {
77 mConfigSummary = configSummary;
78 }
79
80 public Intent getManageIntent() {
81 return mManageIntent;
82 }
83
84 public void setManageIntent(final Intent manageIntent) {
85 mManageIntent = manageIntent;
86 }
87
Annie Mengae536992019-03-15 12:29:27 +000088 public CharSequence getManageLabel() {
sunnyshao15ec2cf2018-03-29 19:50:20 +080089 return mManageLabel;
90 }
91
Annie Mengae536992019-03-15 12:29:27 +000092 public void setManageLabel(final CharSequence manageLabel) {
sunnyshao15ec2cf2018-03-29 19:50:20 +080093 mManageLabel = manageLabel;
94 }
95}