Skip to content

Commit f300a5e

Browse files
committed
CHG License to 2024
1 parent cd3a3fd commit f300a5e

File tree

18 files changed

+957
-903
lines changed

18 files changed

+957
-903
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2023 Raphael Ebner
3+
Copyright (c) 2024 Raphael Ebner
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ License
342342

343343
MIT License
344344

345-
Copyright (c) 2023 Raphael Ebner
345+
Copyright (c) 2024 Raphael Ebner
346346

347347
Permission is hereby granted, free of charge, to any person obtaining a copy
348348
of this software and associated documentation files (the "Software"), to deal

app/src/main/java/de/raphaelebner/roomdatabasebackup/sample/ActivityAddEditFruit.kt

Lines changed: 24 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -13,34 +13,32 @@ import com.google.android.material.textfield.TextInputEditText
1313
import com.google.android.material.textfield.TextInputLayout
1414

1515
/**
16-
* MIT License
16+
* MIT License
1717
*
18-
* Copyright (c) 2023 Raphael Ebner
18+
* Copyright (c) 2024 Raphael Ebner
1919
*
20-
* Permission is hereby granted, free of charge, to any person obtaining a copy
21-
* of this software and associated documentation files (the "Software"), to deal
22-
* in the Software without restriction, including without limitation the rights
23-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
24-
* copies of the Software, and to permit persons to whom the Software is
25-
* furnished to do so, subject to the following conditions:
20+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
21+
* associated documentation files (the "Software"), to deal in the Software without restriction,
22+
* including without limitation the rights to use, copy, modify, merge, publish, distribute,
23+
* sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
24+
* furnished to do so, subject to the following conditions:
2625
*
27-
* The above copyright notice and this permission notice shall be included in all
28-
* copies or substantial portions of the Software.
26+
* The above copyright notice and this permission notice shall be included in all copies or
27+
* substantial portions of the Software.
2928
*
30-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
31-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
32-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
33-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
34-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
35-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
36-
* SOFTWARE.
29+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
30+
* NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
31+
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
32+
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
33+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
3734
*/
3835
class ActivityAddEditFruit : AppCompatActivity() {
3936

4037
companion object {
4138
const val EXTRA_ID = "de.raphaelebner.roomdatabasebackup.sample.EXTRA_ID"
4239
const val EXTRA_NAME = "de.raphaelebner.roomdatabasebackup.sample.EXTRA_NAME"
43-
const val EXTRA_DELETE_FRUIT = "de.raphaelebner.roomdatabasebackup.sample.EXTRA_DELETE_FRUIT"
40+
const val EXTRA_DELETE_FRUIT =
41+
"de.raphaelebner.roomdatabasebackup.sample.EXTRA_DELETE_FRUIT"
4442
}
4543

4644
private lateinit var tietFruit: TextInputEditText
@@ -72,12 +70,10 @@ class ActivityAddEditFruit : AppCompatActivity() {
7270
title = "New Fruit"
7371
}
7472

75-
//Remove the error message, if user starts typing
76-
tietFruit.addTextChangedListener {
77-
tilFruit.error = ""
78-
}
73+
// Remove the error message, if user starts typing
74+
tietFruit.addTextChangedListener { tilFruit.error = "" }
7975

80-
//Delete Fruit
76+
// Delete Fruit
8177
btnDelete.setOnClickListener {
8278
if (intent.hasExtra(EXTRA_ID)) {
8379
deleteFruit = true
@@ -86,15 +82,15 @@ class ActivityAddEditFruit : AppCompatActivity() {
8682
onBackPressedDispatcher.onBackPressed()
8783
}
8884
}
89-
9085
}
9186

92-
9387
/*---------------------Save current entries, and go back--------------------------*/
9488
private fun saveFruit() {
9589

9690
/*---------------------If EditText is empty--------------------------*/
97-
if (TextUtils.isEmpty(tietFruit.text.toString()) || TextUtils.getTrimmedLength(tietFruit.text.toString()) == 0) {
91+
if (TextUtils.isEmpty(tietFruit.text.toString()) ||
92+
TextUtils.getTrimmedLength(tietFruit.text.toString()) == 0
93+
) {
9894
tilFruit.error = "Fruit name is missing!"
9995
return
10096
}
@@ -110,7 +106,6 @@ class ActivityAddEditFruit : AppCompatActivity() {
110106
}
111107
setResult(Activity.RESULT_OK, data)
112108
finish()
113-
114109
}
115110

116111
override fun onCreateOptionsMenu(menu: Menu): Boolean {
@@ -121,20 +116,17 @@ class ActivityAddEditFruit : AppCompatActivity() {
121116

122117
override fun onOptionsItemSelected(item: MenuItem): Boolean {
123118
return when (item.itemId) {
124-
//Save Button
119+
// Save Button
125120
R.id.nav_save -> {
126121
saveFruit()
127122
true
128123
}
129-
//Back Button
124+
// Back Button
130125
android.R.id.home -> {
131126
onBackPressedDispatcher.onBackPressed()
132127
true
133-
134128
}
135129
else -> super.onOptionsItemSelected(item)
136130
}
137131
}
138-
139-
140132
}

app/src/main/java/de/raphaelebner/roomdatabasebackup/sample/FragmentActivity.kt

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,18 @@ import androidx.appcompat.app.AppCompatActivity
55
import de.raphaelebner.roomdatabasebackup.core.RoomBackup
66

77
/**
8-
* MIT License
9-
* <p>
10-
* Copyright (c) 2023 Raphael Ebner
11-
* <p>
12-
* Permission is hereby granted, free of charge, to any person obtaining a copy
13-
* of this software and associated documentation files (the "Software"), to deal
14-
* in the Software without restriction, including without limitation the rights
15-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16-
* copies of the Software, and to permit persons to whom the Software is
17-
* furnished to do so, subject to the following conditions:
18-
* <p>
19-
* The above copyright notice and this permission notice shall be included in all
20-
* copies or substantial portions of the Software.
21-
* <p>
22-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28-
* SOFTWARE.
8+
* MIT License <p> Copyright (c) 2024 Raphael Ebner <p> Permission is hereby granted, free of
9+
* charge, to any person obtaining a copy of this software and associated documentation files (the
10+
* "Software"), to deal in the Software without restriction, including without limitation the rights
11+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
12+
* and to permit persons to whom the Software is furnished to do so, subject to the following
13+
* conditions: <p> The above copyright notice and this permission notice shall be included in all
14+
* copies or substantial portions of the Software. <p> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT
15+
* WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
18+
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
19+
* THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2920
*/
3021
class FragmentActivity : AppCompatActivity() {
3122

app/src/main/java/de/raphaelebner/roomdatabasebackup/sample/FragmentActivityJava.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
/**
1111
* MIT License
1212
* <p>
13-
* Copyright (c) 2023 Raphael Ebner
13+
* Copyright (c) 2024 Raphael Ebner
1414
* <p>
1515
* Permission is hereby granted, free of charge, to any person obtaining a copy
1616
* of this software and associated documentation files (the "Software"), to deal
@@ -19,7 +19,8 @@
1919
* copies of the Software, and to permit persons to whom the Software is
2020
* furnished to do so, subject to the following conditions:
2121
* <p>
22-
* The above copyright notice and this permission notice shall be included in all
22+
* The above copyright notice and this permission notice shall be included in
23+
* all
2324
* copies or substantial portions of the Software.
2425
* <p>
2526
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR

0 commit comments

Comments
 (0)