[REQ with Sources][Mod] Lockscreen Wallpaper Support for Pattern/Pin/Password

Search This thread

texten

Senior Member
Apr 4, 2012
1,309
1,506
hey dev's,
in kqb i can choose a lockscreen wallpaper in settings>display>wallpapers for the tab unlock, but this wallpaper is not visible on the background of pin/password/pattern view. is there a solution to fetch the wallpaper in the keyguards-xml's?

the header of keyguard_screen_unlock_portrait.xml looks like this

Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient android:gravity="center_horizontal" android:orientation="vertical" [COLOR="Red"]android:background="#70000000"[/COLOR] android:layout_width="fill_parent" android:layout_height="fill_parent"
  xmlns:android="http://schemas.android.com/apk/res/android">
    <RelativeLayout android:layout_width="fill_parent" android:layout_height="wrap_content">

i can only set colours?
I would, however, that the background is displayed which i choose in settings.
is there a solution for custom wallpaper support on all locks?

sorry for bad english ;) i hope you understand what i mean. thanks for anwser
 
Last edited:

texten

Senior Member
Apr 4, 2012
1,309
1,506
thanks for reply,
yeah, but i want to make the lockscreen wallpaper easyly changeable, because i'm trying to build an own rom ;)
i used google, i read a feld hundrets of threads, but nowhere i can find a solution for fetch the wallpaper which i setup in settings. everybody is asking and no one has a how-to. :(

i looked in the jkay-lockscreens codes, there is a implement of lockscreenwallpaper.smali in android.policy.jar. perherps someone can port this?!

Code:
.class Lcom/android/internal/policy/impl/LockscreenWallpaper;
.super Landroid/widget/FrameLayout;
.source "LockscreenWallpaper.java"


# instance fields
.field private final TAG:Ljava/lang/String;

.field private final WALLPAPER_IMAGE_PATH:Ljava/lang/String;

.field bitmapWallpaper:Landroid/graphics/Bitmap;

.field private mLockScreenWallpaperImage:Landroid/widget/ImageView;


# direct methods
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .registers 4
    .parameter "context"
    .parameter "attrs"

    .prologue
    .line 26
    invoke-direct {p0, p1}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;)V

    .line 17
    const-string v0, "LockscreenWallpaperUpdater"

    iput-object v0, p0, Lcom/android/internal/policy/impl/LockscreenWallpaper;->TAG:Ljava/lang/String;

    .line 19
    const-string v0, "/data/data/com.aokp.romcontrol/files/lockscreen_wallpaper.jpg"

    iput-object v0, p0, Lcom/android/internal/policy/impl/LockscreenWallpaper;->WALLPAPER_IMAGE_PATH:Ljava/lang/String;

    .line 28
    invoke-virtual {p0}, Lcom/android/internal/policy/impl/LockscreenWallpaper;->setLockScreenWallpaper()V

    .line 29
    return-void
.end method


# virtual methods
.method protected onDetachedFromWindow()V
    .registers 2

    .prologue
    .line 48
    iget-object v0, p0, Lcom/android/internal/policy/impl/LockscreenWallpaper;->bitmapWallpaper:Landroid/graphics/Bitmap;

    if-eqz v0, :cond_9

    .line 49
    iget-object v0, p0, Lcom/android/internal/policy/impl/LockscreenWallpaper;->bitmapWallpaper:Landroid/graphics/Bitmap;

    invoke-virtual {v0}, Landroid/graphics/Bitmap;->recycle()V

    .line 51
    :cond_9
    invoke-static {}, Ljava/lang/System;->gc()V

    .line 52
    invoke-super {p0}, Landroid/widget/FrameLayout;->onDetachedFromWindow()V

    .line 53
    return-void
.end method

.method public setLockScreenWallpaper()V
    .registers 6

    .prologue
    const/4 v4, -0x1

    .line 32
    new-instance v1, Ljava/io/File;

    const-string v2, "/data/data/com.aokp.romcontrol/files/lockscreen_wallpaper.jpg"

    invoke-direct {v1, v2}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 34
    .local v1, file:Ljava/io/File;
    invoke-virtual {v1}, Ljava/io/File;->exists()Z

    move-result v2

    if-eqz v2, :cond_3e

    .line 35
    new-instance v2, Landroid/widget/ImageView;

    invoke-virtual {p0}, Lcom/android/internal/policy/impl/LockscreenWallpaper;->getContext()Landroid/content/Context;

    move-result-object v3

    invoke-direct {v2, v3}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V

    iput-object v2, p0, Lcom/android/internal/policy/impl/LockscreenWallpaper;->mLockScreenWallpaperImage:Landroid/widget/ImageView;

    .line 36
    iget-object v2, p0, Lcom/android/internal/policy/impl/LockscreenWallpaper;->mLockScreenWallpaperImage:Landroid/widget/ImageView;

    sget-object v3, Landroid/widget/ImageView$ScaleType;->CENTER_CROP:Landroid/widget/ImageView$ScaleType;

    invoke-virtual {v2, v3}, Landroid/widget/ImageView;->setScaleType(Landroid/widget/ImageView$ScaleType;)V

    .line 37
    iget-object v2, p0, Lcom/android/internal/policy/impl/LockscreenWallpaper;->mLockScreenWallpaperImage:Landroid/widget/ImageView;

    invoke-virtual {p0, v2, v4, v4}, Lcom/android/internal/policy/impl/LockscreenWallpaper;->addView(Landroid/view/View;II)V

    .line 38
    const-string v2, "/data/data/com.aokp.romcontrol/files/lockscreen_wallpaper.jpg"

    invoke-static {v2}, Landroid/graphics/BitmapFactory;->decodeFile(Ljava/lang/String;)Landroid/graphics/Bitmap;

    move-result-object v2

    iput-object v2, p0, Lcom/android/internal/policy/impl/LockscreenWallpaper;->bitmapWallpaper:Landroid/graphics/Bitmap;

    .line 39
    new-instance v0, Landroid/graphics/drawable/BitmapDrawable;

    invoke-virtual {p0}, Lcom/android/internal/policy/impl/LockscreenWallpaper;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    iget-object v3, p0, Lcom/android/internal/policy/impl/LockscreenWallpaper;->bitmapWallpaper:Landroid/graphics/Bitmap;

    invoke-direct {v0, v2, v3}, Landroid/graphics/drawable/BitmapDrawable;-><init>(Landroid/content/res/Resources;Landroid/graphics/Bitmap;)V

    .line 40
    .local v0, d:Landroid/graphics/drawable/Drawable;
    iget-object v2, p0, Lcom/android/internal/policy/impl/LockscreenWallpaper;->mLockScreenWallpaperImage:Landroid/widget/ImageView;

    invoke-virtual {v2, v0}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 44
    .end local v0           #d:Landroid/graphics/drawable/Drawable;
    :goto_3d
    return-void

    .line 42
    :cond_3e
    invoke-virtual {p0}, Lcom/android/internal/policy/impl/LockscreenWallpaper;->removeAllViews()V

    goto :goto_3d
.end method
 
Last edited:

broodplank1337

Inactive Recognized Developer
Nov 24, 2011
4,992
10,155
Nijmegen
www.broodplank.net
thanks for reply,
yeah, but i want to make the lockscreen wallpaper easyly changeable, because i'm trying to build an own rom ;)
i used google, i read a feld hundrets of threads, but nowhere i can find a solution for fetch the wallpaper which i setup in settings. everybody is asking and no one has a how-to. :(

i looked in the jkay-lockscreens codes, there is a implement of lockscreenwallpaper.smali in android.policy.jar. perherps someone can port this?!

Code:
.class Lcom/android/internal/policy/impl/LockscreenWallpaper;
.super Landroid/widget/FrameLayout;
.source "LockscreenWallpaper.java"


# instance fields
.field private final TAG:Ljava/lang/String;

.field private final WALLPAPER_IMAGE_PATH:Ljava/lang/String;

.field bitmapWallpaper:Landroid/graphics/Bitmap;

.field private mLockScreenWallpaperImage:Landroid/widget/ImageView;


# direct methods
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .registers 4
    .parameter "context"
    .parameter "attrs"

    .prologue
    .line 26
    invoke-direct {p0, p1}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;)V

    .line 17
    const-string v0, "LockscreenWallpaperUpdater"

    iput-object v0, p0, Lcom/android/internal/policy/impl/LockscreenWallpaper;->TAG:Ljava/lang/String;

    .line 19
    const-string v0, "/data/data/com.aokp.romcontrol/files/lockscreen_wallpaper.jpg"

    iput-object v0, p0, Lcom/android/internal/policy/impl/LockscreenWallpaper;->WALLPAPER_IMAGE_PATH:Ljava/lang/String;

    .line 28
    invoke-virtual {p0}, Lcom/android/internal/policy/impl/LockscreenWallpaper;->setLockScreenWallpaper()V

    .line 29
    return-void
.end method


# virtual methods
.method protected onDetachedFromWindow()V
    .registers 2

    .prologue
    .line 48
    iget-object v0, p0, Lcom/android/internal/policy/impl/LockscreenWallpaper;->bitmapWallpaper:Landroid/graphics/Bitmap;

    if-eqz v0, :cond_9

    .line 49
    iget-object v0, p0, Lcom/android/internal/policy/impl/LockscreenWallpaper;->bitmapWallpaper:Landroid/graphics/Bitmap;

    invoke-virtual {v0}, Landroid/graphics/Bitmap;->recycle()V

    .line 51
    :cond_9
    invoke-static {}, Ljava/lang/System;->gc()V

    .line 52
    invoke-super {p0}, Landroid/widget/FrameLayout;->onDetachedFromWindow()V

    .line 53
    return-void
.end method

.method public setLockScreenWallpaper()V
    .registers 6

    .prologue
    const/4 v4, -0x1

    .line 32
    new-instance v1, Ljava/io/File;

    const-string v2, "/data/data/com.aokp.romcontrol/files/lockscreen_wallpaper.jpg"

    invoke-direct {v1, v2}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 34
    .local v1, file:Ljava/io/File;
    invoke-virtual {v1}, Ljava/io/File;->exists()Z

    move-result v2

    if-eqz v2, :cond_3e

    .line 35
    new-instance v2, Landroid/widget/ImageView;

    invoke-virtual {p0}, Lcom/android/internal/policy/impl/LockscreenWallpaper;->getContext()Landroid/content/Context;

    move-result-object v3

    invoke-direct {v2, v3}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V

    iput-object v2, p0, Lcom/android/internal/policy/impl/LockscreenWallpaper;->mLockScreenWallpaperImage:Landroid/widget/ImageView;

    .line 36
    iget-object v2, p0, Lcom/android/internal/policy/impl/LockscreenWallpaper;->mLockScreenWallpaperImage:Landroid/widget/ImageView;

    sget-object v3, Landroid/widget/ImageView$ScaleType;->CENTER_CROP:Landroid/widget/ImageView$ScaleType;

    invoke-virtual {v2, v3}, Landroid/widget/ImageView;->setScaleType(Landroid/widget/ImageView$ScaleType;)V

    .line 37
    iget-object v2, p0, Lcom/android/internal/policy/impl/LockscreenWallpaper;->mLockScreenWallpaperImage:Landroid/widget/ImageView;

    invoke-virtual {p0, v2, v4, v4}, Lcom/android/internal/policy/impl/LockscreenWallpaper;->addView(Landroid/view/View;II)V

    .line 38
    const-string v2, "/data/data/com.aokp.romcontrol/files/lockscreen_wallpaper.jpg"

    invoke-static {v2}, Landroid/graphics/BitmapFactory;->decodeFile(Ljava/lang/String;)Landroid/graphics/Bitmap;

    move-result-object v2

    iput-object v2, p0, Lcom/android/internal/policy/impl/LockscreenWallpaper;->bitmapWallpaper:Landroid/graphics/Bitmap;

    .line 39
    new-instance v0, Landroid/graphics/drawable/BitmapDrawable;

    invoke-virtual {p0}, Lcom/android/internal/policy/impl/LockscreenWallpaper;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    iget-object v3, p0, Lcom/android/internal/policy/impl/LockscreenWallpaper;->bitmapWallpaper:Landroid/graphics/Bitmap;

    invoke-direct {v0, v2, v3}, Landroid/graphics/drawable/BitmapDrawable;-><init>(Landroid/content/res/Resources;Landroid/graphics/Bitmap;)V

    .line 40
    .local v0, d:Landroid/graphics/drawable/Drawable;
    iget-object v2, p0, Lcom/android/internal/policy/impl/LockscreenWallpaper;->mLockScreenWallpaperImage:Landroid/widget/ImageView;

    invoke-virtual {v2, v0}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 44
    .end local v0           #d:Landroid/graphics/drawable/Drawable;
    :goto_3d
    return-void

    .line 42
    :cond_3e
    invoke-virtual {p0}, Lcom/android/internal/policy/impl/LockscreenWallpaper;->removeAllViews()V

    goto :goto_3d
.end method

just copy the file from that android.policy.jar to your android.policy.jar thats all
 
  • Like
Reactions: texten

texten

Senior Member
Apr 4, 2012
1,309
1,506
so the lockscreenwallpaper.smali must not customize for kqb?

ok,than i have troubles with building the sourcecode for keyguard_screen_unlock_portrait.xml

i tried so many ways, but cant make it usefull. help please. here are the uncostumized codes

KQB Stock keyguard_screen_unlock_portrait.xml:

Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient android:gravity="center_horizontal" android:orientation="vertical" android:background="#70000000" android:layout_width="fill_parent" android:layout_height="fill_parent"
  xmlns:android="http://schemas.android.com/apk/res/android">
    <RelativeLayout android:layout_width="fill_parent" android:layout_height="wrap_content">
        <TextView android:textAppearance="?textAppearanceMedium" android:ellipsize="marquee" android:gravity="bottom|right|center" android:id="@id/carrier" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="6.0dip" android:layout_marginRight="8.0dip" android:singleLine="true" android:layout_toRightOf="@id/time" android:layout_alignParentTop="true" android:layout_alignParentRight="true" />
        <com.android.internal.widget.DigitalClock android:id="@id/time" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="20.0dip" android:layout_marginTop="15.0dip" android:layout_alignParentLeft="true" android:layout_alignParentTop="true">
            <TextView android:textAppearance="?textAppearanceMedium" android:textSize="56.0sp" android:ellipsize="none" android:gravity="bottom" android:id="@id/timeDisplay" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="6.0dip" android:singleLine="true" android:shadowColor="#c0000000" android:shadowDx="0.0" android:shadowDy="0.0" android:shadowRadius="3.0" />
            <TextView android:textAppearance="?textAppearanceMedium" android:textSize="18.0sp" android:ellipsize="none" android:gravity="bottom" android:id="@id/am_pm" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_marginLeft="4.0dip" android:singleLine="true" android:shadowColor="#c0000000" android:shadowDx="0.0" android:shadowDy="0.0" android:shadowRadius="3.0" />
        </com.android.internal.widget.DigitalClock>
        <TextView android:textAppearance="?textAppearanceMedium" android:id="@id/date" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="24.0dip" android:layout_below="@id/time" />
    </RelativeLayout>
    <View android:id="@id/divider" android:background="@drawable/divider_horizontal_dark" android:layout_width="fill_parent" android:layout_height="1.0dip" android:layout_marginTop="8.0dip" android:layout_marginBottom="8.0dip" />
    <LinearLayout android:gravity="left" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginLeft="12.0dip" android:layout_marginTop="0.0dip">
        <TextView android:textAppearance="?textAppearanceMedium" android:textSize="18.0sp" android:id="@id/status1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="8.0dip" android:drawablePadding="4.0dip" />
        <TextView android:textAppearance="?textAppearanceMedium" android:textSize="18.0sp" android:id="@id/statusSep" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="5.0dip" android:layout_marginRight="5.0dip" />
        <TextView android:textAppearance="?textAppearanceMedium" android:textSize="18.0sp" android:id="@id/status2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="8.0dip" android:drawablePadding="4.0dip" android:layout_alignParentTop="true" />
    </LinearLayout>
    <com.android.internal.widget.LockPatternView android:id="@id/lockPattern" android:layout_width="fill_parent" android:layout_height="0.0dip" android:layout_marginTop="2.0dip" android:layout_weight="1.0" android:aspect="@string/lock_pattern_view_aspect" />
    <FrameLayout android:layout_width="fill_parent" android:layout_height="wrap_content">
        <RelativeLayout android:id="@id/footerNormal" android:layout_width="fill_parent" android:layout_height="fill_parent">
            <Button android:id="@id/emergencyCallAlone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/lockscreen_emergency_call" android:drawableLeft="@drawable/ic_emergency" android:drawablePadding="8.0dip" android:layout_centerInParent="true" style="@style/Widget.Button.Transparent" />
        </RelativeLayout>
        <LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/footerForgotPattern" android:layout_width="fill_parent" android:layout_height="fill_parent">
            <Button android:id="@id/emergencyCallTogether" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_marginLeft="4.0dip" android:layout_marginTop="4.0dip" android:layout_marginRight="2.0dip" android:layout_marginBottom="4.0dip" android:text="@string/lockscreen_emergency_call" android:drawableLeft="@drawable/ic_emergency" android:drawablePadding="8.0dip" android:layout_weight="1.0" style="@style/Widget.Button.Transparent" />
            <Button android:id="@id/forgotPattern" android:visibility="invisible" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_marginLeft="2.0dip" android:layout_marginTop="4.0dip" android:layout_marginRight="4.0dip" android:layout_marginBottom="4.0dip" android:layout_weight="1.0" style="@style/Widget.Button.Transparent" />
        </LinearLayout>
    </FrameLayout>
</com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient>


big thanks for your help.

it would be nice, we can make it possible :)
 
Last edited:

texten

Senior Member
Apr 4, 2012
1,309
1,506
and now i have found a source of jkays keyguard_screen_unlock_portrait.xml

with the implement:

Code:
[COLOR="Red"]    <com.android.internal.policy.impl.LockscreenWallpaper 
android:id="@id/lockscreen_wallpaper" android:layout_width="fill_parent" 
android:layout_height="fill_parent" />[/COLOR]

Code:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout android:gravity="center_horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent"
  xmlns:android="http://schemas.android.com/apk/res/android">
    <com.android.internal.policy.impl.LockscreenWallpaper android:id="@id/lockscreen_wallpaper" android:layout_width="fill_parent" android:layout_height="fill_parent" />
    <GridLayout android:gravity="center_horizontal" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"
      xmlns:android="http://schemas.android.com/apk/res/android">
        <com.android.internal.widget.DigitalClock android:layout_gravity="right" android:id="@id/time" android:layout_marginTop="@dimen/keyguard_lockscreen_status_line_clockfont_top_margin" android:layout_marginRight="@dimen/keyguard_lockscreen_status_line_font_right_margin" android:layout_marginBottom="@dimen/keyguard_lockscreen_status_line_clockfont_bottom_margin">
            <TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_clock_font_size" android:textColor="@color/lockscreen_clock_background" android:ellipsize="none" android:id="@id/timeDisplayBackground" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" />
            <TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_clock_font_size" android:textColor="@color/lockscreen_clock_foreground" android:ellipsize="none" android:id="@id/timeDisplayForeground" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" />
        </com.android.internal.widget.DigitalClock>
        <LinearLayout android:layout_gravity="right" android:orientation="horizontal" android:layout_marginRight="@dimen/keyguard_lockscreen_status_line_font_right_margin">
            <TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_status_line_font_size" android:ellipsize="marquee" android:id="@id/date" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" />
            <TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_status_line_font_size" android:ellipsize="marquee" android:id="@id/alarm_status" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="16.0dip" android:singleLine="true" android:drawablePadding="4.0dip" />
        </LinearLayout>
        <com.android.internal.policy.impl.WeatherText android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_status_line_font_size" android:ellipsize="end" android:gravity="right" android:layout_gravity="fill_horizontal" android:id="@id/weather" android:layout_marginRight="@dimen/keyguard_lockscreen_status_line_font_right_margin" android:singleLine="true" android:drawablePadding="4.0dip" />
        <ViewFlipper android:layout_gravity="right" android:id="@id/calendar" android:layout_marginRight="@dimen/keyguard_lockscreen_status_line_font_right_margin" android:drawablePadding="4.0dip" android:inAnimation="@anim/calendar_fadein" android:outAnimation="@anim/calendar_fadeout" />
        <TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_status_line_font_size" android:ellipsize="marquee" android:layout_gravity="right" android:id="@id/status1" android:layout_marginRight="@dimen/keyguard_lockscreen_status_line_font_right_margin" android:singleLine="true" android:drawablePadding="4.0dip" />
        <Space android:layout_gravity="fill" />
        <com.android.internal.widget.LockPatternView android:layout_gravity="center_horizontal" android:id="@id/lockPattern" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginLeft="8.0dip" android:layout_marginRight="8.0dip" android:layout_marginBottom="4.0dip" />
        <TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_status_line_font_size" android:ellipsize="marquee" android:layout_gravity="center_horizontal" android:id="@id/carrier" android:singleLine="true" />
        <LinearLayout android:gravity="center" android:orientation="horizontal" android:layout_width="fill_parent" android:weightSum="2.0" style="?android:attr/buttonBarStyle">
            <Button android:textSize="@dimen/keyguard_lockscreen_status_line_font_size" android:layout_gravity="center_horizontal" android:id="@id/emergencyCallButton" android:layout_width="0.0dip" android:layout_height="wrap_content" android:text="@string/lockscreen_emergency_call" android:drawableLeft="@drawable/lockscreen_emergency_button" android:drawablePadding="0.0dip" android:layout_weight="1.0" style="?android:attr/buttonBarButtonStyle" />
            <Button android:textSize="@dimen/keyguard_lockscreen_status_line_font_size" android:layout_gravity="center_horizontal" android:id="@id/forgotPatternButton" android:layout_width="0.0dip" android:layout_height="wrap_content" android:text="@string/lockscreen_forgot_pattern_button_text" android:drawableLeft="@drawable/lockscreen_forgot_password_button" android:drawablePadding="0.0dip" android:layout_weight="1.0" style="?android:attr/buttonBarButtonStyle" />
        </LinearLayout>
        <include android:layout_gravity="fill" android:id="@id/transport" android:layout_width="0.0dip" android:layout_height="0.0dip" android:layout_column="0" android:layout_row="0" android:layout_rowSpan="6" android:layout_columnSpan="1" layout="@layout/keyguard_transport_control" />
        <TextView android:layout_gravity="fill" android:id="@id/faceLockAreaView" android:background="@color/facelock_color_background" android:visibility="invisible" android:layout_width="0.0dip" android:layout_height="0.0dip" android:layout_marginTop="8.0dip" android:layout_marginBottom="8.0dip" android:layout_column="0" android:layout_row="6" android:layout_rowSpan="1" android:layout_columnSpan="1" />
    </GridLayout>
</RelativeLayout>

is someone there who can make it working in kqb?

edit: found it in an aosp-rom, seems its not jkay ;)
 
Last edited:

broodplank1337

Inactive Recognized Developer
Nov 24, 2011
4,992
10,155
Nijmegen
www.broodplank.net
and now i have found a source of jkays keyguard_screen_unlock_portrait.xml

with the implement:

Code:
[COLOR="Red"]    <com.android.internal.policy.impl.LockscreenWallpaper 
android:id="@id/lockscreen_wallpaper" android:layout_width="fill_parent" 
android:layout_height="fill_parent" />[/COLOR]

Code:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout android:gravity="center_horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent"
  xmlns:android="http://schemas.android.com/apk/res/android">
    <com.android.internal.policy.impl.LockscreenWallpaper android:id="@id/lockscreen_wallpaper" android:layout_width="fill_parent" android:layout_height="fill_parent" />
    <GridLayout android:gravity="center_horizontal" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"
      xmlns:android="http://schemas.android.com/apk/res/android">
        <com.android.internal.widget.DigitalClock android:layout_gravity="right" android:id="@id/time" android:layout_marginTop="@dimen/keyguard_lockscreen_status_line_clockfont_top_margin" android:layout_marginRight="@dimen/keyguard_lockscreen_status_line_font_right_margin" android:layout_marginBottom="@dimen/keyguard_lockscreen_status_line_clockfont_bottom_margin">
            <TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_clock_font_size" android:textColor="@color/lockscreen_clock_background" android:ellipsize="none" android:id="@id/timeDisplayBackground" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" />
            <TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_clock_font_size" android:textColor="@color/lockscreen_clock_foreground" android:ellipsize="none" android:id="@id/timeDisplayForeground" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" />
        </com.android.internal.widget.DigitalClock>
        <LinearLayout android:layout_gravity="right" android:orientation="horizontal" android:layout_marginRight="@dimen/keyguard_lockscreen_status_line_font_right_margin">
            <TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_status_line_font_size" android:ellipsize="marquee" android:id="@id/date" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" />
            <TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_status_line_font_size" android:ellipsize="marquee" android:id="@id/alarm_status" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="16.0dip" android:singleLine="true" android:drawablePadding="4.0dip" />
        </LinearLayout>
        <com.android.internal.policy.impl.WeatherText android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_status_line_font_size" android:ellipsize="end" android:gravity="right" android:layout_gravity="fill_horizontal" android:id="@id/weather" android:layout_marginRight="@dimen/keyguard_lockscreen_status_line_font_right_margin" android:singleLine="true" android:drawablePadding="4.0dip" />
        <ViewFlipper android:layout_gravity="right" android:id="@id/calendar" android:layout_marginRight="@dimen/keyguard_lockscreen_status_line_font_right_margin" android:drawablePadding="4.0dip" android:inAnimation="@anim/calendar_fadein" android:outAnimation="@anim/calendar_fadeout" />
        <TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_status_line_font_size" android:ellipsize="marquee" android:layout_gravity="right" android:id="@id/status1" android:layout_marginRight="@dimen/keyguard_lockscreen_status_line_font_right_margin" android:singleLine="true" android:drawablePadding="4.0dip" />
        <Space android:layout_gravity="fill" />
        <com.android.internal.widget.LockPatternView android:layout_gravity="center_horizontal" android:id="@id/lockPattern" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginLeft="8.0dip" android:layout_marginRight="8.0dip" android:layout_marginBottom="4.0dip" />
        <TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_status_line_font_size" android:ellipsize="marquee" android:layout_gravity="center_horizontal" android:id="@id/carrier" android:singleLine="true" />
        <LinearLayout android:gravity="center" android:orientation="horizontal" android:layout_width="fill_parent" android:weightSum="2.0" style="?android:attr/buttonBarStyle">
            <Button android:textSize="@dimen/keyguard_lockscreen_status_line_font_size" android:layout_gravity="center_horizontal" android:id="@id/emergencyCallButton" android:layout_width="0.0dip" android:layout_height="wrap_content" android:text="@string/lockscreen_emergency_call" android:drawableLeft="@drawable/lockscreen_emergency_button" android:drawablePadding="0.0dip" android:layout_weight="1.0" style="?android:attr/buttonBarButtonStyle" />
            <Button android:textSize="@dimen/keyguard_lockscreen_status_line_font_size" android:layout_gravity="center_horizontal" android:id="@id/forgotPatternButton" android:layout_width="0.0dip" android:layout_height="wrap_content" android:text="@string/lockscreen_forgot_pattern_button_text" android:drawableLeft="@drawable/lockscreen_forgot_password_button" android:drawablePadding="0.0dip" android:layout_weight="1.0" style="?android:attr/buttonBarButtonStyle" />
        </LinearLayout>
        <include android:layout_gravity="fill" android:id="@id/transport" android:layout_width="0.0dip" android:layout_height="0.0dip" android:layout_column="0" android:layout_row="0" android:layout_rowSpan="6" android:layout_columnSpan="1" layout="@layout/keyguard_transport_control" />
        <TextView android:layout_gravity="fill" android:id="@id/faceLockAreaView" android:background="@color/facelock_color_background" android:visibility="invisible" android:layout_width="0.0dip" android:layout_height="0.0dip" android:layout_marginTop="8.0dip" android:layout_marginBottom="8.0dip" android:layout_column="0" android:layout_row="6" android:layout_rowSpan="1" android:layout_columnSpan="1" />
    </GridLayout>
</RelativeLayout>

is someone there who can make it working in kqb?

edit: found it in an aosp-rom, seems its not jkay ;)


Do it like this, in the file "keyguard_screen_unlock_portrait.xml" you have to examine each line and look for the values starting with a "@", these lines need to be present in the files in /values/, so if the things are missing just add them from the aosp rom,

for example:
looking at the android:id="@id/lockscreen_wallpaper" part, this means you will need to have the "lockscreen_wallpaper" id inside /values/ids.xml, if the id doesn't exist in that file you simply need to copy it from aosp rom. do that process for all custom variables/ids/colors/dimens, etc

Also when compiling just look at the log, it will say where the error is present, (you use apk manager?)
 
  • Like
Reactions: texten

texten

Senior Member
Apr 4, 2012
1,309
1,506
thanks, i will try it later, must go to bed.
will report if it's work.

yes i am using apk manager.
i'm no noob, just a beginner in xml and java ;)

perherps you can try it for your broodrom?!
for now,thank you very much.
 
Last edited:

texten

Senior Member
Apr 4, 2012
1,309
1,506
ok, cant sleep before given it a try.
but nothing happens:

included the lockscreen_wallpaper id in values/ids.xml
packed the lockscreenwallpaper.smali in android.policy.jar

and included the implementcode.

but i think, my xml-knowledge is not good enough, i have just good html/css knowledge :(

here is my new code:

red color for changes on stock kqb keyguard_screen_unlock_portrait.xml

Code:
<?xml version="1.0" encoding="utf-8"?>
[COLOR="Red"]<RelativeLayout android:gravity="center_horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent"
  xmlns:android="http://schemas.android.com/apk/res/android">
    <com.android.internal.policy.impl.LockscreenWallpaper android:id="@id/lockscreen_wallpaper" android:layout_width="fill_parent" android:layout_height="fill_parent" />[/COLOR]
<com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient android:gravity="center_horizontal" android:orientation="vertical" android:background="#70000000" android:layout_width="fill_parent" android:layout_height="fill_parent"
  xmlns:android="http://schemas.android.com/apk/res/android">
    <RelativeLayout android:layout_width="fill_parent" android:layout_height="wrap_content">
        <TextView android:textAppearance="?textAppearanceMedium" android:ellipsize="marquee" android:gravity="bottom|right|center" android:id="@id/carrier" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="6.0dip" android:layout_marginRight="8.0dip" android:singleLine="true" android:layout_toRightOf="@id/time" android:layout_alignParentTop="true" android:layout_alignParentRight="true" />
        <com.android.internal.widget.DigitalClock android:id="@id/time" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="20.0dip" android:layout_marginTop="15.0dip" android:layout_alignParentLeft="true" android:layout_alignParentTop="true">
            <TextView android:textAppearance="?textAppearanceMedium" android:textSize="56.0sp" android:ellipsize="none" android:gravity="bottom" android:id="@id/timeDisplay" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="6.0dip" android:singleLine="true" android:shadowColor="#c0000000" android:shadowDx="0.0" android:shadowDy="0.0" android:shadowRadius="3.0" />
            <TextView android:textAppearance="?textAppearanceMedium" android:textSize="18.0sp" android:ellipsize="none" android:gravity="bottom" android:id="@id/am_pm" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_marginLeft="4.0dip" android:singleLine="true" android:shadowColor="#c0000000" android:shadowDx="0.0" android:shadowDy="0.0" android:shadowRadius="3.0" />
        </com.android.internal.widget.DigitalClock>
        <TextView android:textAppearance="?textAppearanceMedium" android:id="@id/date" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="24.0dip" android:layout_below="@id/time" />
    </RelativeLayout>
    <View android:id="@id/divider" android:background="@drawable/divider_horizontal_dark" android:layout_width="fill_parent" android:layout_height="1.0dip" android:layout_marginTop="8.0dip" android:layout_marginBottom="8.0dip" />
    <LinearLayout android:gravity="left" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginLeft="12.0dip" android:layout_marginTop="0.0dip">
        <TextView android:textAppearance="?textAppearanceMedium" android:textSize="18.0sp" android:id="@id/status1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="8.0dip" android:drawablePadding="4.0dip" />
        <TextView android:textAppearance="?textAppearanceMedium" android:textSize="18.0sp" android:id="@id/statusSep" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="5.0dip" android:layout_marginRight="5.0dip" />
        <TextView android:textAppearance="?textAppearanceMedium" android:textSize="18.0sp" android:id="@id/status2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="8.0dip" android:drawablePadding="4.0dip" android:layout_alignParentTop="true" />
    </LinearLayout>
    <com.android.internal.widget.LockPatternView android:id="@id/lockPattern" android:layout_width="fill_parent" android:layout_height="0.0dip" android:layout_marginTop="2.0dip" android:layout_weight="1.0" android:aspect="@string/lock_pattern_view_aspect" />
    <FrameLayout android:layout_width="fill_parent" android:layout_height="wrap_content">
        <RelativeLayout android:id="@id/footerNormal" android:layout_width="fill_parent" android:layout_height="fill_parent">
            <Button android:id="@id/emergencyCallAlone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/lockscreen_emergency_call" android:drawableLeft="@drawable/ic_emergency" android:drawablePadding="8.0dip" android:layout_centerInParent="true" style="@style/Widget.Button.Transparent" />
        </RelativeLayout>
        <LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/footerForgotPattern" android:layout_width="fill_parent" android:layout_height="fill_parent">
            <Button android:id="@id/emergencyCallTogether" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_marginLeft="4.0dip" android:layout_marginTop="4.0dip" android:layout_marginRight="2.0dip" android:layout_marginBottom="4.0dip" android:text="@string/lockscreen_emergency_call" android:drawableLeft="@drawable/ic_emergency" android:drawablePadding="8.0dip" android:layout_weight="1.0" style="@style/Widget.Button.Transparent" />
            <Button android:id="@id/forgotPattern" android:visibility="invisible" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_marginLeft="2.0dip" android:layout_marginTop="4.0dip" android:layout_marginRight="4.0dip" android:layout_marginBottom="4.0dip" android:layout_weight="1.0" style="@style/Widget.Button.Transparent" />
        </LinearLayout>
    </FrameLayout>
</com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient>
[COLOR="Red"]</RelativeLayout>[/COLOR]
 

texten

Senior Member
Apr 4, 2012
1,309
1,506
i my mind the puzzle-lockscreen supports lockscreen-wallpaper too, the code of kqb stock zzz_keyguard_screen_puzzle_lock.xml

Code:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout android:id="@id/root" android:layout_width="fill_parent" android:layout_height="fill_parent"
  xmlns:android="http://schemas.android.com/apk/res/android">
    [COLOR="Red"]<ImageView android:id="@id/zzz_lockscreen_wallpaper01" android:layout_width="fill_parent" android:layout_height="fill_parent" />[/COLOR]
    <RelativeLayout android:id="@id/zzz_background01" android:background="@drawable/zzz_unlock_puzzle_bg" android:layout_width="fill_parent" android:layout_height="fill_parent"
      xmlns:android="http://schemas.android.com/apk/res/android">
        <RelativeLayout android:id="@id/zzz_puzzlelockfullbg" android:background="@drawable/zzz_unlock_blackbg" android:layout_width="fill_parent" android:layout_height="fill_parent">
            <TextView android:textSize="18.669983dip" android:typeface="sans" android:textColor="#ffffffff" android:gravity="right" android:id="@id/carrier" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="10.669983dip" android:layout_marginBottom="475.32812dip" android:singleLine="true" android:shadowColor="#ff000000" android:shadowDx="1.0" android:shadowDy="1.0" android:layout_alignParentRight="true" android:layout_alignParentBottom="true" />
            <RelativeLayout android:id="@id/zzz_sweepglass" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginBottom="80.0dip" android:layout_alignParentBottom="true">
                <ImageView android:id="@id/zzz_sweepglasseffect" android:layout_width="wrap_content" android:layout_height="wrap_content" />
                <TextView android:textSize="20.0dip" android:typeface="sans" android:textColor="#ffffffff" android:ellipsize="marquee" android:id="@id/zzz_sweepglasstext02" android:paddingLeft="6.0dip" android:paddingRight="6.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="3.0dip" android:singleLine="true" android:shadowColor="#ff000000" android:shadowDx="1.0" android:shadowDy="1.0" android:layout_centerHorizontal="true" android:marqueeRepeatLimit="marquee_forever" />
            </RelativeLayout>
        </RelativeLayout>
        <LinearLayout android:id="@id/zzz_puzzlenoticalllayout" android:background="@drawable/zzz_unlock_puzzle_noti_icon_call" android:layout_width="113.32999dip" android:layout_height="88.0dip" android:layout_marginLeft="16.0dip" android:layout_marginTop="166.0dip">
            <TextView android:typeface="sans" android:textColor="#ffffffff" android:id="@id/zzz_puzzlenoticalltext" android:layout_width="28.0dip" android:layout_height="wrap_content" android:layout_marginLeft="60.0dip" android:layout_marginTop="17.0dip" android:shadowColor="#ff000000" android:shadowDx="1.0" android:shadowDy="1.0" />
        </LinearLayout>
        <LinearLayout android:id="@id/zzz_puzzlenotimaillayout" android:background="@drawable/zzz_unlock_puzzle_noti_icon_mail" android:layout_width="113.32999dip" android:layout_height="88.0dip" android:layout_marginLeft="16.0dip" android:layout_marginTop="270.66406dip">
            <TextView android:typeface="sans" android:textColor="#ffffffff" android:id="@id/zzz_puzzlenotimailtext" android:layout_width="28.0dip" android:layout_height="wrap_content" android:layout_marginLeft="60.0dip" android:layout_marginTop="17.0dip" android:shadowColor="#ff000000" android:shadowDx="1.0" android:shadowDy="1.0" />
        </LinearLayout>
        <LinearLayout android:id="@id/zzz_puzzlematchlayout" android:visibility="invisible" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="206.66998dip" android:layout_marginTop="236.0dip">
            <ImageView android:id="@id/zzz_puzzlematch" android:layout_width="wrap_content" android:layout_height="wrap_content" />
        </LinearLayout>
    </RelativeLayout>
</FrameLayout>

so whats the right solution to make it possible?

#1 with implement of lockscreenwallpaper.smali and "lockscreen_wallpaper"
or
#2 customize like puzzle-lockscreen with "zzz_lockscreen_wallpaper01"
or
something other...

btw: where can i find the source for the new lockscreen? found the clockwidget, but not its integration for this:
perherps we can take the source for wrapping wallpaper from that xml, if someone had found

35bcewy.jpg
 
Last edited:

SkillCam

Member
Dec 11, 2011
41
13
I think i know how to give it a custom lockscreen wallpaper

We have to add some things to lockscreen.smali and an other in android.policy.jar

I can give it a try

But not until, cause im going to bed now


Sent from my GT-I9001 using XDA
 
  • Like
Reactions: texten

texten

Senior Member
Apr 4, 2012
1,309
1,506
I think i know how to give it a custom lockscreen wallpaper

We have to add some things to lockscreen.smali and an other in android.policy.jar

I can give it a try

But not until, cause im going to bed now


Sent from my GT-I9001 using XDA

thank you, allready thought no one will give it a try, but everyone want this mod :/
 
Last edited:

SkillCam

Member
Dec 11, 2011
41
13
It shouldnt be that hard, cause its the same way to give the aosp lockscreen a custom lockscreen wallpaper

I'll give it a try when im back from school

Edit: for which version should i make that fix xxKQB or?

Sent from my GT-I9001 using XDA
 
Last edited:
  • Like
Reactions: Sot0

SkillCam

Member
Dec 11, 2011
41
13
Lockscreen

I made the first version at the moment but i can't test it cause i have arky's ICS rom at my phone and don't want to install XXKQB now. So you may test it for me
but make a nandroid backup first
 

Attachments

  • fixed_lockscreen_signed.zip
    5.8 MB · Views: 26

texten

Senior Member
Apr 4, 2012
1,309
1,506
please share decompiled files, so i can include these for trying. have a lot of mods in kqb which wil break, when i replace with apk and jar.

need modified smali and modified xml
and instructions :)

edit: or give me a few minutes, so i will flash stock and than can try
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    put the wallpaper in drawable-hdpi called: lockbg.png (or so)

    and change it to: android:background="@drawable/lockbg"
    1
    thanks for reply,
    yeah, but i want to make the lockscreen wallpaper easyly changeable, because i'm trying to build an own rom ;)
    i used google, i read a feld hundrets of threads, but nowhere i can find a solution for fetch the wallpaper which i setup in settings. everybody is asking and no one has a how-to. :(

    i looked in the jkay-lockscreens codes, there is a implement of lockscreenwallpaper.smali in android.policy.jar. perherps someone can port this?!

    Code:
    .class Lcom/android/internal/policy/impl/LockscreenWallpaper;
    .super Landroid/widget/FrameLayout;
    .source "LockscreenWallpaper.java"
    
    
    # instance fields
    .field private final TAG:Ljava/lang/String;
    
    .field private final WALLPAPER_IMAGE_PATH:Ljava/lang/String;
    
    .field bitmapWallpaper:Landroid/graphics/Bitmap;
    
    .field private mLockScreenWallpaperImage:Landroid/widget/ImageView;
    
    
    # direct methods
    .method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
        .registers 4
        .parameter "context"
        .parameter "attrs"
    
        .prologue
        .line 26
        invoke-direct {p0, p1}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;)V
    
        .line 17
        const-string v0, "LockscreenWallpaperUpdater"
    
        iput-object v0, p0, Lcom/android/internal/policy/impl/LockscreenWallpaper;->TAG:Ljava/lang/String;
    
        .line 19
        const-string v0, "/data/data/com.aokp.romcontrol/files/lockscreen_wallpaper.jpg"
    
        iput-object v0, p0, Lcom/android/internal/policy/impl/LockscreenWallpaper;->WALLPAPER_IMAGE_PATH:Ljava/lang/String;
    
        .line 28
        invoke-virtual {p0}, Lcom/android/internal/policy/impl/LockscreenWallpaper;->setLockScreenWallpaper()V
    
        .line 29
        return-void
    .end method
    
    
    # virtual methods
    .method protected onDetachedFromWindow()V
        .registers 2
    
        .prologue
        .line 48
        iget-object v0, p0, Lcom/android/internal/policy/impl/LockscreenWallpaper;->bitmapWallpaper:Landroid/graphics/Bitmap;
    
        if-eqz v0, :cond_9
    
        .line 49
        iget-object v0, p0, Lcom/android/internal/policy/impl/LockscreenWallpaper;->bitmapWallpaper:Landroid/graphics/Bitmap;
    
        invoke-virtual {v0}, Landroid/graphics/Bitmap;->recycle()V
    
        .line 51
        :cond_9
        invoke-static {}, Ljava/lang/System;->gc()V
    
        .line 52
        invoke-super {p0}, Landroid/widget/FrameLayout;->onDetachedFromWindow()V
    
        .line 53
        return-void
    .end method
    
    .method public setLockScreenWallpaper()V
        .registers 6
    
        .prologue
        const/4 v4, -0x1
    
        .line 32
        new-instance v1, Ljava/io/File;
    
        const-string v2, "/data/data/com.aokp.romcontrol/files/lockscreen_wallpaper.jpg"
    
        invoke-direct {v1, v2}, Ljava/io/File;-><init>(Ljava/lang/String;)V
    
        .line 34
        .local v1, file:Ljava/io/File;
        invoke-virtual {v1}, Ljava/io/File;->exists()Z
    
        move-result v2
    
        if-eqz v2, :cond_3e
    
        .line 35
        new-instance v2, Landroid/widget/ImageView;
    
        invoke-virtual {p0}, Lcom/android/internal/policy/impl/LockscreenWallpaper;->getContext()Landroid/content/Context;
    
        move-result-object v3
    
        invoke-direct {v2, v3}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V
    
        iput-object v2, p0, Lcom/android/internal/policy/impl/LockscreenWallpaper;->mLockScreenWallpaperImage:Landroid/widget/ImageView;
    
        .line 36
        iget-object v2, p0, Lcom/android/internal/policy/impl/LockscreenWallpaper;->mLockScreenWallpaperImage:Landroid/widget/ImageView;
    
        sget-object v3, Landroid/widget/ImageView$ScaleType;->CENTER_CROP:Landroid/widget/ImageView$ScaleType;
    
        invoke-virtual {v2, v3}, Landroid/widget/ImageView;->setScaleType(Landroid/widget/ImageView$ScaleType;)V
    
        .line 37
        iget-object v2, p0, Lcom/android/internal/policy/impl/LockscreenWallpaper;->mLockScreenWallpaperImage:Landroid/widget/ImageView;
    
        invoke-virtual {p0, v2, v4, v4}, Lcom/android/internal/policy/impl/LockscreenWallpaper;->addView(Landroid/view/View;II)V
    
        .line 38
        const-string v2, "/data/data/com.aokp.romcontrol/files/lockscreen_wallpaper.jpg"
    
        invoke-static {v2}, Landroid/graphics/BitmapFactory;->decodeFile(Ljava/lang/String;)Landroid/graphics/Bitmap;
    
        move-result-object v2
    
        iput-object v2, p0, Lcom/android/internal/policy/impl/LockscreenWallpaper;->bitmapWallpaper:Landroid/graphics/Bitmap;
    
        .line 39
        new-instance v0, Landroid/graphics/drawable/BitmapDrawable;
    
        invoke-virtual {p0}, Lcom/android/internal/policy/impl/LockscreenWallpaper;->getResources()Landroid/content/res/Resources;
    
        move-result-object v2
    
        iget-object v3, p0, Lcom/android/internal/policy/impl/LockscreenWallpaper;->bitmapWallpaper:Landroid/graphics/Bitmap;
    
        invoke-direct {v0, v2, v3}, Landroid/graphics/drawable/BitmapDrawable;-><init>(Landroid/content/res/Resources;Landroid/graphics/Bitmap;)V
    
        .line 40
        .local v0, d:Landroid/graphics/drawable/Drawable;
        iget-object v2, p0, Lcom/android/internal/policy/impl/LockscreenWallpaper;->mLockScreenWallpaperImage:Landroid/widget/ImageView;
    
        invoke-virtual {v2, v0}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V
    
        .line 44
        .end local v0           #d:Landroid/graphics/drawable/Drawable;
        :goto_3d
        return-void
    
        .line 42
        :cond_3e
        invoke-virtual {p0}, Lcom/android/internal/policy/impl/LockscreenWallpaper;->removeAllViews()V
    
        goto :goto_3d
    .end method

    just copy the file from that android.policy.jar to your android.policy.jar thats all
    1
    and now i have found a source of jkays keyguard_screen_unlock_portrait.xml

    with the implement:

    Code:
    [COLOR="Red"]    <com.android.internal.policy.impl.LockscreenWallpaper 
    android:id="@id/lockscreen_wallpaper" android:layout_width="fill_parent" 
    android:layout_height="fill_parent" />[/COLOR]

    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <RelativeLayout android:gravity="center_horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent"
      xmlns:android="http://schemas.android.com/apk/res/android">
        <com.android.internal.policy.impl.LockscreenWallpaper android:id="@id/lockscreen_wallpaper" android:layout_width="fill_parent" android:layout_height="fill_parent" />
        <GridLayout android:gravity="center_horizontal" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"
          xmlns:android="http://schemas.android.com/apk/res/android">
            <com.android.internal.widget.DigitalClock android:layout_gravity="right" android:id="@id/time" android:layout_marginTop="@dimen/keyguard_lockscreen_status_line_clockfont_top_margin" android:layout_marginRight="@dimen/keyguard_lockscreen_status_line_font_right_margin" android:layout_marginBottom="@dimen/keyguard_lockscreen_status_line_clockfont_bottom_margin">
                <TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_clock_font_size" android:textColor="@color/lockscreen_clock_background" android:ellipsize="none" android:id="@id/timeDisplayBackground" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" />
                <TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_clock_font_size" android:textColor="@color/lockscreen_clock_foreground" android:ellipsize="none" android:id="@id/timeDisplayForeground" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" />
            </com.android.internal.widget.DigitalClock>
            <LinearLayout android:layout_gravity="right" android:orientation="horizontal" android:layout_marginRight="@dimen/keyguard_lockscreen_status_line_font_right_margin">
                <TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_status_line_font_size" android:ellipsize="marquee" android:id="@id/date" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" />
                <TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_status_line_font_size" android:ellipsize="marquee" android:id="@id/alarm_status" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="16.0dip" android:singleLine="true" android:drawablePadding="4.0dip" />
            </LinearLayout>
            <com.android.internal.policy.impl.WeatherText android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_status_line_font_size" android:ellipsize="end" android:gravity="right" android:layout_gravity="fill_horizontal" android:id="@id/weather" android:layout_marginRight="@dimen/keyguard_lockscreen_status_line_font_right_margin" android:singleLine="true" android:drawablePadding="4.0dip" />
            <ViewFlipper android:layout_gravity="right" android:id="@id/calendar" android:layout_marginRight="@dimen/keyguard_lockscreen_status_line_font_right_margin" android:drawablePadding="4.0dip" android:inAnimation="@anim/calendar_fadein" android:outAnimation="@anim/calendar_fadeout" />
            <TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_status_line_font_size" android:ellipsize="marquee" android:layout_gravity="right" android:id="@id/status1" android:layout_marginRight="@dimen/keyguard_lockscreen_status_line_font_right_margin" android:singleLine="true" android:drawablePadding="4.0dip" />
            <Space android:layout_gravity="fill" />
            <com.android.internal.widget.LockPatternView android:layout_gravity="center_horizontal" android:id="@id/lockPattern" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginLeft="8.0dip" android:layout_marginRight="8.0dip" android:layout_marginBottom="4.0dip" />
            <TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_status_line_font_size" android:ellipsize="marquee" android:layout_gravity="center_horizontal" android:id="@id/carrier" android:singleLine="true" />
            <LinearLayout android:gravity="center" android:orientation="horizontal" android:layout_width="fill_parent" android:weightSum="2.0" style="?android:attr/buttonBarStyle">
                <Button android:textSize="@dimen/keyguard_lockscreen_status_line_font_size" android:layout_gravity="center_horizontal" android:id="@id/emergencyCallButton" android:layout_width="0.0dip" android:layout_height="wrap_content" android:text="@string/lockscreen_emergency_call" android:drawableLeft="@drawable/lockscreen_emergency_button" android:drawablePadding="0.0dip" android:layout_weight="1.0" style="?android:attr/buttonBarButtonStyle" />
                <Button android:textSize="@dimen/keyguard_lockscreen_status_line_font_size" android:layout_gravity="center_horizontal" android:id="@id/forgotPatternButton" android:layout_width="0.0dip" android:layout_height="wrap_content" android:text="@string/lockscreen_forgot_pattern_button_text" android:drawableLeft="@drawable/lockscreen_forgot_password_button" android:drawablePadding="0.0dip" android:layout_weight="1.0" style="?android:attr/buttonBarButtonStyle" />
            </LinearLayout>
            <include android:layout_gravity="fill" android:id="@id/transport" android:layout_width="0.0dip" android:layout_height="0.0dip" android:layout_column="0" android:layout_row="0" android:layout_rowSpan="6" android:layout_columnSpan="1" layout="@layout/keyguard_transport_control" />
            <TextView android:layout_gravity="fill" android:id="@id/faceLockAreaView" android:background="@color/facelock_color_background" android:visibility="invisible" android:layout_width="0.0dip" android:layout_height="0.0dip" android:layout_marginTop="8.0dip" android:layout_marginBottom="8.0dip" android:layout_column="0" android:layout_row="6" android:layout_rowSpan="1" android:layout_columnSpan="1" />
        </GridLayout>
    </RelativeLayout>

    is someone there who can make it working in kqb?

    edit: found it in an aosp-rom, seems its not jkay ;)


    Do it like this, in the file "keyguard_screen_unlock_portrait.xml" you have to examine each line and look for the values starting with a "@", these lines need to be present in the files in /values/, so if the things are missing just add them from the aosp rom,

    for example:
    looking at the android:id="@id/lockscreen_wallpaper" part, this means you will need to have the "lockscreen_wallpaper" id inside /values/ids.xml, if the id doesn't exist in that file you simply need to copy it from aosp rom. do that process for all custom variables/ids/colors/dimens, etc

    Also when compiling just look at the log, it will say where the error is present, (you use apk manager?)
    1
    I think i know how to give it a custom lockscreen wallpaper

    We have to add some things to lockscreen.smali and an other in android.policy.jar

    I can give it a try

    But not until, cause im going to bed now


    Sent from my GT-I9001 using XDA
    1
    It shouldnt be that hard, cause its the same way to give the aosp lockscreen a custom lockscreen wallpaper

    I'll give it a try when im back from school

    Edit: for which version should i make that fix xxKQB or?

    Sent from my GT-I9001 using XDA