Skip to content

Commit

Permalink
add log calls to investigate crashes
Browse files Browse the repository at this point in the history
  • Loading branch information
CampelloManuel committed Dec 5, 2022
1 parent e8bd3df commit 2c0b40e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/android_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,9 @@ jobs:
disk-size: 500M # needed for saving org and json files
force-avd-creation: false
# it's picky on the parameters
emulator-options: -no-boot-anim -no-window -accel on # -gpu host
emulator-options: -no-boot-anim -no-window
disable-animations: true
disable-spellchecker: true
# starts the emulator, runs this script, then closes the emulator
script: |
# wait for it to finish booting, then take a screenshot
Expand Down Expand Up @@ -106,8 +107,9 @@ jobs:
disk-size: 500M
force-avd-creation: false
disable-animations: true
# -gpu swiftshader_indirect
emulator-options: -no-snapshot-save -verbose -no-boot-anim -no-window
disable-spellchecker: true
# TODO test -gpu host
emulator-options: -no-snapshot-save -verbose -no-boot-anim -no-window -accel on # -gpu host
script: bash ./github_on_emu_started.sh

- name: upload the generated files
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,33 +17,25 @@

package com.nononsenseapps.notepad.sync.orgsync;

import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.app.Service;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.database.ContentObserver;
import android.net.Uri;
import android.os.Build;
import android.os.Handler;
import android.os.HandlerThread;
import android.os.IBinder;
import android.os.Looper;
import android.os.Message;
import android.os.Process;
import android.util.Log;

import androidx.core.app.NotificationCompat;
import androidx.preference.PreferenceManager;

import com.nononsenseapps.helpers.NnnLogger;
import com.nononsenseapps.helpers.NotificationHelper;
import com.nononsenseapps.notepad.BuildConfig;
import com.nononsenseapps.notepad.database.Task;
import com.nononsenseapps.notepad.database.TaskList;
import com.nononsenseapps.notepad.prefs.PrefsActivity;
import com.nononsenseapps.notepad.prefs.SyncPrefs;
import com.nononsenseapps.notepad.sync.SyncAdapter;

Expand All @@ -70,17 +62,25 @@ public class OrgSyncService extends Service {
private final ArrayList<SynchronizerInterface> synchronizers;

public static void start(Context context) {
NnnLogger.debug(OrgSyncService.class, "got here #1");
context.startService(new Intent(context, OrgSyncService.class) // TODO startservice. does this work correctly in newer android versions ?
.setAction(ACTION_START));
NnnLogger.debug(OrgSyncService.class, "got here #2");
}

// TODO this service crashes in API 23 - default image on github

public static void pause(Context context) {
NnnLogger.debug(OrgSyncService.class, "got here #3");
context.startService(new Intent(context, OrgSyncService.class) // TODO startservice. does this work correctly in newer android versions ?
.setAction(ACTION_PAUSE));
NnnLogger.debug(OrgSyncService.class, "got here #4");
}

public static void stop(Context context) {
NnnLogger.debug(OrgSyncService.class, "got here #5");
context.stopService(new Intent(context, OrgSyncService.class));
NnnLogger.debug(OrgSyncService.class, "got here #6");
}

public static boolean areAnyEnabled(Context context) {
Expand Down

0 comments on commit 2c0b40e

Please sign in to comment.