blob: 81f95ae18e3ad4ca87703aa9cb8938c8ce4efc22 [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;
Adrien Béraud693b6882019-01-27 14:51:11 -050030 private boolean mHwEncoding;
Thibault Wittemberg77cf6002016-11-09 16:53:31 -050031
Adrien Béraud3aa56c02018-08-26 16:06:54 -040032 public Settings() {
33 }
Adrien Béraude591bdd2020-05-10 22:31:16 -040034
Adrien Béraud3aa56c02018-08-26 16:06:54 -040035 public Settings(Settings s) {
Adrien Bérauda945e9a2020-06-09 15:10:35 -040036 if (s != null) {
37 mAllowPushNotifications = s.mAllowPushNotifications;
38 mAllowPersistentNotification = s.mAllowPersistentNotification;
39 mAllowSystemContacts = s.mAllowSystemContacts;
40 mAllowPlaceSystemCalls = s.mAllowPlaceSystemCalls;
41 mAllowOnStartup = s.mAllowOnStartup;
Amirhossein4ae37ef2020-11-30 23:26:27 -050042 mAllowTypingIndicator = s.mAllowTypingIndicator;
Amirhossein85b3f2e2020-12-01 13:05:43 -050043 mAllowReadIndicator = s.mAllowReadIndicator;
Adrien Bérauda945e9a2020-06-09 15:10:35 -040044 mHwEncoding = s.mHwEncoding;
45 }
Adrien Béraud3aa56c02018-08-26 16:06:54 -040046 }
47
Adrien Béraud2693eca2018-01-24 16:38:48 -050048 public boolean isAllowPushNotifications() {
49 return mAllowPushNotifications;
50 }
51
52 public void setAllowPushNotifications(boolean push) {
53 this.mAllowPushNotifications = push;
54 }
Thibault Wittemberg77cf6002016-11-09 16:53:31 -050055
56 public boolean isAllowSystemContacts() {
57 return mAllowSystemContacts;
58 }
59
60 public void setAllowSystemContacts(boolean allowSystemContacts) {
61 this.mAllowSystemContacts = allowSystemContacts;
62 }
63
64 public boolean isAllowPlaceSystemCalls() {
65 return mAllowPlaceSystemCalls;
66 }
67
68 public void setAllowPlaceSystemCalls(boolean allowPlaceSystemCalls) {
69 this.mAllowPlaceSystemCalls = allowPlaceSystemCalls;
70 }
71
Adrien Béraude591bdd2020-05-10 22:31:16 -040072 public boolean isAllowOnStartup() {
73 return mAllowOnStartup;
Thibault Wittemberg77cf6002016-11-09 16:53:31 -050074 }
75
76 public void setAllowRingOnStartup(boolean allowRingOnStartup) {
Adrien Béraude591bdd2020-05-10 22:31:16 -040077 this.mAllowOnStartup = allowRingOnStartup;
Thibault Wittemberg77cf6002016-11-09 16:53:31 -050078 }
Adrien Béraud1e848752018-08-26 15:30:43 -040079
Sébastien Blinde52fa22018-12-06 13:35:19 -050080 public void setAllowPersistentNotification(boolean checked) {
81 this.mAllowPersistentNotification = checked;
82 }
83
84 public boolean isAllowPersistentNotification() {
85 return mAllowPersistentNotification;
86 }
Amirhossein4ae37ef2020-11-30 23:26:27 -050087
88 public void setAllowTypingIndicator(boolean checked) {
89 this.mAllowTypingIndicator = checked;
90 }
91
92 public boolean isAllowTypingIndicator() {
93 return mAllowTypingIndicator;
94 }
Amirhossein85b3f2e2020-12-01 13:05:43 -050095
96 public void setAllowReadIndicator(boolean checked) {
97 this.mAllowReadIndicator = checked;
98 }
99
100 public boolean isAllowReadIndicator() {
101 return mAllowReadIndicator;
102 }
103
Thibault Wittemberg77cf6002016-11-09 16:53:31 -0500104}