Skip to content

Commit

Permalink
remove SyncService.java should fix #460
Browse files Browse the repository at this point in the history
  • Loading branch information
CampelloManuel committed Jan 9, 2023
1 parent 4ad505e commit 73fdb8b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 124 deletions.
24 changes: 6 additions & 18 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -185,18 +185,6 @@
</intent-filter>
</activity>

<service
android:name="com.nononsenseapps.notepad.sync.SyncService"
android:exported="true">
<intent-filter>
<action android:name="android.content.SyncAdapter"/>
</intent-filter>

<meta-data
android:name="android.content.SyncAdapter"
android:resource="@xml/syncadapter"/>
</service>

<!-- List Widget -->
<receiver
android:name="com.nononsenseapps.notepad.widget.ListWidgetProvider"
Expand Down Expand Up @@ -320,11 +308,11 @@

<provider
android:name=".android.provider.TextFileProvider"
android:label="SD-card files"
android:icon="@drawable/ic_sd_storage_24dp"
android:authorities="com.nononsenseapps.notepad.TESTPROVIDER"
android:enabled="true"
android:exported="true">
android:exported="true"
android:icon="@drawable/ic_sd_storage_24dp"
android:label="SD-card files">
<intent-filter>
<action android:name="com.nononsenseapps.notepad.PROVIDER"/>
</intent-filter>
Expand Down Expand Up @@ -353,11 +341,11 @@

<provider
android:name=".android.provider.DummyProvider"
android:label="Dummy items"
android:icon="@drawable/app_icon"
android:authorities="com.nononsenseapps.notepad.DUMMYPROVIDER"
android:enabled="true"
android:exported="true">
android:exported="true"
android:icon="@drawable/app_icon"
android:label="Dummy items">
<intent-filter>
<action android:name="com.nononsenseapps.notepad.PROVIDER"/>
</intent-filter>
Expand Down
33 changes: 4 additions & 29 deletions app/src/main/java/com/nononsenseapps/notepad/sync/SyncAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,12 @@

package com.nononsenseapps.notepad.sync;

import android.accounts.Account;
import android.content.AbstractThreadedSyncAdapter;
import android.content.ContentProviderClient;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.SyncResult;
import android.os.Bundle;

import androidx.preference.PreferenceManager;

/**
* this used to do google tasks sync. It may be useful in the future
* this used to do google tasks sync. Now it only provides constants
*/
public class SyncAdapter extends AbstractThreadedSyncAdapter {
public final class SyncAdapter {

private SyncAdapter() {}

public static final String SYNC_STARTED = "com.nononsenseapps.notepad.sync.SYNC_STARTED";
public static final String SYNC_FINISHED = "com.nononsenseapps.notepad.sync.SYNC_FINISHED";
Expand All @@ -41,20 +32,4 @@ public class SyncAdapter extends AbstractThreadedSyncAdapter {
public static final int LOGIN_FAIL = 1;
public static final int ERROR = 2;

public SyncAdapter(Context context, boolean autoInitialize) {
super(context, autoInitialize);
}

@Override
public void onPerformSync(Account account, Bundle extras, String authority,
ContentProviderClient provider, SyncResult syncResult) {

final SharedPreferences settings = PreferenceManager
.getDefaultSharedPreferences(this.getContext());

Intent doneIntent = new Intent(SYNC_FINISHED)
.putExtra(SYNC_RESULT, ERROR);

this.getContext().sendBroadcast(doneIntent);
}
}
48 changes: 0 additions & 48 deletions app/src/main/java/com/nononsenseapps/notepad/sync/SyncService.java

This file was deleted.

29 changes: 0 additions & 29 deletions app/src/main/res/xml/syncadapter.xml

This file was deleted.

0 comments on commit 73fdb8b

Please sign in to comment.