Skip to content

Commit 3c5f299

Browse files
committed
update commons to 5.3.9
1 parent b967177 commit 3c5f299

File tree

4 files changed

+52
-85
lines changed

4 files changed

+52
-85
lines changed

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ android {
4242
}
4343

4444
dependencies {
45-
implementation 'com.simplemobiletools:commons:5.2.10'
45+
implementation 'com.simplemobiletools:commons:5.3.9'
4646

4747
implementation files('../libs/RootTools.jar')
4848
}

app/src/main/kotlin/com/simplemobiletools/filemanager/activities/SettingsActivity.kt

Lines changed: 16 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,12 @@ class SettingsActivity : SimpleActivity() {
2222
override fun onResume() {
2323
super.onResume()
2424

25-
setupPurchaseThankYou()
25+
setupUpgradeToPro()
2626
setupCustomizeColors()
2727
setupUseEnglish()
28-
setupAvoidWhatsNew()
2928
setupManageFavorites()
3029
setupShowHidden()
31-
setupPasswordProtection()
30+
setupHiddenItemPasswordProtection()
3231
setupKeepLastModified()
3332
setupShowInfoBubble()
3433
setupEnableRootAccess()
@@ -43,10 +42,10 @@ class SettingsActivity : SimpleActivity() {
4342
}
4443
}
4544

46-
private fun setupPurchaseThankYou() {
47-
settings_purchase_thank_you_holder.beVisibleIf(config.appRunCount > 10 && !isThankYouInstalled())
48-
settings_purchase_thank_you_holder.setOnClickListener {
49-
launchPurchaseThankYouIntent()
45+
private fun setupUpgradeToPro() {
46+
settings_upgrade_to_pro_holder.beGoneIf(isAProApp())
47+
settings_upgrade_to_pro_holder.setOnClickListener {
48+
launchUpgradeToProIntent()
5049
}
5150
}
5251

@@ -72,14 +71,6 @@ class SettingsActivity : SimpleActivity() {
7271
}
7372
}
7473

75-
private fun setupAvoidWhatsNew() {
76-
settings_avoid_whats_new.isChecked = config.avoidWhatsNew
77-
settings_avoid_whats_new_holder.setOnClickListener {
78-
settings_avoid_whats_new.toggle()
79-
config.avoidWhatsNew = settings_avoid_whats_new.isChecked
80-
}
81-
}
82-
8374
private fun setupShowHidden() {
8475
settings_show_hidden.isChecked = config.showHidden
8576
settings_show_hidden_holder.setOnClickListener {
@@ -98,20 +89,20 @@ class SettingsActivity : SimpleActivity() {
9889
config.showHidden = settings_show_hidden.isChecked
9990
}
10091

101-
private fun setupPasswordProtection() {
102-
settings_password_protection.isChecked = config.isPasswordProtectionOn
92+
private fun setupHiddenItemPasswordProtection() {
93+
settings_password_protection.isChecked = config.isHiddenPasswordProtectionOn
10394
settings_password_protection_holder.setOnClickListener {
104-
val tabToShow = if (config.isPasswordProtectionOn) config.protectionType else SHOW_ALL_TABS
105-
SecurityDialog(this, config.passwordHash, tabToShow) { hash, type, success ->
95+
val tabToShow = if (config.isHiddenPasswordProtectionOn) config.hiddenProtectionType else SHOW_ALL_TABS
96+
SecurityDialog(this, config.hiddenPasswordHash, tabToShow) { hash, type, success ->
10697
if (success) {
107-
val hasPasswordProtection = config.isPasswordProtectionOn
98+
val hasPasswordProtection = config.isHiddenPasswordProtectionOn
10899
settings_password_protection.isChecked = !hasPasswordProtection
109-
config.isPasswordProtectionOn = !hasPasswordProtection
110-
config.passwordHash = if (hasPasswordProtection) "" else hash
111-
config.protectionType = type
100+
config.isHiddenPasswordProtectionOn = !hasPasswordProtection
101+
config.hiddenPasswordHash = if (hasPasswordProtection) "" else hash
102+
config.hiddenProtectionType = type
112103

113-
if (config.isPasswordProtectionOn) {
114-
val confirmationTextId = if (config.protectionType == PROTECTION_FINGERPRINT)
104+
if (config.isHiddenPasswordProtectionOn) {
105+
val confirmationTextId = if (config.hiddenProtectionType == PROTECTION_FINGERPRINT)
115106
R.string.fingerprint_setup_successfully else R.string.protection_setup_successfully
116107
ConfirmationDialog(this, "", confirmationTextId, R.string.ok, 0) { }
117108
}

app/src/main/res/layout/activity_settings.xml

Lines changed: 34 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,24 @@
1313
android:orientation="vertical">
1414

1515
<RelativeLayout
16-
android:id="@+id/settings_purchase_thank_you_holder"
16+
android:id="@+id/settings_upgrade_to_pro_holder"
1717
android:layout_width="match_parent"
1818
android:layout_height="wrap_content"
1919
android:layout_marginTop="@dimen/medium_margin"
2020
android:background="?attr/selectableItemBackground"
21-
android:paddingBottom="@dimen/activity_margin"
2221
android:paddingLeft="@dimen/normal_margin"
22+
android:paddingTop="@dimen/activity_margin"
2323
android:paddingRight="@dimen/normal_margin"
24-
android:paddingTop="@dimen/activity_margin">
24+
android:paddingBottom="@dimen/activity_margin">
2525

2626
<com.simplemobiletools.commons.views.MyTextView
27-
android:id="@+id/settings_purchase_thank_you"
27+
android:id="@+id/settings_upgrade_to_pro"
2828
android:layout_width="wrap_content"
2929
android:layout_height="wrap_content"
3030
android:layout_centerVertical="true"
31-
android:paddingLeft="@dimen/medium_margin"
3231
android:paddingStart="@dimen/medium_margin"
33-
android:text="@string/purchase_simple_thank_you"/>
32+
android:paddingLeft="@dimen/medium_margin"
33+
android:text="@string/upgrade_to_pro"/>
3434

3535
</RelativeLayout>
3636

@@ -40,18 +40,18 @@
4040
android:layout_height="wrap_content"
4141
android:layout_marginTop="@dimen/medium_margin"
4242
android:background="?attr/selectableItemBackground"
43-
android:paddingBottom="@dimen/activity_margin"
4443
android:paddingLeft="@dimen/normal_margin"
44+
android:paddingTop="@dimen/activity_margin"
4545
android:paddingRight="@dimen/normal_margin"
46-
android:paddingTop="@dimen/activity_margin">
46+
android:paddingBottom="@dimen/activity_margin">
4747

4848
<com.simplemobiletools.commons.views.MyTextView
4949
android:id="@+id/settings_customize_colors"
5050
android:layout_width="wrap_content"
5151
android:layout_height="wrap_content"
5252
android:layout_centerVertical="true"
53-
android:paddingLeft="@dimen/medium_margin"
5453
android:paddingStart="@dimen/medium_margin"
54+
android:paddingLeft="@dimen/medium_margin"
5555
android:text="@string/customize_colors"/>
5656

5757
</RelativeLayout>
@@ -62,18 +62,18 @@
6262
android:layout_height="wrap_content"
6363
android:layout_marginTop="@dimen/medium_margin"
6464
android:background="?attr/selectableItemBackground"
65-
android:paddingBottom="@dimen/activity_margin"
6665
android:paddingLeft="@dimen/normal_margin"
66+
android:paddingTop="@dimen/activity_margin"
6767
android:paddingRight="@dimen/normal_margin"
68-
android:paddingTop="@dimen/activity_margin">
68+
android:paddingBottom="@dimen/activity_margin">
6969

7070
<com.simplemobiletools.commons.views.MyTextView
7171
android:id="@+id/settings_manage_favorites"
7272
android:layout_width="wrap_content"
7373
android:layout_height="wrap_content"
7474
android:layout_centerVertical="true"
75-
android:paddingLeft="@dimen/medium_margin"
7675
android:paddingStart="@dimen/medium_margin"
76+
android:paddingLeft="@dimen/medium_margin"
7777
android:text="@string/manage_favorites"/>
7878

7979
</RelativeLayout>
@@ -84,44 +84,20 @@
8484
android:layout_height="wrap_content"
8585
android:layout_marginTop="@dimen/medium_margin"
8686
android:background="?attr/selectableItemBackground"
87-
android:paddingBottom="@dimen/activity_margin"
8887
android:paddingLeft="@dimen/normal_margin"
88+
android:paddingTop="@dimen/activity_margin"
8989
android:paddingRight="@dimen/normal_margin"
90-
android:paddingTop="@dimen/activity_margin">
90+
android:paddingBottom="@dimen/activity_margin">
9191

9292
<com.simplemobiletools.commons.views.MySwitchCompat
9393
android:id="@+id/settings_use_english"
9494
android:layout_width="match_parent"
9595
android:layout_height="wrap_content"
9696
android:background="@null"
9797
android:clickable="false"
98-
android:paddingLeft="@dimen/medium_margin"
9998
android:paddingStart="@dimen/medium_margin"
100-
android:text="@string/use_english_language"
101-
app:switchPadding="@dimen/medium_margin"/>
102-
103-
</RelativeLayout>
104-
105-
<RelativeLayout
106-
android:id="@+id/settings_avoid_whats_new_holder"
107-
android:layout_width="match_parent"
108-
android:layout_height="wrap_content"
109-
android:layout_marginTop="@dimen/medium_margin"
110-
android:background="?attr/selectableItemBackground"
111-
android:paddingBottom="@dimen/activity_margin"
112-
android:paddingLeft="@dimen/normal_margin"
113-
android:paddingRight="@dimen/normal_margin"
114-
android:paddingTop="@dimen/activity_margin">
115-
116-
<com.simplemobiletools.commons.views.MySwitchCompat
117-
android:id="@+id/settings_avoid_whats_new"
118-
android:layout_width="match_parent"
119-
android:layout_height="wrap_content"
120-
android:background="@null"
121-
android:clickable="false"
12299
android:paddingLeft="@dimen/medium_margin"
123-
android:paddingStart="@dimen/medium_margin"
124-
android:text="@string/avoid_whats_new"
100+
android:text="@string/use_english_language"
125101
app:switchPadding="@dimen/medium_margin"/>
126102

127103
</RelativeLayout>
@@ -137,8 +113,8 @@
137113
android:id="@+id/visibility_label"
138114
android:layout_width="wrap_content"
139115
android:layout_height="wrap_content"
140-
android:layout_marginLeft="@dimen/bigger_margin"
141116
android:layout_marginStart="@dimen/bigger_margin"
117+
android:layout_marginLeft="@dimen/bigger_margin"
142118
android:layout_marginTop="@dimen/activity_margin"
143119
android:text="@string/visibility"
144120
android:textAllCaps="true"
@@ -150,19 +126,19 @@
150126
android:layout_height="wrap_content"
151127
android:layout_marginTop="@dimen/medium_margin"
152128
android:background="?attr/selectableItemBackground"
153-
android:paddingBottom="@dimen/activity_margin"
154129
android:paddingLeft="@dimen/normal_margin"
130+
android:paddingTop="@dimen/activity_margin"
155131
android:paddingRight="@dimen/normal_margin"
156-
android:paddingTop="@dimen/activity_margin">
132+
android:paddingBottom="@dimen/activity_margin">
157133

158134
<com.simplemobiletools.commons.views.MySwitchCompat
159135
android:id="@+id/settings_show_hidden"
160136
android:layout_width="match_parent"
161137
android:layout_height="wrap_content"
162138
android:background="@null"
163139
android:clickable="false"
164-
android:paddingLeft="@dimen/medium_margin"
165140
android:paddingStart="@dimen/medium_margin"
141+
android:paddingLeft="@dimen/medium_margin"
166142
android:text="@string/show_hidden_items"
167143
app:switchPadding="@dimen/medium_margin"/>
168144

@@ -179,8 +155,8 @@
179155
android:id="@+id/file_operations_label"
180156
android:layout_width="wrap_content"
181157
android:layout_height="wrap_content"
182-
android:layout_marginLeft="@dimen/bigger_margin"
183158
android:layout_marginStart="@dimen/bigger_margin"
159+
android:layout_marginLeft="@dimen/bigger_margin"
184160
android:layout_marginTop="@dimen/activity_margin"
185161
android:text="@string/file_operations"
186162
android:textAllCaps="true"
@@ -192,19 +168,19 @@
192168
android:layout_height="wrap_content"
193169
android:layout_marginTop="@dimen/medium_margin"
194170
android:background="?attr/selectableItemBackground"
195-
android:paddingBottom="@dimen/activity_margin"
196171
android:paddingLeft="@dimen/normal_margin"
172+
android:paddingTop="@dimen/activity_margin"
197173
android:paddingRight="@dimen/normal_margin"
198-
android:paddingTop="@dimen/activity_margin">
174+
android:paddingBottom="@dimen/activity_margin">
199175

200176
<com.simplemobiletools.commons.views.MySwitchCompat
201177
android:id="@+id/settings_keep_last_modified"
202178
android:layout_width="match_parent"
203179
android:layout_height="wrap_content"
204180
android:background="@null"
205181
android:clickable="false"
206-
android:paddingLeft="@dimen/medium_margin"
207182
android:paddingStart="@dimen/medium_margin"
183+
android:paddingLeft="@dimen/medium_margin"
208184
android:text="@string/keep_last_modified"
209185
app:switchPadding="@dimen/medium_margin"/>
210186

@@ -221,8 +197,8 @@
221197
android:id="@+id/scrolling_label"
222198
android:layout_width="wrap_content"
223199
android:layout_height="wrap_content"
224-
android:layout_marginLeft="@dimen/bigger_margin"
225200
android:layout_marginStart="@dimen/bigger_margin"
201+
android:layout_marginLeft="@dimen/bigger_margin"
226202
android:layout_marginTop="@dimen/activity_margin"
227203
android:text="@string/scrolling"
228204
android:textAllCaps="true"
@@ -234,19 +210,19 @@
234210
android:layout_height="wrap_content"
235211
android:layout_marginTop="@dimen/medium_margin"
236212
android:background="?attr/selectableItemBackground"
237-
android:paddingBottom="@dimen/activity_margin"
238213
android:paddingLeft="@dimen/normal_margin"
214+
android:paddingTop="@dimen/activity_margin"
239215
android:paddingRight="@dimen/normal_margin"
240-
android:paddingTop="@dimen/activity_margin">
216+
android:paddingBottom="@dimen/activity_margin">
241217

242218
<com.simplemobiletools.commons.views.MySwitchCompat
243219
android:id="@+id/settings_show_info_bubble"
244220
android:layout_width="match_parent"
245221
android:layout_height="wrap_content"
246222
android:background="@null"
247223
android:clickable="false"
248-
android:paddingLeft="@dimen/medium_margin"
249224
android:paddingStart="@dimen/medium_margin"
225+
android:paddingLeft="@dimen/medium_margin"
250226
android:text="@string/show_info_bubble"
251227
app:switchPadding="@dimen/medium_margin"/>
252228

@@ -263,8 +239,8 @@
263239
android:id="@+id/security_label"
264240
android:layout_width="wrap_content"
265241
android:layout_height="wrap_content"
266-
android:layout_marginLeft="@dimen/bigger_margin"
267242
android:layout_marginStart="@dimen/bigger_margin"
243+
android:layout_marginLeft="@dimen/bigger_margin"
268244
android:layout_marginTop="@dimen/activity_margin"
269245
android:text="@string/security"
270246
android:textAllCaps="true"
@@ -276,19 +252,19 @@
276252
android:layout_height="wrap_content"
277253
android:layout_marginTop="@dimen/medium_margin"
278254
android:background="?attr/selectableItemBackground"
279-
android:paddingBottom="@dimen/activity_margin"
280255
android:paddingLeft="@dimen/normal_margin"
256+
android:paddingTop="@dimen/activity_margin"
281257
android:paddingRight="@dimen/normal_margin"
282-
android:paddingTop="@dimen/activity_margin">
258+
android:paddingBottom="@dimen/activity_margin">
283259

284260
<com.simplemobiletools.commons.views.MySwitchCompat
285261
android:id="@+id/settings_password_protection"
286262
android:layout_width="match_parent"
287263
android:layout_height="wrap_content"
288264
android:background="@null"
289265
android:clickable="false"
290-
android:paddingLeft="@dimen/medium_margin"
291266
android:paddingStart="@dimen/medium_margin"
267+
android:paddingLeft="@dimen/medium_margin"
292268
android:text="@string/password_protect_hidden_items"
293269
app:switchPadding="@dimen/medium_margin"/>
294270

@@ -300,19 +276,19 @@
300276
android:layout_height="wrap_content"
301277
android:layout_marginTop="@dimen/medium_margin"
302278
android:background="?attr/selectableItemBackground"
303-
android:paddingBottom="@dimen/activity_margin"
304279
android:paddingLeft="@dimen/normal_margin"
280+
android:paddingTop="@dimen/activity_margin"
305281
android:paddingRight="@dimen/normal_margin"
306-
android:paddingTop="@dimen/activity_margin">
282+
android:paddingBottom="@dimen/activity_margin">
307283

308284
<com.simplemobiletools.commons.views.MySwitchCompat
309285
android:id="@+id/settings_enable_root_access"
310286
android:layout_width="match_parent"
311287
android:layout_height="wrap_content"
312288
android:background="@null"
313289
android:clickable="false"
314-
android:paddingLeft="@dimen/medium_margin"
315290
android:paddingStart="@dimen/medium_margin"
291+
android:paddingLeft="@dimen/medium_margin"
316292
android:text="@string/enable_root_access"
317293
app:switchPadding="@dimen/medium_margin"/>
318294

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22

33
buildscript {
4-
ext.kotlin_version = '1.2.71'
4+
ext.kotlin_version = '1.3.0'
55

66
repositories {
77
google()

0 commit comments

Comments
 (0)