Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b44ac717 authored by Jonathan Klee's avatar Jonathan Klee
Browse files

Fix some NPE exceptions

parent 6c4d754a
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -19,7 +19,6 @@ public class WeatherInfoView extends LinearLayout {

    private View mWeatherPanel;
    private View mWeatherSetupTextView;
    private Context mContext;

    private final BroadcastReceiver mWeatherReceiver = new BroadcastReceiver() {
        @Override
@@ -47,7 +46,6 @@ public class WeatherInfoView extends LinearLayout {

    public WeatherInfoView(Context context, AttributeSet attrs) {
        super(context, attrs);
        mContext = context;
    }

    @Override
@@ -64,7 +62,7 @@ public class WeatherInfoView extends LinearLayout {
        });
        findViewById(R.id.weather_setting_imageview).setOnClickListener(v -> startWeatherPreferences());
        findViewById(R.id.weather_refresh_imageview).setOnClickListener(v -> {
            WeatherUpdater.getInstance(mContext).forceWeatherRequest();
            WeatherUpdater.getInstance(getContext().getApplicationContext()).forceWeatherRequest();
        });
    }

+1 −1
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ public class WeatherUpdateService extends Service {
        mHandlerThread.start();
        mHandler = new Handler(mHandlerThread.getLooper());

        mWeatherUpdater = WeatherUpdater.getInstance(this);
        mWeatherUpdater = WeatherUpdater.getInstance(getApplicationContext());

        executePeriodicRequest();
    }