mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-03 09:26:51 +00:00
Merge "Using ApplicationContext in static objects" into ub-now-porkchop
This commit is contained in:
@@ -41,9 +41,9 @@ public abstract class AppWidgetManagerCompat {
|
||||
// TODO change this to use api version once L gets an API number.
|
||||
if (sInstance == null) {
|
||||
if (Utilities.isLmp()) {
|
||||
sInstance = new AppWidgetManagerCompatVL(context);
|
||||
sInstance = new AppWidgetManagerCompatVL(context.getApplicationContext());
|
||||
} else {
|
||||
sInstance = new AppWidgetManagerCompatV16(context);
|
||||
sInstance = new AppWidgetManagerCompatV16(context.getApplicationContext());
|
||||
}
|
||||
}
|
||||
return sInstance;
|
||||
|
||||
@@ -51,9 +51,9 @@ public abstract class LauncherAppsCompat {
|
||||
// STOPSHIP(kennyguy) change this to use api version once L gets an API number.
|
||||
if (sInstance == null) {
|
||||
if ("L".equals(Build.VERSION.CODENAME)) {
|
||||
sInstance = new LauncherAppsCompatVL(context);
|
||||
sInstance = new LauncherAppsCompatVL(context.getApplicationContext());
|
||||
} else {
|
||||
sInstance = new LauncherAppsCompatV16(context);
|
||||
sInstance = new LauncherAppsCompatV16(context.getApplicationContext());
|
||||
}
|
||||
}
|
||||
return sInstance;
|
||||
|
||||
@@ -22,19 +22,17 @@ import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.content.pm.ActivityInfo;
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.pm.PackageManager.NameNotFoundException;
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.content.pm.ResolveInfo;
|
||||
import android.graphics.Rect;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.UserHandle;
|
||||
import android.provider.Settings;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user