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

Commit ef367529 authored by Christian Mehlmauer's avatar Christian Mehlmauer
Browse files

Replaced raw string arguments for Context.getSystemService() with final Context variables

Change-Id: If5139a1526101292e5da557bfad3f4db80fb64a8
parent d6c19197
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -136,7 +136,7 @@ public class Dialog implements DialogInterface, Window.Callback,
    public Dialog(Context context, int theme) {
        mContext = new ContextThemeWrapper(
            context, theme == 0 ? com.android.internal.R.style.Theme_Dialog : theme);
        mWindowManager = (WindowManager)context.getSystemService("window");
        mWindowManager = (WindowManager)context.getSystemService(Context.WINDOW_SERVICE);
        Window w = PolicyManager.makeNewWindow(mContext);
        mWindow = w;
        w.setCallback(this);
+1 −1
Original line number Diff line number Diff line
@@ -123,7 +123,7 @@ public class MediaController extends FrameLayout {
    }

    private void initFloatingWindow() {
        mWindowManager = (WindowManager)mContext.getSystemService("window");
        mWindowManager = (WindowManager)mContext.getSystemService(Context.WINDOW_SERVICE);
        mWindow = PolicyManager.makeNewWindow(mContext);
        mWindow.setWindowManager(mWindowManager, null, null);
        mWindow.requestFeature(Window.FEATURE_NO_TITLE);
+3 −2
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import android.app.PendingIntent;
import android.widget.ArrayAdapter;
import android.view.View;
import android.widget.ListView;
import android.content.Context;
import android.content.ContentResolver;
import android.content.Intent;
import android.app.Notification;
@@ -60,7 +61,7 @@ public class NotificationTestList extends TestActivity
    private Test[] mTests = new Test[] {
        new Test("Off and sound") {
            public void run() {
                PowerManager pm = (PowerManager)NotificationTestList.this.getSystemService("power");
                PowerManager pm = (PowerManager)NotificationTestList.this.getSystemService(Context.POWER_SERVICE);
                PowerManager.WakeLock wl = 
                            pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "sound");
                wl.acquire();
@@ -549,7 +550,7 @@ public class NotificationTestList extends TestActivity
            public void run()
            {
                PowerManager.WakeLock wl
                        = ((PowerManager)NotificationTestList.this.getSystemService("power"))
                        = ((PowerManager)NotificationTestList.this.getSystemService(Context.POWER_SERVICE))
                            .newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "crasher");
                wl.acquire();
                mHandler.postDelayed(new Runnable() {