Policy changes for lock screen on live wallpaper.

Change-Id: Ib875ef839b7727194461b13684b77bf38ad3c52e
This commit is contained in:
Dianne Hackborn
2009-09-18 01:55:39 -07:00
parent 871be31f54
commit abe0da0a79
4 changed files with 15 additions and 12 deletions

View File

@@ -101,6 +101,7 @@ public class KeyguardViewManager implements KeyguardWindowController {
final int stretch = ViewGroup.LayoutParams.FILL_PARENT;
int flags = WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN
| WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER
/*| WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN
| WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR*/ ;
if (!mNeedsInput) {
@@ -108,9 +109,9 @@ public class KeyguardViewManager implements KeyguardWindowController {
}
WindowManager.LayoutParams lp = new WindowManager.LayoutParams(
stretch, stretch, WindowManager.LayoutParams.TYPE_KEYGUARD,
flags, PixelFormat.OPAQUE);
flags, PixelFormat.TRANSLUCENT);
lp.softInputMode = WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN;
lp.windowAnimations = com.android.internal.R.style.Animation_LockScreen;
//lp.windowAnimations = com.android.internal.R.style.Animation_LockScreen;
lp.screenOrientation = ActivityInfo.SCREEN_ORIENTATION_NOSENSOR;
lp.setTitle("Keyguard");
mWindowLayoutParams = lp;

View File

@@ -285,9 +285,11 @@ public class LockPatternKeyguardView extends KeyguardViewBase {
setDescendantFocusability(FOCUS_AFTER_DESCENDANTS);
// wall paper background
final BitmapDrawable drawable = (BitmapDrawable) context.getWallpaper();
setBackgroundDrawable(
new FastBitmapDrawable(drawable.getBitmap()));
if (false) {
final BitmapDrawable drawable = (BitmapDrawable) context.getWallpaper();
setBackgroundDrawable(
new FastBitmapDrawable(drawable.getBitmap()));
}
// create both the lock and unlock screen so they are quickly available
// when the screen turns on

View File

@@ -650,6 +650,10 @@ public class PhoneWindowManager implements WindowManagerPolicy {
return 0;
}
public int getMaxWallpaperLayer() {
return STATUS_BAR_LAYER;
}
/** {@inheritDoc} */
public View addStartingWindow(IBinder appToken, String packageName,
int theme, CharSequence nonLocalizedLabel,

View File

@@ -20,7 +20,6 @@ import android.app.ActivityManager;
import android.app.Dialog;
import android.app.StatusBarManager;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
@@ -30,13 +29,10 @@ import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.TextView;
import java.util.List;
@@ -59,7 +55,7 @@ public class RecentApplicationsDialog extends Dialog implements OnClickListener
private int mIconSize;
public RecentApplicationsDialog(Context context) {
super(context);
super(context, com.android.internal.R.style.Theme_Dialog_RecentApplications);
final Resources resources = context.getResources();
mIconSize = (int) resources.getDimension(android.R.dimen.app_icon_size);
@@ -84,8 +80,8 @@ public class RecentApplicationsDialog extends Dialog implements OnClickListener
Window theWindow = getWindow();
theWindow.requestFeature(Window.FEATURE_NO_TITLE);
theWindow.setType(WindowManager.LayoutParams.TYPE_SYSTEM_DIALOG);
theWindow.setFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND,
WindowManager.LayoutParams.FLAG_BLUR_BEHIND);
theWindow.setFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND,
WindowManager.LayoutParams.FLAG_DIM_BEHIND);
theWindow.setFlags(WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM,
WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM);
theWindow.setTitle("Recents");