• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Simple Notepad Application for Android OS


Commit MetaInfo

Revision724d0060f590b0feabc979e460320548863dc2ff (tree)
Time2019-05-04 23:35:08
AuthorMasahiko, SAWAI <say@user...>
CommiterMasahiko, SAWAI

Log Message

Remove DB optimize background service.

Change Summary

Incremental Difference

--- a/doc/Changes.txt
+++ b/doc/Changes.txt
@@ -1,3 +1,8 @@
1+1.0.17
2+======
3+
4+* Remove DB optimize background service
5+
16 1.0.12
27 ======
38
--- a/notepad-app-level-11/src/main/AndroidManifest.xml
+++ b/notepad-app-level-11/src/main/AndroidManifest.xml
@@ -245,8 +245,6 @@
245245 <!-- Service : data initialize service -->
246246 <service android:name=".template.NoteTemplateInitializer" />
247247
248- <service android:name=".provider.NoteDBOptimizer" />
249-
250248 <service android:name=".prefs.BackupDatabaseService" />
251249
252250 <!-- Provider : Notes & Templates Content Provider -->
--- a/notepad-app-level-11/src/main/java/org/routine_work/notepad/NotepadActivity.java
+++ b/notepad-app-level-11/src/main/java/org/routine_work/notepad/NotepadActivity.java
@@ -2,7 +2,7 @@
22 /*
33 * The MIT License
44 *
5- * Copyright 2012 Masahiko, SAWAI <masahiko.sawai@gmail.com>.
5+ * Copyright 2012,2019 Masahiko, SAWAI <masahiko.sawai@gmail.com>.
66 *
77 * Permission is hereby granted, free of charge, to any person obtaining a copy
88 * of this software and associated documentation files (the "Software"), to deal
@@ -53,7 +53,6 @@ import org.routine_work.notepad.fragment.NoteListFragment;
5353 import org.routine_work.notepad.fragment.ViewNoteFragment;
5454 import org.routine_work.notepad.prefs.NotepadPreferenceActivity;
5555 import org.routine_work.notepad.prefs.NotepadPreferenceUtils;
56-import org.routine_work.notepad.provider.NoteDBOptimizer;
5756 import org.routine_work.notepad.provider.NoteStore;
5857 import org.routine_work.notepad.template.NoteTemplateInitializer;
5958 import org.routine_work.notepad.template.NoteTemplatePickerDialogFragment;
@@ -69,7 +68,6 @@ public class NotepadActivity extends Activity implements NotepadConstants,
6968 {
7069
7170 public static final String ACTION_QUIT = NotepadActivity.class.getPackage().getName() + ".ACTION_QUIT";
72- private static final int DB_OPTIMIZER_COUNT = 128;
7371 private static final String FT_NOTE_DETAIL = "FT_NOTE_DETAIL";
7472 private static final String FT_NOTE_TEMPLATE_PICKER = "FT_NOTE_TEMPLATE_PICKER";
7573 private static final String LOG_TAG = "simple-notepad";
@@ -194,13 +192,6 @@ public class NotepadActivity extends Activity implements NotepadConstants,
194192 {
195193 Log.v(LOG_TAG, "Hello");
196194
197- int quitCount = NotepadPreferenceUtils.incrementQuitCount(this);
198- if ((quitCount % DB_OPTIMIZER_COUNT) == 0)
199- {
200- Intent noteDBOptimizerIntent = new Intent(this, NoteDBOptimizer.class);
201- startService(noteDBOptimizerIntent);
202- }
203-
204195 super.onDestroy();
205196
206197 Log.v(LOG_TAG, "Bye");
@@ -327,7 +318,8 @@ public class NotepadActivity extends Activity implements NotepadConstants,
327318 Log.v(LOG_TAG, "searchView.isIconified() => " + searchView.isIconified()); // androud 4 : true, androud 7 : false
328319 Log.v(LOG_TAG, "searchView.isShown() => " + searchView.isShown());
329320
330- if ((keyCode == KeyEvent.KEYCODE_BACK) && searchView.isShown() && !searchView.isIconified())
321+ if ((keyCode == KeyEvent.KEYCODE_BACK)
322+ && (searchView != null && searchView.isShown() && !searchView.isIconified()))
331323 {
332324 Log.v(LOG_TAG, "Close SeachView");
333325 searchView.setQuery(null, false);
--- a/notepad-app/src/main/AndroidManifest.xml
+++ b/notepad-app/src/main/AndroidManifest.xml
@@ -240,8 +240,6 @@
240240 <!-- Service : data initialize service -->
241241 <service android:name=".template.NoteTemplateInitializer" />
242242
243- <service android:name=".provider.NoteDBOptimizer" />
244-
245243 <service android:name=".prefs.BackupDatabaseService" />
246244
247245 <!-- Provider : Notes & Templates Content Provider -->
--- a/notepad-app/src/main/java/org/routine_work/notepad/NotepadActivity.java
+++ b/notepad-app/src/main/java/org/routine_work/notepad/NotepadActivity.java
@@ -1,7 +1,7 @@
11 /*
22 * The MIT License
33 *
4- * Copyright 2012-2013 Masahiko, SAWAI <masahiko.sawai@gmail.com>.
4+ * Copyright 2012-2013,2019 Masahiko, SAWAI <masahiko.sawai@gmail.com>.
55 *
66 * Permission is hereby granted, free of charge, to any person obtaining a copy
77 * of this software and associated documentation files (the "Software"), to deal
@@ -47,7 +47,6 @@ import android.widget.AdapterView.OnItemClickListener;
4747 import java.util.Arrays;
4848 import org.routine_work.notepad.prefs.NotepadPreferenceActivity;
4949 import org.routine_work.notepad.prefs.NotepadPreferenceUtils;
50-import org.routine_work.notepad.provider.NoteDBOptimizer;
5150 import org.routine_work.notepad.provider.NoteStore;
5251 import org.routine_work.notepad.template.NoteTemplateInitializer;
5352 import org.routine_work.notepad.template.NoteTemplatePickerDialog;
@@ -68,7 +67,6 @@ public class NotepadActivity extends ListActivity
6867 NotepadConstants
6968 {
7069
71- private static final int DB_OPTIMIZER_COUNT = 128;
7270 private static final String LOG_TAG = "simple-notepad";
7371 private static final String ACTION_QUIT = NotepadConstants.class.getPackage().getName() + ".QUIT";
7472 private static final String SAVE_KEY_ACTION_MODE = "ACTION_MODE";
@@ -218,13 +216,6 @@ public class NotepadActivity extends ListActivity
218216 cursor = null;
219217 }
220218
221- int quitCount = NotepadPreferenceUtils.incrementQuitCount(this);
222- if ((quitCount % DB_OPTIMIZER_COUNT) == 0)
223- {
224- Intent noteDBOptimizerIntent = new Intent(this, NoteDBOptimizer.class);
225- startService(noteDBOptimizerIntent);
226- }
227-
228219 super.onDestroy();
229220
230221 Log.v(LOG_TAG, "Bye");