small context handling change in widget
This commit is contained in:
parent
f0d6aea9b2
commit
d849b2f686
1 changed files with 2 additions and 2 deletions
|
@ -30,7 +30,7 @@ public class MyWidgetProvider extends AppWidgetProvider {
|
|||
|
||||
@Override
|
||||
public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {
|
||||
initVariables(cxt);
|
||||
initVariables(context);
|
||||
super.onUpdate(context, appWidgetManager, appWidgetIds);
|
||||
}
|
||||
|
||||
|
@ -139,7 +139,7 @@ public class MyWidgetProvider extends AppWidgetProvider {
|
|||
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
if (remoteViews == null || widgetManager == null || bus == null) {
|
||||
if (remoteViews == null || widgetManager == null || bus == null || cxt == null) {
|
||||
initVariables(context);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue