blob: 47c9be6f37809d4c4ec662eec9e58b20249cb448 [file] [log] [blame]
Thibault Wittemberg77cf6002016-11-09 16:53:31 -05001/*
Adrien Béraude552f692020-11-03 14:30:52 -05002 * Copyright (C) 2004-2020 Savoir-faire Linux Inc.
Thibault Wittemberg77cf6002016-11-09 16:53:31 -05003 *
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 */
20package cx.ring.model;
21
22public class Settings {
Adrien Béraud2693eca2018-01-24 16:38:48 -050023 private boolean mAllowPushNotifications;
Sébastien Blinde52fa22018-12-06 13:35:19 -050024 private boolean mAllowPersistentNotification;
Thibault Wittemberg77cf6002016-11-09 16:53:31 -050025 private boolean mAllowSystemContacts;
26 private boolean mAllowPlaceSystemCalls;
Adrien Béraude591bdd2020-05-10 22:31:16 -040027 private boolean mAllowOnStartup;
Amirhossein4ae37ef2020-11-30 23:26:27 -050028 private boolean mAllowTypingIndicator;
Amirhossein85b3f2e2020-12-01 13:05:43 -050029 private boolean mAllowReadIndicator;
Amirhossein7bb77aa2020-12-18 16:30:44 -050030 private boolean mBlockRecordIndicator;
Adrien Béraud693b6882019-01-27 14:51:11 -050031 private boolean mHwEncoding;
Thibault Wittemberg77cf6002016-11-09 16:53:31 -050032
Adrien Béraud3aa56c02018-08-26 16:06:54 -040033 public Settings() {
34 }
Adrien Béraude591bdd2020-05-10 22:31:16 -040035
Adrien Béraud3aa56c02018-08-26 16:06:54 -040036 public Settings(Settings s) {
Adrien Bérauda945e9a2020-06-09 15:10:35 -040037 if (s != null) {
38 mAllowPushNotifications = s.mAllowPushNotifications;
39 mAllowPersistentNotification = s.mAllowPersistentNotification;
40 mAllowSystemContacts = s.mAllowSystemContacts;
41 mAllowPlaceSystemCalls = s.mAllowPlaceSystemCalls;
42 mAllowOnStartup = s.mAllowOnStartup;
Amirhossein4ae37ef2020-11-30 23:26:27 -050043 mAllowTypingIndicator = s.mAllowTypingIndicator;
Amirhossein85b3f2e2020-12-01 13:05:43 -050044 mAllowReadIndicator = s.mAllowReadIndicator;
Amirhossein7bb77aa2020-12-18 16:30:44 -050045 mBlockRecordIndicator = s.mBlockRecordIndicator;
Adrien Bérauda945e9a2020-06-09 15:10:35 -040046 mHwEncoding = s.mHwEncoding;
47 }
Adrien Béraud3aa56c02018-08-26 16:06:54 -040048 }
49
Adrien Béraud2693eca2018-01-24 16:38:48 -050050 public boolean isAllowPushNotifications() {
51 return mAllowPushNotifications;
52 }
53
54 public void setAllowPushNotifications(boolean push) {
55 this.mAllowPushNotifications = push;
56 }
Thibault Wittemberg77cf6002016-11-09 16:53:31 -050057
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éraude591bdd2020-05-10 22:31:16 -040074 public boolean isAllowOnStartup() {
75 return mAllowOnStartup;
Thibault Wittemberg77cf6002016-11-09 16:53:31 -050076 }
77
78 public void setAllowRingOnStartup(boolean allowRingOnStartup) {
Adrien Béraude591bdd2020-05-10 22:31:16 -040079 this.mAllowOnStartup = allowRingOnStartup;
Thibault Wittemberg77cf6002016-11-09 16:53:31 -050080 }
Adrien Béraud1e848752018-08-26 15:30:43 -040081
Sébastien Blinde52fa22018-12-06 13:35:19 -050082 public void setAllowPersistentNotification(boolean checked) {
83 this.mAllowPersistentNotification = checked;
84 }
85
86 public boolean isAllowPersistentNotification() {
87 return mAllowPersistentNotification;
88 }
Amirhossein4ae37ef2020-11-30 23:26:27 -050089
90 public void setAllowTypingIndicator(boolean checked) {
91 this.mAllowTypingIndicator = checked;
92 }
93
94 public boolean isAllowTypingIndicator() {
95 return mAllowTypingIndicator;
96 }
Amirhossein85b3f2e2020-12-01 13:05:43 -050097
98 public void setAllowReadIndicator(boolean checked) {
99 this.mAllowReadIndicator = checked;
100 }
101
102 public boolean isAllowReadIndicator() {
103 return mAllowReadIndicator;
104 }
105
Amirhossein7bb77aa2020-12-18 16:30:44 -0500106 public void setBlockRecordIndicator(boolean checked) {
107 this.mBlockRecordIndicator = checked;
108 }
109
110 public boolean isRecordingBlocked() {
111 return mBlockRecordIndicator;
112 }
113
Thibault Wittemberg77cf6002016-11-09 16:53:31 -0500114}