Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,741,492 Members 39,310 Now Online
XDA Developers Android and Mobile Development Forum

[Q] Set up duration of alarm clock

Tip us?
 
DaLuigi3
Old
(Last edited by DaLuigi3; 13th December 2011 at 10:01 PM.)
#1  
Member - OP
Thanks Meter 4
Posts: 48
Join Date: Sep 2011
Default [Q] Set up duration of alarm clock

Hi,

i'm on Frankenstein KK5 Rom (odexed) and my question is:

is it possible to set up duration of the alarm clock? (it only plays the alarm-music for ~ 30 seconds)

i've found this code in alarm.smali:

Code:
Select Code
.class public Lcom/sec/android/app/clockpackage/alarm/Alarm;
.super Landroid/app/Activity;
.source "Alarm.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/sec/android/app/clockpackage/alarm/Alarm$MyReceiver;,
        Lcom/sec/android/app/clockpackage/alarm/Alarm$DeleteDialogListener;
    }
.end annotation


# static fields
.field public static final ALARM_DURATION_TABLE:[I

.field public static final ALARM_SNOOZE_COUNT_TABLE:[I

.field public static final ALARM_SUBDUE_URI:[Ljava/lang/String;

.field static final SMART_ALARM_TONE:[I

.field private static bgCanvas:Landroid/graphics/Canvas;

.field private static metrics:Landroid/util/DisplayMetrics;

.field private static p:Landroid/os/Parcel;


# instance fields
.field private mBackgroundNoItem:Landroid/graphics/Bitmap;

.field private mCreateAlarm:Landroid/view/View;

.field private mCursor:Landroid/database/Cursor;

.field private mCursorAdapter:Lcom/sec/android/app/clockpackage/alarm/CustomCursorAdapter;

.field private mDeleteDialog:Landroid/app/AlertDialog;

.field private mDeleteDialogListener:Lcom/sec/android/app/clockpackage/alarm/Alarm$DeleteDialogListener;

.field private mDeletePosition:I

.field private mFirstLaunch:Z

.field private mInfoAlarmName:Ljava/lang/String;

.field private mIsInfoAlarm:Z

.field private mList:Lcom/sec/android/app/clockpackage/alarm/CustomListView;

.field private mListAdapter:Lcom/sec/android/app/clockpackage/alarm/CustomListAdapter;

.field private mOrientation:I

.field private mReceiver:Lcom/sec/android/app/clockpackage/alarm/Alarm$MyReceiver;

.field private mSetAsUri:Ljava/lang/String;

.field private mToast:Landroid/widget/Toast;


# direct methods
.method static constructor <clinit>()V
    .locals 6

    .prologue
    const/4 v5, 0x6

    const/4 v4, 0x0

    const/4 v3, 0x5

    .line 170
    new-array v0, v3, [I

    fill-array-data v0, :array_0

    sput-object v0, Lcom/sec/android/app/clockpackage/alarm/Alarm;->ALARM_SNOOZE_COUNT_TABLE:[I

    .line 182
    new-array v0, v3, [I

    fill-array-data v0, :array_1

    sput-object v0, Lcom/sec/android/app/clockpackage/alarm/Alarm;->ALARM_DURATION_TABLE:[I

    .line 189
    new-array v0, v5, [Ljava/lang/String;

    const/4 v1, 0x0

    const-string v2, "/system/media/audio/ui/Morning.ogg"

    aput-object v2, v0, v1

    const/4 v1, 0x1

    const-string v2, "/system/media/audio/ui/Breeze.ogg"

    aput-object v2, v0, v1

    const/4 v1, 0x2

    const-string v2, "/system/media/audio/ui/Mist.ogg"

    aput-object v2, v0, v1

    const/4 v1, 0x3

    const-string v2, "/system/media/audio/ui/Forest.ogg"

    aput-object v2, v0, v1

    const/4 v1, 0x4

    const-string v2, "/system/media/audio/ui/Light.ogg"

    aput-object v2, v0, v1

    const-string v1, "/system/media/audio/ui/Rain.ogg"

    aput-object v1, v0, v3

    sput-object v0, Lcom/sec/android/app/clockpackage/alarm/Alarm;->ALARM_SUBDUE_URI:[Ljava/lang/String;

    .line 205
    new-array v0, v5, [I

    fill-array-data v0, :array_2

    sput-object v0, Lcom/sec/android/app/clockpackage/alarm/Alarm;->SMART_ALARM_TONE:[I

    .line 268
    sput-object v4, Lcom/sec/android/app/clockpackage/alarm/Alarm;->metrics:Landroid/util/DisplayMetrics;

    .line 269
    sput-object v4, Lcom/sec/android/app/clockpackage/alarm/Alarm;->bgCanvas:Landroid/graphics/Canvas;

    .line 270
    sput-object v4, Lcom/sec/android/app/clockpackage/alarm/Alarm;->p:Landroid/os/Parcel;

    return-void

    .line 170
    :array_0
    .array-data 0x4
        0x1t 0x0t 0x0t 0x0t
        0x2t 0x0t 0x0t 0x0t
        0x3t 0x0t 0x0t 0x0t
        0x5t 0x0t 0x0t 0x0t
        0xat 0x0t 0x0t 0x0t
    .end array-data

    .line 182
    :array_1
    .array-data 0x4
        0x3t 0x0t 0x0t 0x0t
        0x5t 0x0t 0x0t 0x0t
        0xat 0x0t 0x0t 0x0t
        0xft 0x0t 0x0t 0x0t
        0x1et 0x0t 0x0t 0x0t
    .end array-data

    .line 205
    :array_2
    .array-data 0x4
        0x0t 0x0t 0x0t 0x0t
        0x1t 0x0t 0x0t 0x0t
        0x2t 0x0t 0x0t 0x0t
        0x3t 0x0t 0x0t 0x0t
        0x4t 0x0t 0x0t 0x0t
        0x5t 0x0t 0x0t 0x0t
    .end array-data
.end method

.method public constructor <init>()V
    .locals 4

    .prologue
    const/4 v3, 0x0

    const/4 v2, -0x1

    const/4 v1, 0x0

    .line 82
    invoke-direct {p0}, Landroid/app/Activity;-><init>()V

....too much code.....
but i'm not able to find the duration time initialization....

greetz DaLuigi3
 
DaLuigi3
Old
#2  
Member - OP
Thanks Meter 4
Posts: 48
Join Date: Sep 2011
nobody has an idea?
 
DaLuigi3
Old
#3  
Member - OP
Thanks Meter 4
Posts: 48
Join Date: Sep 2011
the last try to get an answer...
 
jastonas
Old
#4  
jastonas's Avatar
Senior Member
Thanks Meter 147
Posts: 989
Join Date: Jul 2010
Location: Patra

 
DONATE TO ME
Quote:
Originally Posted by DaLuigi3 View Post
the last try to get an answer...
I would love a solution for this!!
EVOLUTION
Quote:
iPhone > iPhone 3GS > HTC Desire > ZTE Blade > LG Optimus 2X (P990)> Samsung Galaxy S II (GT-i9100) Samsung Galaxy S III (GT-i9300)
 
behemot24
Old
#5  
behemot24's Avatar
Senior Member
Thanks Meter 94
Posts: 340
Join Date: Oct 2010
Up
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes