Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.
C++
[android] Add more logging to DocumentSaverService
Dmitry Kazakovb31ccffd13b2
diff --git a/packaging/android/apk/src/org/krita/android/DocumentSaverService.java b/packaging/android/apk/src/org/krita/android/DocumentSaverService.javaindex c98420487a..acf8d276f3 100644--- a/packaging/android/apk/src/org/krita/android/DocumentSaverService.java+++ b/packaging/android/apk/src/org/krita/android/DocumentSaverService.java@@ -86,6 +86,7 @@ public class DocumentSaverService extends Service {@RequiresApi(api = Build.VERSION_CODES.S)private void tryStartServiceInForegroundS() {try {+ Log.w(TAG, "Starting the service in foreground");startForeground(NOTIFICATION_ID, getNotification());mStartedInForeground = true;} catch (ForegroundServiceStartNotAllowedException e) {@@ -117,7 +118,9 @@ public class DocumentSaverService extends Service {new Runnable() {@Overridepublic void run() {+ Log.i(TAG, "... calling JNIWrappers.saveState()");JNIWrappers.saveState();+ Log.i(TAG, "... exited JNIWrappers.saveState(), started in foreground: " + mStartedInForeground);if (mStartedInForeground) {if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {stopForeground(STOP_FOREGROUND_REMOVE);@@ -131,6 +134,7 @@ public class DocumentSaverService extends Service {});mDocSaverThread.start();} else if (intent.getBooleanExtra(KILL_PROCESS, false)) {+ Log.i(TAG, "kill process command received");mKillProcess = true;if (mStartedInForeground) {// This can be async, because foreground service are promised to run beyond process death.@@ -151,6 +155,7 @@ public class DocumentSaverService extends Service {stopSelf();}} else if (intent.getBooleanExtra(CANCEL_SAVING, false)) {+ Log.i(TAG, "cancel saving command received");// without this Android will think we crashedstopSelf();