Removed Terms and Conditions as well as the Privacy Policy from SettingsFragment.kt, added little easter egg

This commit is contained in:
Deniz Düzgören
2019-09-28 18:09:43 +02:00
parent 54acd982dc
commit 56c7e8ba53
6 changed files with 32 additions and 151 deletions
@@ -131,15 +131,15 @@ internal class Main : AppCompatActivity(R.layout.app_bar_main) {
edit.putInt("firstTimeOpening", prefs.getInt("firstTimeOpening", 0) + 1).apply()
}
lateinit var defaultFragment: Fragment
if (prefs.getBoolean("defaultPersonalised", false)) {
defaultFragment = PersonalPlanFragment()
/// Launch the user-specified fragment (general or personal plan)
val defaultFragment = if (prefs.getBoolean("defaultPersonalised", false)) {
bottomNav.selectedItemId = R.id.personal
toolbarTxt.text = personalPlanTitle()
PersonalPlanFragment()
} else {
defaultFragment = GeneralPlanFragment()
bottomNav.selectedItemId = R.id.plan
toolbarTxt.text = getString(R.string.app_name)
GeneralPlanFragment()
}
loadFragment(defaultFragment)
@@ -51,5 +51,4 @@ internal class PersonalPlanFragment : PlanFragment() {
}, 64)
})
}
}
@@ -39,8 +39,7 @@ import com.google.firebase.messaging.FirebaseMessaging
import kotlin.collections.ArrayList
internal class SettingsFragment : Fragment(R.layout.content_settings), View.OnClickListener,
CompoundButton.OnCheckedChangeListener,
ColourAdapter.OnClickListener,
CompoundButton.OnCheckedChangeListener, ColourAdapter.OnClickListener,
RingtoneAdapter.OnClickListener {
private lateinit var mContext: Context
@@ -51,6 +50,7 @@ internal class SettingsFragment : Fragment(R.layout.content_settings), View.OnCl
private lateinit var colourRecycler: RecyclerView
private lateinit var ringtoneCustomiserDialog: AlertDialog
private lateinit var currentRingtone: TextView
private var longPressed = false
override fun onAttach(context: Context) {
super.onAttach(context)
@@ -79,8 +79,10 @@ internal class SettingsFragment : Fragment(R.layout.content_settings), View.OnCl
setRingtoneText()
val forceRefreshButton = view.findViewById<LinearLayout>(R.id.btnForceRefresh)
val colourTextTitle = view.findViewById<TextView>(R.id.txtCustomiseColours1)
val colourTextDesc = view.findViewById<TextView>(R.id.txtCustomiseColours2)
greetingSwitch.setOnCheckedChangeListener(this)
// switchDark.setOnCheckedChangeListener(this)
notificationSwitch.setOnCheckedChangeListener(this)
defaultPlanSwitch.setOnCheckedChangeListener(this)
autoRefreshSwitch.setOnCheckedChangeListener(this)
@@ -88,12 +90,21 @@ internal class SettingsFragment : Fragment(R.layout.content_settings), View.OnCl
helpGradeButton.setOnClickListener(this)
view.findViewById<ImageButton>(R.id.chip_help_ordering).setOnClickListener(this)
colourCustomisationButton.setOnClickListener(this)
colourCustomisationButton.setOnLongClickListener {
if (!longPressed) {
colourTextTitle.text = getString(R.string.made_by_deniz)
colourTextDesc.text = "---"
} else {
colourTextTitle.text = getString(R.string.customise_colours_title)
colourTextDesc.text = getString(R.string.customise_colours_desc)
}
longPressed = !longPressed
true
}
view.findViewById<LinearLayout>(R.id.btnNoNotif).setOnClickListener(this)
view.findViewById<LinearLayout>(R.id.btnCustomiseRingtone).setOnClickListener(this)
view.findViewById<LinearLayout>(R.id.btnWebsite).setOnClickListener(this)
view.findViewById<LinearLayout>(R.id.btnLicences).setOnClickListener(this)
view.findViewById<LinearLayout>(R.id.btnTerms).setOnClickListener(this)
view.findViewById<LinearLayout>(R.id.btnPrivacyP).setOnClickListener(this)
versionButton.setOnClickListener(this)
forceRefreshButton.setOnClickListener(this)
forceRefreshButton.setOnLongClickListener {
@@ -469,12 +480,6 @@ internal class SettingsFragment : Fragment(R.layout.content_settings), View.OnCl
R.id.btnLicences -> {
createDialog(mContext.getString(R.string.licences_title), licences)
}
R.id.btnTerms -> {
createDialog("Terms & Conditions", termsAndConditions)
}
R.id.btnPrivacyP -> {
createDialog("Privacy Policy", privacyPolicy)
}
R.id.btnForceRefresh -> {
DataFetcher(
isPlan = true,
@@ -559,54 +564,13 @@ internal class SettingsFragment : Fragment(R.layout.content_settings), View.OnCl
}
}
/// Below this point follow string literals that I didn't bother putting in /res/values
private val licences = "Libraries:" +
"\n • jsoup HTML parser © 2009-2018 Jonathan Hedley, licensed under the open source MIT Licence" +
"\n\nFont:" +
"\n • Manrope © 2018-2019 Michael Sharanda, licensed under the SIL Open Font Licence 1.1" +
"\n\nIcons:" +
"\n • bqlqn\n • fjstudio\n • Freepik\n • Smashicons" +
"\n • © 2013-2019 Freepik Company S.L., licensed under Creative Commons BY 3.0" +
"\n\nHuman resources:" +
"\n • Deniz Düzgören (Development & publishing)" +
"\n • Leon Becker (Initial marketing)" +
"\n • Alex Lick (Marketing & Play Store account)" +
"\n • Batuhan Özcan (Marketing & Play Store account)" +
"\n • Erich Kerkesner (Marketing & Play Store account)"
private val termsAndConditions = "These terms automatically apply to anyone using this app - therefore, please make sure to read them carefully before using the app. Copying or modifying parts of the app or the entire app, as well as creating derivative versions, is prohibited without permission. This app is intellectual property of the developer.\n" +
"\nThe developer reserves the right to make changes to the app at any given time and for any reason. The user will be informed of any changes made accordingly.\n" +
"\nTampering with the end device, in the form of rooting or otherwise modifying the operating system may result in malfunction of the software. In this case, the developer does not provide support, as the user is responsible for keeping the device free of software that may compromise its security.\n" +
"\nFull functionality of the app relies on a steady internet connection. The developer does not take responsibility for malfunction of these services, nor for any errors caused by the end device. The user is responsible for ensuring that their device is fully updated and fully functioning.\n" +
"\nAs the app relies on third-parties, information provided in-app may be delayed or incorrect at times. The developer accepts no liability for any information mistakenly provided in the app.\n" +
"\nThe developer may wish to update the app at any point. Should such action arise, then the user is advised to update the app to ensure proper functionality. However, the developer does not promise that the app will be continuously updated, and may stop providing the app at any point. Unless told otherwise, upon any termination, (a) the rights and licenses granted to the user in these terms will end; (b) the user must stop using the app, and (if needed) delete it from their device.\n" +
"\nChanges to these Terms & Conditions\n" +
"\nThe developer may update these Terms & Conditions from time to time. Thus, the user is advised to review this page periodically for any changes. Any changes are effective immediately after they are posted on this page.\n" +
"\nContact Us\n" +
"\nIn case of questions or suggestions regarding these Terms & Conditions, the user is advised to contact the developer of this app. Contact information is provided through the Play Store.\n" +
"\n---\n" +
"\nThese Terms & Conditions were modified upon the template provided by App Privacy Policy Generator. This service is in no way affiliated with AvH Plan or the developer."
private val privacyPolicy = "The app \"Alexander-von-Humboldt-Plan\", hereby abbreviated to AvH Plan, is provided as a free service by the developer for use as is.\n" +
"\nThis page is used to inform visitors and users regarding policies with the collection, use, and disclosure of personal information, if they choose to make use of the service.\n" +
"\nAvH Plan does not collect, store, share, or in any other way use personal information retrieved from its users. Any information asked for within the app is only used to improve the user experience and as such, is stored locally and cannot be accessed by third-parties or be used to identify the user.\n" +
"\nInformation Collection and Use\n" +
"\nAt this moment, AvH Plan does not require personally identifiable information for its core functionality. Certain features do require entering information that may be personally identifiable, however, this data will be retained on the user's device and is therefore not accessible outside the app\n" +
"\nLog Data\n" +
"\nIn the case of an error in the app, device-specific data may be collected and stored on your phone. This data is called Log Data. This Log Data may include information, such as your device's Internet Protocol (“IP”) address, device name, operating system version, the configuration of the app when utilising the service, the time and date when the last usage occured, and other statistics. This data can not be used to personally identify any user.\n" +
"\nCookies\n" +
"\nCookies are files with small amounts of data that are commonly used as anonymous unique identifiers on the web. AvH Plan strives to not make use of cookies for its functionality, however, as its functionality requires access to third-party-websites, cookies may be unintentionally collected by the device's web browser. AvH Plan does not make use of these cookies in any way.\n" +
"\nService Providers\n" +
"\nNo third-parties are employed for providing any functionality or services of the AvH Plan-app and as such, all functionality is accessible without directly sharing personal data with third-parties.\n" +
"\nSecurity\n" +
"\nWhile absolute security cannot be ensured due to the internet functionality the app employs, no information is shared over any transmission methods.\n" +
"\nLinks to Other Sites\n" +
"\nThis Service may contain links to other sites, which are not operated by the developer of AvH Plan. The user is advised to review the privacy policy of any webpage they may access through the app. No responsibility for the content of these third-party websites is provided by the app developer.\n" +
"\nChildrens Privacy\n" +
"\nThe service does not address anyone under the age of 13. As the app does not collect any information from its users, no data is collected from users that may be under the age of 13.\n" +
"\nChanges to This Privacy Policy\n" +
"\nThis privacy policy may be updated as the AvH Plan app is updated with new features. As such, the user is advised to review this page periodically for any changes. Any changes that may be made are effective immediately upon publishing.\n" +
"\nContact Us\n" +
"\nIn case of questions or suggestions regarding this privacy policy, the user is advised to contact the developer of this app. Contact information is provided through the Play Store.\n" +
"\n---\n" +
"\nThis privacy policy was modified upon the template provided by privacypolicytemplate.net and App Privacy Policy Generator. These services are in no way affiliated with AvH Plan or the developer."
"\n • © 2013-2019 Freepik Company S.L., licensed under Creative Commons BY 3.0"
}