mirror of
https://github.com/nextcloud/notes-android.git
synced 2024-10-25 22:26:00 +03:00
fix widget creation
This commit is contained in:
parent
92f556bdaf
commit
373ecaa13b
1 changed files with 2 additions and 6 deletions
|
@ -12,10 +12,6 @@ import android.widget.Toast;
|
||||||
import it.niedermann.owncloud.notes.R;
|
import it.niedermann.owncloud.notes.R;
|
||||||
import it.niedermann.owncloud.notes.persistence.NoteServerSyncHelper;
|
import it.niedermann.owncloud.notes.persistence.NoteServerSyncHelper;
|
||||||
|
|
||||||
/**
|
|
||||||
* Created by dan0xii on 04/10/17.
|
|
||||||
*/
|
|
||||||
|
|
||||||
public class NoteListWidgetConfiguration extends AppCompatActivity {
|
public class NoteListWidgetConfiguration extends AppCompatActivity {
|
||||||
private static final String TAG = Activity.class.getSimpleName();
|
private static final String TAG = Activity.class.getSimpleName();
|
||||||
|
|
||||||
|
@ -28,6 +24,7 @@ public class NoteListWidgetConfiguration extends AppCompatActivity {
|
||||||
|
|
||||||
if (intent.getExtras() == null) {
|
if (intent.getExtras() == null) {
|
||||||
finish();
|
finish();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int mAppWidgetId = intent.getExtras().getInt(AppWidgetManager.EXTRA_APPWIDGET_ID,
|
int mAppWidgetId = intent.getExtras().getInt(AppWidgetManager.EXTRA_APPWIDGET_ID,
|
||||||
|
@ -39,10 +36,9 @@ public class NoteListWidgetConfiguration extends AppCompatActivity {
|
||||||
// TODO Present user with app login screen
|
// TODO Present user with app login screen
|
||||||
Log.w(TAG, "onCreate: user not logged in");
|
Log.w(TAG, "onCreate: user not logged in");
|
||||||
} else {
|
} else {
|
||||||
Intent retIntent = new Intent();
|
Intent retIntent = new Intent(this, NoteListWidget.class);
|
||||||
retIntent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, mAppWidgetId);
|
retIntent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, mAppWidgetId);
|
||||||
retIntent.setAction(AppWidgetManager.ACTION_APPWIDGET_UPDATE);
|
retIntent.setAction(AppWidgetManager.ACTION_APPWIDGET_UPDATE);
|
||||||
retIntent = new Intent(this, NoteListWidget.class);
|
|
||||||
sendBroadcast(retIntent);
|
sendBroadcast(retIntent);
|
||||||
setResult(RESULT_OK, retIntent);
|
setResult(RESULT_OK, retIntent);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue