Loading policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java +11 −3 Original line number Diff line number Diff line Loading @@ -38,8 +38,11 @@ import android.content.res.Resources; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.PorterDuff; import android.graphics.Rect; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; import android.os.Looper; import android.os.Parcel; import android.os.Parcelable; Loading Loading @@ -325,9 +328,10 @@ public class KeyguardHostView extends KeyguardViewBase { return; } Drawable back = null; if (!background.isEmpty()) { try { setBackgroundColor(Integer.parseInt(background)); back = new ColorDrawable(Integer.parseInt(background)); } catch(NumberFormatException e) { Log.e(TAG, "Invalid background color " + background); } Loading @@ -336,11 +340,15 @@ public class KeyguardHostView extends KeyguardViewBase { Context settingsContext = getContext().createPackageContext("com.android.settings", 0); String wallpaperFile = settingsContext.getFilesDir() + "/lockwallpaper"; Bitmap backgroundBitmap = BitmapFactory.decodeFile(wallpaperFile); setBackgroundDrawable(new BitmapDrawable(backgroundBitmap)); back = new BitmapDrawable(getContext().getResources(), backgroundBitmap); } catch (NameNotFoundException e) { // Do nothing here } } if (back != null) { back.setColorFilter(BACKGROUND_COLOR, PorterDuff.Mode.MULTIPLY); setBackground(back); } } private boolean shouldEnableAddWidget() { Loading policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewBase.java +1 −1 Original line number Diff line number Diff line Loading @@ -45,7 +45,7 @@ import android.widget.FrameLayout; */ public abstract class KeyguardViewBase extends FrameLayout { private static final int BACKGROUND_COLOR = 0x70000000; protected static final int BACKGROUND_COLOR = 0x70000000; private AudioManager mAudioManager; private TelephonyManager mTelephonyManager = null; protected KeyguardViewMediator.ViewMediatorCallback mViewMediatorCallback; Loading Loading
policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java +11 −3 Original line number Diff line number Diff line Loading @@ -38,8 +38,11 @@ import android.content.res.Resources; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.PorterDuff; import android.graphics.Rect; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; import android.os.Looper; import android.os.Parcel; import android.os.Parcelable; Loading Loading @@ -325,9 +328,10 @@ public class KeyguardHostView extends KeyguardViewBase { return; } Drawable back = null; if (!background.isEmpty()) { try { setBackgroundColor(Integer.parseInt(background)); back = new ColorDrawable(Integer.parseInt(background)); } catch(NumberFormatException e) { Log.e(TAG, "Invalid background color " + background); } Loading @@ -336,11 +340,15 @@ public class KeyguardHostView extends KeyguardViewBase { Context settingsContext = getContext().createPackageContext("com.android.settings", 0); String wallpaperFile = settingsContext.getFilesDir() + "/lockwallpaper"; Bitmap backgroundBitmap = BitmapFactory.decodeFile(wallpaperFile); setBackgroundDrawable(new BitmapDrawable(backgroundBitmap)); back = new BitmapDrawable(getContext().getResources(), backgroundBitmap); } catch (NameNotFoundException e) { // Do nothing here } } if (back != null) { back.setColorFilter(BACKGROUND_COLOR, PorterDuff.Mode.MULTIPLY); setBackground(back); } } private boolean shouldEnableAddWidget() { Loading
policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewBase.java +1 −1 Original line number Diff line number Diff line Loading @@ -45,7 +45,7 @@ import android.widget.FrameLayout; */ public abstract class KeyguardViewBase extends FrameLayout { private static final int BACKGROUND_COLOR = 0x70000000; protected static final int BACKGROUND_COLOR = 0x70000000; private AudioManager mAudioManager; private TelephonyManager mTelephonyManager = null; protected KeyguardViewMediator.ViewMediatorCallback mViewMediatorCallback; Loading