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

Commit 2ed99464 authored by Dianne Hackborn's avatar Dianne Hackborn
Browse files

Don't crash when the load average service is started.

Change-Id: Ie40f549d50942793c940f8728ce9c392c25f4c60
parent 8894cc5e
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -278,14 +278,14 @@ public class LoadAverageService extends Service {
            PixelFormat.TRANSLUCENT);
        params.gravity = Gravity.RIGHT | Gravity.TOP;
        params.setTitle("Load Average");
        WindowManagerImpl wm = (WindowManagerImpl)getSystemService(WINDOW_SERVICE);
        WindowManager wm = (WindowManager)getSystemService(WINDOW_SERVICE);
        wm.addView(mView, params);
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        ((WindowManagerImpl)getSystemService(WINDOW_SERVICE)).removeView(mView);
        ((WindowManager)getSystemService(WINDOW_SERVICE)).removeView(mView);
        mView = null;
    }