| sunnyshao | 15ec2cf | 2018-03-29 19:50:20 +0800 | [diff] [blame] | 1 | /* |
| 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 | |
| 17 | package com.android.settings.backup; |
| 18 | |
| 19 | import android.content.Intent; |
| 20 | |
| 21 | public class PrivacySettingsConfigData { |
| Fan Zhang | 16de45d | 2018-04-30 13:41:56 -0700 | [diff] [blame] | 22 | |
| 23 | private static PrivacySettingsConfigData sInstance; |
| 24 | |
| sunnyshao | 15ec2cf | 2018-03-29 19:50:20 +0800 | [diff] [blame] | 25 | private boolean mBackupEnabled; |
| 26 | private boolean mBackupGray; |
| 27 | private Intent mConfigIntent; |
| 28 | private String mConfigSummary; |
| 29 | private Intent mManageIntent; |
| Annie Meng | ae53699 | 2019-03-15 12:29:27 +0000 | [diff] [blame] | 30 | private CharSequence mManageLabel; |
| sunnyshao | 15ec2cf | 2018-03-29 19:50:20 +0800 | [diff] [blame] | 31 | |
| Fan Zhang | 16de45d | 2018-04-30 13:41:56 -0700 | [diff] [blame] | 32 | private PrivacySettingsConfigData() { |
| sunnyshao | 15ec2cf | 2018-03-29 19:50:20 +0800 | [diff] [blame] | 33 | mBackupEnabled = false; |
| 34 | mBackupGray = false; |
| 35 | mConfigIntent = null; |
| 36 | mConfigSummary = null; |
| 37 | mManageIntent = null; |
| 38 | mManageLabel = null; |
| 39 | } |
| 40 | |
| Fan Zhang | 16de45d | 2018-04-30 13:41:56 -0700 | [diff] [blame] | 41 | public static PrivacySettingsConfigData getInstance() { |
| 42 | if (sInstance == null) { |
| 43 | sInstance = new PrivacySettingsConfigData(); |
| 44 | } |
| 45 | return sInstance; |
| 46 | } |
| 47 | |
| sunnyshao | 15ec2cf | 2018-03-29 19:50:20 +0800 | [diff] [blame] | 48 | 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 Meng | ae53699 | 2019-03-15 12:29:27 +0000 | [diff] [blame] | 88 | public CharSequence getManageLabel() { |
| sunnyshao | 15ec2cf | 2018-03-29 19:50:20 +0800 | [diff] [blame] | 89 | return mManageLabel; |
| 90 | } |
| 91 | |
| Annie Meng | ae53699 | 2019-03-15 12:29:27 +0000 | [diff] [blame] | 92 | public void setManageLabel(final CharSequence manageLabel) { |
| sunnyshao | 15ec2cf | 2018-03-29 19:50:20 +0800 | [diff] [blame] | 93 | mManageLabel = manageLabel; |
| 94 | } |
| 95 | } |