Skip to content

Commit f460300

Browse files
committed
Refactoring
1 parent 3de80d9 commit f460300

File tree

13 files changed

+54
-9
lines changed

13 files changed

+54
-9
lines changed

app/src/gms/java/me/blog/korn123/easydiary/fragments/SettingsGMSBackupFragment.kt

+10-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package me.blog.korn123.easydiary.fragments
22

33
import android.app.Activity
4+
import android.content.Context
45
import android.content.DialogInterface
56
import android.content.Intent
67
import android.os.Bundle
@@ -41,15 +42,17 @@ class SettingsGMSBackupFragment() : androidx.fragment.app.Fragment() {
4142
***************************************************************************************************/
4243
private lateinit var progressContainer: ConstraintLayout
4344
private lateinit var mRootView: ViewGroup
45+
private lateinit var mContext: Context
4446
private var mTaskFlag = 0
4547
private val mActivity: Activity
4648
get() = activity!!
4749

4850

49-
/***************************************************************************************************
50-
* override functions
51-
*
52-
***************************************************************************************************/
51+
override fun onAttach(context: Context) {
52+
super.onAttach(context)
53+
this.mContext = context
54+
}
55+
5356
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
5457
mRootView = inflater.inflate(R.layout.layout_settings_backup_gms, container, false) as ViewGroup
5558
return mRootView
@@ -133,7 +136,7 @@ class SettingsGMSBackupFragment() : androidx.fragment.app.Fragment() {
133136
progressContainer.visibility = View.VISIBLE
134137
val realmPath = EasyDiaryDbHelper.getRealmPath()
135138
initGoogleSignAccount(this) { account ->
136-
DriveServiceHelper(mActivity, account).run {
139+
DriveServiceHelper(mContext, account).run {
137140
initDriveWorkingDirectory(DriveServiceHelper.AAF_EASY_DIARY_REALM_FOLDER_NAME) {
138141
createFile(
139142
it!!, realmPath,
@@ -162,7 +165,7 @@ class SettingsGMSBackupFragment() : androidx.fragment.app.Fragment() {
162165

163166
private fun openRealmFilePickerDialog() {
164167
initGoogleSignAccount(this) { account ->
165-
val driveServiceHelper = DriveServiceHelper(mActivity, account)
168+
val driveServiceHelper = DriveServiceHelper(mContext, account)
166169

167170
// driveServiceHelper.queryFiles("mimeType contains 'text/aaf_v' and name contains '$DIARY_DB_NAME'", 1000)
168171

@@ -231,7 +234,7 @@ class SettingsGMSBackupFragment() : androidx.fragment.app.Fragment() {
231234
mActivity.setScreenOrientationSensor(false)
232235
progressContainer.visibility = View.VISIBLE
233236
initGoogleSignAccount(this) { account ->
234-
DriveServiceHelper(mActivity, account).run {
237+
DriveServiceHelper(mContext, account).run {
235238
initDriveWorkingDirectory(DriveServiceHelper.AAF_EASY_DIARY_PHOTO_FOLDER_NAME) { photoFolderId ->
236239
progressContainer.visibility = View.GONE
237240
mActivity.run {

app/src/main/assets/RELEASE_en

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
---------------------------------------------------
66

7+
# Changes in 1.4.142 (date: 2020.08.22)
8+
* Fixed an issue where some devices were abnormally terminated in the setting screen
9+
710
# Changes in 1.4.141 (date: 2020.08.03)
811
* User Experience (UX) Optimization
912
* French translation updates

app/src/main/assets/RELEASE_ja

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
---------------------------------------------------
66

7+
# Changes in 1.4.142 (date: 2020.08.22)
8+
* 一部のデバイスが設定画面で異常終了する問題を修正しました
9+
710
# Changes in 1.4.141 (date: 2020.08.03)
811
* ユーザーエクスペリエンス(UX)の最適化
912
* フランス語翻訳の更新

app/src/main/assets/RELEASE_ko

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
---------------------------------------------------
66

7+
# Changes in 1.4.142 (date: 2020.08.22)
8+
* 일부기기가 설정화면에서 비정상 종료되는 이슈 해결
9+
710
# Changes in 1.4.141 (date: 2020.08.03)
811
* 사용자경험(UX) 최적화
912
* 프랑스어 번역 업데이트

app/src/main/java/me/blog/korn123/easydiary/activities/EasyDiaryActivity.kt

+1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ open class EasyDiaryActivity : BaseSimpleActivity() {
5858

5959
fun checkWhatsNewDialog(applyFilter: Boolean = true) {
6060
arrayListOf<Release>().apply {
61+
add(Release(208, R.string.release_208))
6162
add(Release(207, R.string.release_207))
6263
add(Release(206, R.string.release_206))
6364
add(Release(205, R.string.release_205))

app/src/main/res/values-de/strings.xml

+4
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,10 @@
449449
User Experience (UX) Optimization\n
450450
French translation updates
451451
</string>
452+
<string name="release_208">
453+
v1.4.142 / 2020.08.22\n
454+
Fixed an issue where some devices were abnormally terminated in the setting screen
455+
</string>
452456

453457
<!-- ////////////////////////////////////////////////////////////////////////////////////////////// -->
454458
<!-- Resources added since version 1.4.47 here. -->

app/src/main/res/values-en/strings.xml

+4
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,10 @@
449449
User Experience (UX) Optimization\n
450450
French translation updates
451451
</string>
452+
<string name="release_208">
453+
v1.4.142 / 2020.08.22\n
454+
Fixed an issue where some devices were abnormally terminated in the setting screen
455+
</string>
452456

453457
<!-- ////////////////////////////////////////////////////////////////////////////////////////////// -->
454458
<!-- Resources added since version 1.4.47 here. -->

app/src/main/res/values-fr/strings.xml

+4
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,10 @@
449449
User Experience (UX) Optimization\n
450450
French translation updates
451451
</string>
452+
<string name="release_208">
453+
v1.4.142 / 2020.08.22\n
454+
Fixed an issue where some devices were abnormally terminated in the setting screen
455+
</string>
452456

453457
<!-- ////////////////////////////////////////////////////////////////////////////////////////////// -->
454458
<!-- Resources added since version 1.4.47 here. -->

app/src/main/res/values-ja/strings.xml

+5-1
Original file line numberDiff line numberDiff line change
@@ -442,13 +442,17 @@
442442
</string>
443443
<string name="release_206">
444444
v1.4.140 / 2020.07.20\n
445-
Fixed an error that the scheduler did not work in the application termination state
445+
アプリケーションが最近使用アプリ一覧から削除された場合、スケジューラが動作しなかったエラーを修正する
446446
</string>
447447
<string name="release_207">
448448
v1.4.141 / 2020.08.03\n
449449
ユーザーエクスペリエンス(UX)の最適化\n
450450
フランス語翻訳の更新
451451
</string>
452+
<string name="release_208">
453+
v1.4.142 / 2020.08.22\n
454+
一部のデバイスが設定画面で異常終了する問題を修正しました
455+
</string>
452456

453457
<!-- ////////////////////////////////////////////////////////////////////////////////////////////// -->
454458
<!-- Resources added since version 1.4.47 here. -->

app/src/main/res/values-ko/strings.xml

+5-1
Original file line numberDiff line numberDiff line change
@@ -442,13 +442,17 @@
442442
</string>
443443
<string name="release_206">
444444
v1.4.140 / 2020.07.20\n
445-
Fixed an error that the scheduler did not work in the application termination state
445+
애플리케이션이 최근 사용 앱 목록에서 제거되는 경우 스케줄러가 동작하지 않던 오류를 수정함
446446
</string>
447447
<string name="release_207">
448448
v1.4.141 / 2020.08.03\n
449449
사용자경험(UX) 최적화\n
450450
프랑스어 번역 업데이트
451451
</string>
452+
<string name="release_208">
453+
v1.4.142 / 2020.08.22\n
454+
일부기기가 설정화면에서 비정상 종료되는 이슈 해결
455+
</string>
452456

453457
<!-- ////////////////////////////////////////////////////////////////////////////////////////////// -->
454458
<!-- Resources added since version 1.4.47 here. -->

app/src/main/res/values-ru/strings.xml

+4
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,10 @@
449449
User Experience (UX) Optimization\n
450450
French translation updates
451451
</string>
452+
<string name="release_208">
453+
v1.4.142 / 2020.08.22\n
454+
Fixed an issue where some devices were abnormally terminated in the setting screen
455+
</string>
452456

453457
<!-- ////////////////////////////////////////////////////////////////////////////////////////////// -->
454458
<!-- Resources added since version 1.4.47 here. -->

app/src/main/res/values-zh-rCN/strings.xml

+4
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,10 @@
449449
User Experience (UX) Optimization\n
450450
French translation updates
451451
</string>
452+
<string name="release_208">
453+
v1.4.142 / 2020.08.22\n
454+
Fixed an issue where some devices were abnormally terminated in the setting screen
455+
</string>
452456

453457
<!-- ////////////////////////////////////////////////////////////////////////////////////////////// -->
454458
<!-- Resources added since version 1.4.47 here. -->

app/src/main/res/values/strings.xml

+4
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,10 @@
449449
User Experience (UX) Optimization\n
450450
French translation updates
451451
</string>
452+
<string name="release_208">
453+
v1.4.142 / 2020.08.22\n
454+
Fixed an issue where some devices were abnormally terminated in the setting screen
455+
</string>
452456

453457
<!-- ////////////////////////////////////////////////////////////////////////////////////////////// -->
454458
<!-- Resources added since version 1.4.47 here. -->

0 commit comments

Comments
 (0)