brittnearl

Lock screen alarm

2 posts in this topic

Hi i currently am working on a custom rom for the zte n800 awe (a cdma device) over at android forums, i noticed around the forums here you guys managed to fix the lockscreen next alarm status and was wondering if someone could share their in site on how to accomplish this? Thanks in advance

0

Share this post


Link to post
Share on other sites

I have found a solution, instead of deleting the thread i thought i would share how i accomplished this

First decompile android.policy.jar and open keyguardstatusviewmanager.smali and search for "updatealarminfo" now replace the entire method with this:

.method private updateAlarmInfo()V

.locals 5

.prologue

const/4 v2, 0x0

.line 324

iget-object v3, p0, Lcom/android/internal/policy/impl/KeyguardStatusViewManager;->mAlarmStatusView:Landroid/widget/TextView;

if-eqz v3, :cond_0

.line 325

iget-object v3, p0, Lcom/android/internal/policy/impl/KeyguardStatusViewManager;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;

invoke-virtual {v3}, Lcom/android/internal/widget/LockPatternUtils;->getNextAlarm()Ljava/lang/String;

move-result-object v0

.line 326

.local v0, nextAlarm:Ljava/lang/String;

iget-boolean v3, p0, Lcom/android/internal/policy/impl/KeyguardStatusViewManager;->mShowingStatus:Z

if-eqz v3, :cond_1

invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

move-result v3

if-nez v3, :cond_1

const/4 v1, 0x1

.line 327

.local v1, showAlarm:Z

:goto_0

iget-object v3, p0, Lcom/android/internal/policy/impl/KeyguardStatusViewManager;->mAlarmStatusView:Landroid/widget/TextView;

invoke-virtual {v3, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

.line 328

iget-object v3, p0, Lcom/android/internal/policy/impl/KeyguardStatusViewManager;->mAlarmStatusView:Landroid/widget/TextView;

const v4, 0x108002e

invoke-virtual {v3, v4, v2, v2, v2}, Landroid/widget/TextView;->setCompoundDrawablesWithIntrinsicBounds(IIII)V

.line 329

iget-object v3, p0, Lcom/android/internal/policy/impl/KeyguardStatusViewManager;->mAlarmStatusView:Landroid/widget/TextView;

if-eqz v1, :cond_2

:goto_1

invoke-virtual {v3, v2}, Landroid/widget/TextView;->setVisibility(I)V

.line 331

.end local v0 #nextAlarm:Ljava/lang/String;

.end local v1 #showAlarm:Z

:cond_0

return-void

.restart local v0 #nextAlarm:Ljava/lang/String;

:cond_1

move v1, v2

.line 326

goto :goto_0

.line 329

.restart local v1 #showAlarm:Z

:cond_2

const/16 v2, 0x8

goto :goto_1

.end method

Recompile and now next alarm will show for any alarm app:)

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

MoDaCo is part of the MoDaCo.network, © Paul O'Brien 2002-2016. MoDaCo uses IntelliTxt technology.