Thibault Wittemberg | 77cf600 | 2016-11-09 16:53:31 -0500 | [diff] [blame] | 1 | /* |
Adrien Béraud | e552f69 | 2020-11-03 14:30:52 -0500 | [diff] [blame] | 2 | * Copyright (C) 2004-2020 Savoir-faire Linux Inc. |
Thibault Wittemberg | 77cf600 | 2016-11-09 16:53:31 -0500 | [diff] [blame] | 3 | * |
| 4 | * Author: Thibault Wittemberg <thibault.wittemberg@savoirfairelinux.com> |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; either version 3 of the License, or |
| 9 | * (at your option) any later version. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU General Public License |
| 17 | * along with this program; if not, write to the Free Software |
| 18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| 19 | */ |
| 20 | package cx.ring.model; |
| 21 | |
| 22 | public class Settings { |
Adrien Béraud | 2693eca | 2018-01-24 16:38:48 -0500 | [diff] [blame] | 23 | private boolean mAllowPushNotifications; |
Sébastien Blin | de52fa2 | 2018-12-06 13:35:19 -0500 | [diff] [blame] | 24 | private boolean mAllowPersistentNotification; |
Thibault Wittemberg | 77cf600 | 2016-11-09 16:53:31 -0500 | [diff] [blame] | 25 | private boolean mAllowSystemContacts; |
| 26 | private boolean mAllowPlaceSystemCalls; |
Adrien Béraud | e591bdd | 2020-05-10 22:31:16 -0400 | [diff] [blame] | 27 | private boolean mAllowOnStartup; |
Amirhossein | 4ae37ef | 2020-11-30 23:26:27 -0500 | [diff] [blame] | 28 | private boolean mAllowTypingIndicator; |
Amirhossein | 85b3f2e | 2020-12-01 13:05:43 -0500 | [diff] [blame] | 29 | private boolean mAllowReadIndicator; |
Amirhossein | 7bb77aa | 2020-12-18 16:30:44 -0500 | [diff] [blame^] | 30 | private boolean mBlockRecordIndicator; |
Adrien Béraud | 693b688 | 2019-01-27 14:51:11 -0500 | [diff] [blame] | 31 | private boolean mHwEncoding; |
Thibault Wittemberg | 77cf600 | 2016-11-09 16:53:31 -0500 | [diff] [blame] | 32 | |
Adrien Béraud | 3aa56c0 | 2018-08-26 16:06:54 -0400 | [diff] [blame] | 33 | public Settings() { |
| 34 | } |
Adrien Béraud | e591bdd | 2020-05-10 22:31:16 -0400 | [diff] [blame] | 35 | |
Adrien Béraud | 3aa56c0 | 2018-08-26 16:06:54 -0400 | [diff] [blame] | 36 | public Settings(Settings s) { |
Adrien Béraud | a945e9a | 2020-06-09 15:10:35 -0400 | [diff] [blame] | 37 | if (s != null) { |
| 38 | mAllowPushNotifications = s.mAllowPushNotifications; |
| 39 | mAllowPersistentNotification = s.mAllowPersistentNotification; |
| 40 | mAllowSystemContacts = s.mAllowSystemContacts; |
| 41 | mAllowPlaceSystemCalls = s.mAllowPlaceSystemCalls; |
| 42 | mAllowOnStartup = s.mAllowOnStartup; |
Amirhossein | 4ae37ef | 2020-11-30 23:26:27 -0500 | [diff] [blame] | 43 | mAllowTypingIndicator = s.mAllowTypingIndicator; |
Amirhossein | 85b3f2e | 2020-12-01 13:05:43 -0500 | [diff] [blame] | 44 | mAllowReadIndicator = s.mAllowReadIndicator; |
Amirhossein | 7bb77aa | 2020-12-18 16:30:44 -0500 | [diff] [blame^] | 45 | mBlockRecordIndicator = s.mBlockRecordIndicator; |
Adrien Béraud | a945e9a | 2020-06-09 15:10:35 -0400 | [diff] [blame] | 46 | mHwEncoding = s.mHwEncoding; |
| 47 | } |
Adrien Béraud | 3aa56c0 | 2018-08-26 16:06:54 -0400 | [diff] [blame] | 48 | } |
| 49 | |
Adrien Béraud | 2693eca | 2018-01-24 16:38:48 -0500 | [diff] [blame] | 50 | public boolean isAllowPushNotifications() { |
| 51 | return mAllowPushNotifications; |
| 52 | } |
| 53 | |
| 54 | public void setAllowPushNotifications(boolean push) { |
| 55 | this.mAllowPushNotifications = push; |
| 56 | } |
Thibault Wittemberg | 77cf600 | 2016-11-09 16:53:31 -0500 | [diff] [blame] | 57 | |
| 58 | public boolean isAllowSystemContacts() { |
| 59 | return mAllowSystemContacts; |
| 60 | } |
| 61 | |
| 62 | public void setAllowSystemContacts(boolean allowSystemContacts) { |
| 63 | this.mAllowSystemContacts = allowSystemContacts; |
| 64 | } |
| 65 | |
| 66 | public boolean isAllowPlaceSystemCalls() { |
| 67 | return mAllowPlaceSystemCalls; |
| 68 | } |
| 69 | |
| 70 | public void setAllowPlaceSystemCalls(boolean allowPlaceSystemCalls) { |
| 71 | this.mAllowPlaceSystemCalls = allowPlaceSystemCalls; |
| 72 | } |
| 73 | |
Adrien Béraud | e591bdd | 2020-05-10 22:31:16 -0400 | [diff] [blame] | 74 | public boolean isAllowOnStartup() { |
| 75 | return mAllowOnStartup; |
Thibault Wittemberg | 77cf600 | 2016-11-09 16:53:31 -0500 | [diff] [blame] | 76 | } |
| 77 | |
| 78 | public void setAllowRingOnStartup(boolean allowRingOnStartup) { |
Adrien Béraud | e591bdd | 2020-05-10 22:31:16 -0400 | [diff] [blame] | 79 | this.mAllowOnStartup = allowRingOnStartup; |
Thibault Wittemberg | 77cf600 | 2016-11-09 16:53:31 -0500 | [diff] [blame] | 80 | } |
Adrien Béraud | 1e84875 | 2018-08-26 15:30:43 -0400 | [diff] [blame] | 81 | |
Sébastien Blin | de52fa2 | 2018-12-06 13:35:19 -0500 | [diff] [blame] | 82 | public void setAllowPersistentNotification(boolean checked) { |
| 83 | this.mAllowPersistentNotification = checked; |
| 84 | } |
| 85 | |
| 86 | public boolean isAllowPersistentNotification() { |
| 87 | return mAllowPersistentNotification; |
| 88 | } |
Amirhossein | 4ae37ef | 2020-11-30 23:26:27 -0500 | [diff] [blame] | 89 | |
| 90 | public void setAllowTypingIndicator(boolean checked) { |
| 91 | this.mAllowTypingIndicator = checked; |
| 92 | } |
| 93 | |
| 94 | public boolean isAllowTypingIndicator() { |
| 95 | return mAllowTypingIndicator; |
| 96 | } |
Amirhossein | 85b3f2e | 2020-12-01 13:05:43 -0500 | [diff] [blame] | 97 | |
| 98 | public void setAllowReadIndicator(boolean checked) { |
| 99 | this.mAllowReadIndicator = checked; |
| 100 | } |
| 101 | |
| 102 | public boolean isAllowReadIndicator() { |
| 103 | return mAllowReadIndicator; |
| 104 | } |
| 105 | |
Amirhossein | 7bb77aa | 2020-12-18 16:30:44 -0500 | [diff] [blame^] | 106 | public void setBlockRecordIndicator(boolean checked) { |
| 107 | this.mBlockRecordIndicator = checked; |
| 108 | } |
| 109 | |
| 110 | public boolean isRecordingBlocked() { |
| 111 | return mBlockRecordIndicator; |
| 112 | } |
| 113 | |
Thibault Wittemberg | 77cf600 | 2016-11-09 16:53:31 -0500 | [diff] [blame] | 114 | } |