1. Hot New Devices! HTC One M9 | Samsung Galaxy S6 | LG G4

Tutorial


  1. jetx2x

    jetx2x Well-Known Member Developer

    Hello fellow Warpers.... and welcome to my first ever tut... I have tried my hardest to make it as noob friendly as possible for newbies...

    Before attempting this it is recommended that you download and install notepad++... know how to decompile apks... and also know how to count in hexadecimal

    1. So first things first... download the zip that I put together to help along the way of this tut found here... after downloading unzip the file to a remote location

    2. Next you must use apktool tool to decompile your systemui.apk which can be found in /system/app/... if you do not know how to do this then I dont think you should be following this tutorial :p... but anyway google is your friend...

    3. Navigate to your now decompiled systemui and go into \SystemUI.apk\smali\com\android\systemui\ and replace both R$layout.xml and R$id.xml with the ones found in my zip

    4.Now go into the statusbar folder and open StatusbarService.smali with notepad++... and search for

    Code (Text):
    1. .method private makeStatusBarView(Landroid/content/Context;)V
    2.     .locals 11
    3.     .parameter "context"
    4.  
    5.     .prologue
    6.     const v10, 0x7f090011
    7.  
    8.     const/4 v9, 0x0
    9.  
    10.     const/16 v8, 0x8
    11.  
    12.     .line 263
    13.     invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
    14.  
    15.     move-result-object v3
    16.  
    17.     .line 265
    18.     .local v3, res:Landroid/content/res/Resources;
    19.     const v6, 0x1050005
    20.  
    21.     invoke-virtual {v3, v6}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I
    22.  
    23.     move-result v6
    24.  
    25.     iput v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mIconSize:I
    26.  
    27.     .line 267
    28.     const v6, 0x7f030003
    29.  
    30.     invoke-static {p1, v6, v9}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
    31.  
    32.     move-result-object v1
    33.  
    34.     check-cast v1, Lcom/android/systemui/statusbar/ExpandedView;
    35.  
    36.     .line 269
    37.     .local v1, expanded:Lcom/android/systemui/statusbar/ExpandedView;
    38.     iput-object p0, v1, Lcom/android/systemui/statusbar/ExpandedView;->mService:Lcom/android/systemui/statusbar/StatusBarService;
    39.  
    40.     .line 271
    41.     const v6, 0x7f030002
    42.  
    43.     invoke-static {p1, v6, v9}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
    44.  
    45.     move-result-object v4
    46.  
    47.     check-cast v4, Lcom/android/systemui/statusbar/StatusBarView;
    48.  
    49.     .line 272
    50.     .local v4, sb:Lcom/android/systemui/statusbar/StatusBarView;
    51.     iput-object p0, v4, Lcom/android/systemui/statusbar/StatusBarView;->mService:Lcom/android/systemui/statusbar/StatusBarService;
    52.  
    53.     .line 275
    54.     const/4 v6, -0x3
    55.  
    56.     iput v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mPixelFormat:I
    57.  
    58.     .line 276
    59.     invoke-virtual {v4}, Lcom/android/systemui/statusbar/StatusBarView;->getBackground()Landroid/graphics/drawable/Drawable;
    60.  
    61.     move-result-object v0
    62.  
    63.     .line 277
    64.     .local v0, bg:Landroid/graphics/drawable/Drawable;
    65.     if-eqz v0, :cond_0
    66.  
    67.     .line 278
    68.     invoke-virtual {v0}, Landroid/graphics/drawable/Drawable;->getOpacity()I
    69.  
    70.     move-result v6
    71.  
    72.     iput v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mPixelFormat:I
    73.  
    74.     .line 281
    75.     :cond_0
    76.     iput-object v4, p0, Lcom/android/systemui/statusbar/StatusBarService;->mStatusBarView:Lcom/android/systemui/statusbar/StatusBarView;
    77.  
    78.     .line 282
    79.     const v6, 0x7f09000a
    80.  
    81.     invoke-virtual {v4, v6}, Lcom/android/systemui/statusbar/StatusBarView;->findViewById(I)Landroid/view/View;
    82.  
    83.     move-result-object v6
    84.  
    85.     check-cast v6, Landroid/widget/LinearLayout;
    86.  
    87.     iput-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mStatusIcons:Landroid/widget/LinearLayout;
    88.  
    89.     .line 283
    90.     const v6, 0x7f090009
    91.  
    92.     invoke-virtual {v4, v6}, Lcom/android/systemui/statusbar/StatusBarView;->findViewById(I)Landroid/view/View;
    93.  
    94.     move-result-object v6
    95.  
    96.     check-cast v6, Lcom/android/systemui/statusbar/IconMerger;
    97.  
    98.     iput-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mNotificationIcons:Lcom/android/systemui/statusbar/IconMerger;
    99.  
    100.     .line 284
    101.     const v6, 0x7f090008
    102.  
    103.     invoke-virtual {v4, v6}, Lcom/android/systemui/statusbar/StatusBarView;->findViewById(I)Landroid/view/View;
    104.  
    105.     move-result-object v6
    106.  
    107.     check-cast v6, Landroid/widget/LinearLayout;
    108.  
    109.     iput-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mIcons:Landroid/widget/LinearLayout;
    110.  
    111.     .line 285
    112.     const v6, 0x7f09000b
    113.  
    114.     invoke-virtual {v4, v6}, Lcom/android/systemui/statusbar/StatusBarView;->findViewById(I)Landroid/view/View;
    115.  
    116.     move-result-object v6
    117.  
    118.     iput-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mTickerView:Landroid/view/View;
    119.  
    120.     .line 286
    121.     const v6, 0x7f09000e
    122.  
    123.     invoke-virtual {v4, v6}, Lcom/android/systemui/statusbar/StatusBarView;->findViewById(I)Landroid/view/View;
    124.  
    125.     move-result-object v6
    126.  
    127.     check-cast v6, Lcom/android/systemui/statusbar/DateView;
    128.  
    129.     iput-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mDateView:Lcom/android/systemui/statusbar/DateView;
    130.  
    131.     .line 288
    132.     new-instance v6, Lcom/android/systemui/statusbar/StatusBarService$ExpandedDialog;
    133.  
    134.     invoke-direct {v6, p0, p1}, Lcom/android/systemui/statusbar/StatusBarService$ExpandedDialog;-><init>(Lcom/android/systemui/statusbar/StatusBarService;Landroid/content/Context;)V
    135.  
    136.     iput-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mExpandedDialog:Landroid/app/Dialog;
    137.  
    138.     .line 289
    139.     iput-object v1, p0, Lcom/android/systemui/statusbar/StatusBarService;->mExpandedView:Lcom/android/systemui/statusbar/ExpandedView;
    140.  
    141.     .line 290
    142.     invoke-virtual {v1, v10}, Lcom/android/systemui/statusbar/ExpandedView;->findViewById(I)Landroid/view/View;
    143.  
    144.     move-result-object v6
    145.  
    146.     iput-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mExpandedContents:Landroid/view/View;
    147.  
    148.     .line 291
    149.     const v6, 0x7f090013
    150.  
    151.     invoke-virtual {v1, v6}, Lcom/android/systemui/statusbar/ExpandedView;->findViewById(I)Landroid/view/View;
    152.  
    153.     move-result-object v6
    154.  
    155.     check-cast v6, Landroid/widget/TextView;
    156.  
    157.     iput-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mOngoingTitle:Landroid/widget/TextView;
    158.  
    159.     .line 292
    160.     const v6, 0x7f090014
    161.  
    162.     invoke-virtual {v1, v6}, Lcom/android/systemui/statusbar/ExpandedView;->findViewById(I)Landroid/view/View;
    163.  
    164.     move-result-object v6
    165.  
    166.     check-cast v6, Landroid/widget/LinearLayout;
    167.  
    168.     iput-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mOngoingItems:Landroid/widget/LinearLayout;
    169.  
    170.     .line 293
    171.     const v6, 0x7f090015
    172.  
    173.     invoke-virtual {v1, v6}, Lcom/android/systemui/statusbar/ExpandedView;->findViewById(I)Landroid/view/View;
    174.  
    175.     move-result-object v6
    176.  
    177.     check-cast v6, Landroid/widget/TextView;
    178.  
    179.     iput-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mLatestTitle:Landroid/widget/TextView;
    180.  
    181.     .line 294
    182.     const v6, 0x7f090016
    183.  
    184.     invoke-virtual {v1, v6}, Lcom/android/systemui/statusbar/ExpandedView;->findViewById(I)Landroid/view/View;
    185.  
    186.     move-result-object v6
    187.  
    188.     check-cast v6, Landroid/widget/LinearLayout;
    189.  
    190.     iput-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mLatestItems:Landroid/widget/LinearLayout;
    191.  
    192.     .line 295
    193.     const v6, 0x7f090012
    194.  
    195.     invoke-virtual {v1, v6}, Lcom/android/systemui/statusbar/ExpandedView;->findViewById(I)Landroid/view/View;
    196.  
    197.     move-result-object v6
    198.  
    199.     check-cast v6, Landroid/widget/TextView;
    200.  
    201.     iput-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mNoNotificationsTitle:Landroid/widget/TextView;
    202.  
    203.     .line 296
    204.     const v6, 0x7f09000f
    205.  
    206.     invoke-virtual {v1, v6}, Lcom/android/systemui/statusbar/ExpandedView;->findViewById(I)Landroid/view/View;
    207.  
    208.     move-result-object v6
    209.  
    210.     check-cast v6, Landroid/widget/TextView;
    211.  
    212.     iput-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mClearButton:Landroid/widget/TextView;
    213.  
    214.     .line 297
    215.     iget-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mClearButton:Landroid/widget/TextView;
    216.  
    217.     iget-object v7, p0, Lcom/android/systemui/statusbar/StatusBarService;->mClearButtonListener:Landroid/view/View$OnClickListener;
    218.  
    219.     invoke-virtual {v6, v7}, Landroid/widget/TextView;->setOnClickListener(Landroid/view/View$OnClickListener;)V
    220.  
    221.     .line 298
    222.     const v6, 0x7f090010
    223.  
    224.     invoke-virtual {v1, v6}, Lcom/android/systemui/statusbar/ExpandedView;->findViewById(I)Landroid/view/View;
    225.  
    226.     move-result-object v6
    227.  
    228.     check-cast v6, Landroid/widget/ScrollView;
    229.  
    230.     iput-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mScrollView:Landroid/widget/ScrollView;
    231.  
    232.     .line 299
    233.     invoke-virtual {v1, v10}, Lcom/android/systemui/statusbar/ExpandedView;->findViewById(I)Landroid/view/View;
    234.  
    235.     move-result-object v6
    236.  
    237.     iput-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mNotificationLinearLayout:Landroid/view/View;
    238.  
    239.     .line 301
    240.     iget-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mExpandedView:Lcom/android/systemui/statusbar/ExpandedView;
    241.  
    242.     invoke-virtual {v6, v8}, Lcom/android/systemui/statusbar/ExpandedView;->setVisibility(I)V
    243.  
    244.     .line 302
    245.     iget-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mOngoingTitle:Landroid/widget/TextView;
    246.  
    247.     invoke-virtual {v6, v8}, Landroid/widget/TextView;->setVisibility(I)V
    248.  
    249.     .line 303
    250.     iget-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mLatestTitle:Landroid/widget/TextView;
    251.  
    252.     invoke-virtual {v6, v8}, Landroid/widget/TextView;->setVisibility(I)V
    253.  
    254.     .line 305
    255.     new-instance v6, Lcom/android/systemui/statusbar/StatusBarService$MyTicker;
    256.  
    257.     invoke-direct {v6, p0, p1, v4}, Lcom/android/systemui/statusbar/StatusBarService$MyTicker;-><init>(Lcom/android/systemui/statusbar/StatusBarService;Landroid/content/Context;Lcom/android/systemui/statusbar/StatusBarView;)V
    258.  
    259.     iput-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mTicker:Lcom/android/systemui/statusbar/Ticker;
    260.  
    261.     .line 307
    262.     const v6, 0x7f09000d
    263.  
    264.     invoke-virtual {v4, v6}, Lcom/android/systemui/statusbar/StatusBarView;->findViewById(I)Landroid/view/View;
    265.  
    266.     move-result-object v5
    267.  
    268.     check-cast v5, Lcom/android/systemui/statusbar/TickerView;
    269.  
    270.     .line 308
    271.     .local v5, tickerView:Lcom/android/systemui/statusbar/TickerView;
    272.     iget-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mTicker:Lcom/android/systemui/statusbar/Ticker;
    273.  
    274.     iput-object v6, v5, Lcom/android/systemui/statusbar/TickerView;->mTicker:Lcom/android/systemui/statusbar/Ticker;
    275.  
    276.     .line 310
    277.     const v6, 0x7f030006
    278.  
    279.     invoke-static {p1, v6, v9}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
    280.  
    281.     move-result-object v6
    282.  
    283.     check-cast v6, Lcom/android/systemui/statusbar/TrackingView;
    284.  
    285.     iput-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mTrackingView:Lcom/android/systemui/statusbar/TrackingView;
    286.  
    287.     .line 311
    288.     iget-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mTrackingView:Lcom/android/systemui/statusbar/TrackingView;
    289.  
    290.     iput-object p0, v6, Lcom/android/systemui/statusbar/TrackingView;->mService:Lcom/android/systemui/statusbar/StatusBarService;
    291.  
    292.     .line 312
    293.     iget-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mTrackingView:Lcom/android/systemui/statusbar/TrackingView;
    294.  
    295.     const v7, 0x7f090019
    296.  
    297.     invoke-virtual {v6, v7}, Lcom/android/systemui/statusbar/TrackingView;->findViewById(I)Landroid/view/View;
    298.  
    299.     move-result-object v6
    300.  
    301.     check-cast v6, Lcom/android/systemui/statusbar/CloseDragHandle;
    302.  
    303.     iput-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mCloseView:Lcom/android/systemui/statusbar/CloseDragHandle;
    304.  
    305.     .line 313
    306.     iget-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mCloseView:Lcom/android/systemui/statusbar/CloseDragHandle;
    307.  
    308.     iput-object p0, v6, Lcom/android/systemui/statusbar/CloseDragHandle;->mService:Lcom/android/systemui/statusbar/StatusBarService;
    309.  
    310.     .line 315
    311.     const/high16 v6, 0x7f06
    312.  
    313.     invoke-virtual {v3, v6}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I
    314.  
    315.     move-result v6
    316.  
    317.     iput v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mEdgeBorder:I
    318.  
    319.     .line 318
    320.     invoke-direct {p0}, Lcom/android/systemui/statusbar/StatusBarService;->setAreThereNotifications()V
    321.  
    322.     .line 319
    323.     iget-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mDateView:Lcom/android/systemui/statusbar/DateView;
    324.  
    325.     const/4 v7, 0x4
    326.  
    327.     invoke-virtual {v6, v7}, Lcom/android/systemui/statusbar/DateView;->setVisibility(I)V
    328.  
    329.     .line 322
    330.     new-instance v2, Landroid/content/IntentFilter;
    331.  
    332.     invoke-direct {v2}, Landroid/content/IntentFilter;-><init>()V
    333.  
    334.     .line 323
    335.     .local v2, filter:Landroid/content/IntentFilter;
    336.     const-string v6, "android.intent.action.CONFIGURATION_CHANGED"
    337.  
    338.     invoke-virtual {v2, v6}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V
    339.  
    340.     .line 324
    341.     const-string v6, "android.intent.action.CLOSE_SYSTEM_DIALOGS"
    342.  
    343.     invoke-virtual {v2, v6}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V
    344.  
    345.     .line 325
    346.     const-string v6, "android.intent.action.SCREEN_OFF"
    347.  
    348.     invoke-virtual {v2, v6}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V
    349.  
    350.     .line 326
    351.     iget-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mBroadcastReceiver:Landroid/content/BroadcastReceiver;
    352.  
    353.     invoke-virtual {p1, v6, v2}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
    354.  
    355.     const v6, 0x7f030008
    356.  
    357.     invoke-static {p1, v6, v9}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
    358.  
    359.     move-result-object v5
    360.  
    361.     check-cast v5, Lcom/lidroid/systemui/quickpanel/PowerWidget;
    362.  
    363.     .local v5, qsv:Lcom/lidroid/systemui/quickpanel/PowerWidget;
    364.     invoke-virtual {v5}, Lcom/lidroid/systemui/quickpanel/PowerWidget;->setupWidget()V
    365.  
    366.     iget-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mExpandedView:Lcom/android/systemui/statusbar/ExpandedView;
    367.  
    368.     invoke-virtual {v6, v5, v11}, Lcom/android/systemui/statusbar/ExpandedView;->addView(Landroid/view/View;I)V
    369.  
    370.     .line 327
    371.     return-void
    372. .end method
    Replace the entire method with this one

    Code (Text):
    1. .method private makeStatusBarView(Landroid/content/Context;)V
    2.     .locals 12
    3.     .parameter "context"
    4.  
    5.     .prologue
    6.     const/4 v11, 0x0
    7.  
    8.     const v10, 0x7f090011
    9.  
    10.     const/4 v9, 0x0
    11.  
    12.     const/16 v8, 0x8
    13.  
    14.     .line 263
    15.     invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
    16.  
    17.     move-result-object v3
    18.  
    19.     .line 265
    20.     .local v3, res:Landroid/content/res/Resources;
    21.     const v6, 0x1050005
    22.  
    23.     invoke-virtual {v3, v6}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I
    24.  
    25.     move-result v6
    26.  
    27.     iput v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mIconSize:I
    28.  
    29.     .line 267
    30.     const v6, 0x7f030003
    31.  
    32.     invoke-static {p1, v6, v9}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
    33.  
    34.     move-result-object v1
    35.  
    36.     check-cast v1, Lcom/android/systemui/statusbar/ExpandedView;
    37.  
    38.     .line 269
    39.     .local v1, expanded:Lcom/android/systemui/statusbar/ExpandedView;
    40.     iput-object p0, v1, Lcom/android/systemui/statusbar/ExpandedView;->mService:Lcom/android/systemui/statusbar/StatusBarService;
    41.  
    42.     .line 271
    43.     const v6, 0x7f030002
    44.  
    45.     invoke-static {p1, v6, v9}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
    46.  
    47.     move-result-object v4
    48.  
    49.     check-cast v4, Lcom/android/systemui/statusbar/StatusBarView;
    50.  
    51.     .line 272
    52.     .local v4, sb:Lcom/android/systemui/statusbar/StatusBarView;
    53.     iput-object p0, v4, Lcom/android/systemui/statusbar/StatusBarView;->mService:Lcom/android/systemui/statusbar/StatusBarService;
    54.  
    55.     .line 275
    56.     const/4 v6, -0x3
    57.  
    58.     iput v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mPixelFormat:I
    59.  
    60.     .line 276
    61.     invoke-virtual {v4}, Lcom/android/systemui/statusbar/StatusBarView;->getBackground()Landroid/graphics/drawable/Drawable;
    62.  
    63.     move-result-object v0
    64.  
    65.     .line 277
    66.     .local v0, bg:Landroid/graphics/drawable/Drawable;
    67.     if-eqz v0, :cond_0
    68.  
    69.     .line 278
    70.     invoke-virtual {v0}, Landroid/graphics/drawable/Drawable;->getOpacity()I
    71.  
    72.     move-result v6
    73.  
    74.     iput v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mPixelFormat:I
    75.  
    76.     .line 281
    77.     :cond_0
    78.     iput-object v4, p0, Lcom/android/systemui/statusbar/StatusBarService;->mStatusBarView:Lcom/android/systemui/statusbar/StatusBarView;
    79.  
    80.     .line 282
    81.     const v6, 0x7f09000a
    82.  
    83.     invoke-virtual {v4, v6}, Lcom/android/systemui/statusbar/StatusBarView;->findViewById(I)Landroid/view/View;
    84.  
    85.     move-result-object v6
    86.  
    87.     check-cast v6, Landroid/widget/LinearLayout;
    88.  
    89.     iput-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mStatusIcons:Landroid/widget/LinearLayout;
    90.  
    91.     .line 283
    92.     const v6, 0x7f090009
    93.  
    94.     invoke-virtual {v4, v6}, Lcom/android/systemui/statusbar/StatusBarView;->findViewById(I)Landroid/view/View;
    95.  
    96.     move-result-object v6
    97.  
    98.     check-cast v6, Lcom/android/systemui/statusbar/IconMerger;
    99.  
    100.     iput-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mNotificationIcons:Lcom/android/systemui/statusbar/IconMerger;
    101.  
    102.     .line 284
    103.     const v6, 0x7f090008
    104.  
    105.     invoke-virtual {v4, v6}, Lcom/android/systemui/statusbar/StatusBarView;->findViewById(I)Landroid/view/View;
    106.  
    107.     move-result-object v6
    108.  
    109.     check-cast v6, Landroid/widget/LinearLayout;
    110.  
    111.     iput-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mIcons:Landroid/widget/LinearLayout;
    112.  
    113.     .line 285
    114.     const v6, 0x7f09000b
    115.  
    116.     invoke-virtual {v4, v6}, Lcom/android/systemui/statusbar/StatusBarView;->findViewById(I)Landroid/view/View;
    117.  
    118.     move-result-object v6
    119.  
    120.     iput-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mTickerView:Landroid/view/View;
    121.  
    122.     .line 286
    123.     const v6, 0x7f09000e
    124.  
    125.     invoke-virtual {v4, v6}, Lcom/android/systemui/statusbar/StatusBarView;->findViewById(I)Landroid/view/View;
    126.  
    127.     move-result-object v6
    128.  
    129.     check-cast v6, Lcom/android/systemui/statusbar/DateView;
    130.  
    131.     iput-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mDateView:Lcom/android/systemui/statusbar/DateView;
    132.  
    133.     .line 288
    134.     new-instance v6, Lcom/android/systemui/statusbar/StatusBarService$ExpandedDialog;
    135.  
    136.     invoke-direct {v6, p0, p1}, Lcom/android/systemui/statusbar/StatusBarService$ExpandedDialog;-><init>(Lcom/android/systemui/statusbar/StatusBarService;Landroid/content/Context;)V
    137.  
    138.     iput-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mExpandedDialog:Landroid/app/Dialog;
    139.  
    140.     .line 289
    141.     iput-object v1, p0, Lcom/android/systemui/statusbar/StatusBarService;->mExpandedView:Lcom/android/systemui/statusbar/ExpandedView;
    142.  
    143.     .line 290
    144.     invoke-virtual {v1, v10}, Lcom/android/systemui/statusbar/ExpandedView;->findViewById(I)Landroid/view/View;
    145.  
    146.     move-result-object v6
    147.  
    148.     iput-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mExpandedContents:Landroid/view/View;
    149.  
    150.     .line 291
    151.     const v6, 0x7f090013
    152.  
    153.     invoke-virtual {v1, v6}, Lcom/android/systemui/statusbar/ExpandedView;->findViewById(I)Landroid/view/View;
    154.  
    155.     move-result-object v6
    156.  
    157.     check-cast v6, Landroid/widget/TextView;
    158.  
    159.     iput-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mOngoingTitle:Landroid/widget/TextView;
    160.  
    161.     .line 292
    162.     const v6, 0x7f090014
    163.  
    164.     invoke-virtual {v1, v6}, Lcom/android/systemui/statusbar/ExpandedView;->findViewById(I)Landroid/view/View;
    165.  
    166.     move-result-object v6
    167.  
    168.     check-cast v6, Landroid/widget/LinearLayout;
    169.  
    170.     iput-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mOngoingItems:Landroid/widget/LinearLayout;
    171.  
    172.     .line 293
    173.     const v6, 0x7f090015
    174.  
    175.     invoke-virtual {v1, v6}, Lcom/android/systemui/statusbar/ExpandedView;->findViewById(I)Landroid/view/View;
    176.  
    177.     move-result-object v6
    178.  
    179.     check-cast v6, Landroid/widget/TextView;
    180.  
    181.     iput-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mLatestTitle:Landroid/widget/TextView;
    182.  
    183.     .line 294
    184.     const v6, 0x7f090016
    185.  
    186.     invoke-virtual {v1, v6}, Lcom/android/systemui/statusbar/ExpandedView;->findViewById(I)Landroid/view/View;
    187.  
    188.     move-result-object v6
    189.  
    190.     check-cast v6, Landroid/widget/LinearLayout;
    191.  
    192.     iput-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mLatestItems:Landroid/widget/LinearLayout;
    193.  
    194.     .line 295
    195.     const v6, 0x7f090012
    196.  
    197.     invoke-virtual {v1, v6}, Lcom/android/systemui/statusbar/ExpandedView;->findViewById(I)Landroid/view/View;
    198.  
    199.     move-result-object v6
    200.  
    201.     check-cast v6, Landroid/widget/TextView;
    202.  
    203.     iput-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mNoNotificationsTitle:Landroid/widget/TextView;
    204.  
    205.     .line 296
    206.     const v6, 0x7f09000f
    207.  
    208.     invoke-virtual {v1, v6}, Lcom/android/systemui/statusbar/ExpandedView;->findViewById(I)Landroid/view/View;
    209.  
    210.     move-result-object v6
    211.  
    212.     check-cast v6, Landroid/widget/TextView;
    213.  
    214.     iput-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mClearButton:Landroid/widget/TextView;
    215.  
    216.     .line 297
    217.     iget-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mClearButton:Landroid/widget/TextView;
    218.  
    219.     iget-object v7, p0, Lcom/android/systemui/statusbar/StatusBarService;->mClearButtonListener:Landroid/view/View$OnClickListener;
    220.  
    221.     invoke-virtual {v6, v7}, Landroid/widget/TextView;->setOnClickListener(Landroid/view/View$OnClickListener;)V
    222.  
    223.     .line 298
    224.     const v6, 0x7f090010
    225.  
    226.     invoke-virtual {v1, v6}, Lcom/android/systemui/statusbar/ExpandedView;->findViewById(I)Landroid/view/View;
    227.  
    228.     move-result-object v6
    229.  
    230.     check-cast v6, Landroid/widget/ScrollView;
    231.  
    232.     iput-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mScrollView:Landroid/widget/ScrollView;
    233.  
    234.     .line 299
    235.     invoke-virtual {v1, v10}, Lcom/android/systemui/statusbar/ExpandedView;->findViewById(I)Landroid/view/View;
    236.  
    237.     move-result-object v6
    238.  
    239.     iput-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mNotificationLinearLayout:Landroid/view/View;
    240.  
    241.     .line 301
    242.     iget-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mExpandedView:Lcom/android/systemui/statusbar/ExpandedView;
    243.  
    244.     invoke-virtual {v6, v8}, Lcom/android/systemui/statusbar/ExpandedView;->setVisibility(I)V
    245.  
    246.     .line 302
    247.     iget-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mOngoingTitle:Landroid/widget/TextView;
    248.  
    249.     invoke-virtual {v6, v8}, Landroid/widget/TextView;->setVisibility(I)V
    250.  
    251.     .line 303
    252.     iget-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mLatestTitle:Landroid/widget/TextView;
    253.  
    254.     invoke-virtual {v6, v8}, Landroid/widget/TextView;->setVisibility(I)V
    255.  
    256.     .line 305
    257.     new-instance v6, Lcom/android/systemui/statusbar/StatusBarService$MyTicker;
    258.  
    259.     invoke-direct {v6, p0, p1, v4}, Lcom/android/systemui/statusbar/StatusBarService$MyTicker;-><init>(Lcom/android/systemui/statusbar/StatusBarService;Landroid/content/Context;Lcom/android/systemui/statusbar/StatusBarView;)V
    260.  
    261.     iput-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mTicker:Lcom/android/systemui/statusbar/Ticker;
    262.  
    263.     .line 307
    264.     const v6, 0x7f09000d
    265.  
    266.     invoke-virtual {v4, v6}, Lcom/android/systemui/statusbar/StatusBarView;->findViewById(I)Landroid/view/View;
    267.  
    268.     move-result-object v5
    269.  
    270.     check-cast v5, Lcom/android/systemui/statusbar/TickerView;
    271.  
    272.     .line 308
    273.     .local v5, tickerView:Lcom/android/systemui/statusbar/TickerView;
    274.     iget-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mTicker:Lcom/android/systemui/statusbar/Ticker;
    275.  
    276.     iput-object v6, v5, Lcom/android/systemui/statusbar/TickerView;->mTicker:Lcom/android/systemui/statusbar/Ticker;
    277.  
    278.     .line 310
    279.     const v6, 0x7f030006
    280.  
    281.     invoke-static {p1, v6, v9}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
    282.  
    283.     move-result-object v6
    284.  
    285.     check-cast v6, Lcom/android/systemui/statusbar/TrackingView;
    286.  
    287.     iput-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mTrackingView:Lcom/android/systemui/statusbar/TrackingView;
    288.  
    289.     .line 311
    290.     iget-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mTrackingView:Lcom/android/systemui/statusbar/TrackingView;
    291.  
    292.     iput-object p0, v6, Lcom/android/systemui/statusbar/TrackingView;->mService:Lcom/android/systemui/statusbar/StatusBarService;
    293.  
    294.     .line 312
    295.     iget-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mTrackingView:Lcom/android/systemui/statusbar/TrackingView;
    296.  
    297.     const v7, 0x7f090019
    298.  
    299.     invoke-virtual {v6, v7}, Lcom/android/systemui/statusbar/TrackingView;->findViewById(I)Landroid/view/View;
    300.  
    301.     move-result-object v6
    302.  
    303.     check-cast v6, Lcom/android/systemui/statusbar/CloseDragHandle;
    304.  
    305.     iput-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mCloseView:Lcom/android/systemui/statusbar/CloseDragHandle;
    306.  
    307.     .line 313
    308.     iget-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mCloseView:Lcom/android/systemui/statusbar/CloseDragHandle;
    309.  
    310.     iput-object p0, v6, Lcom/android/systemui/statusbar/CloseDragHandle;->mService:Lcom/android/systemui/statusbar/StatusBarService;
    311.  
    312.     .line 315
    313.     const/high16 v6, 0x7f06
    314.  
    315.     invoke-virtual {v3, v6}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I
    316.  
    317.     move-result v6
    318.  
    319.     iput v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mEdgeBorder:I
    320.  
    321.     .line 318
    322.     invoke-direct {p0}, Lcom/android/systemui/statusbar/StatusBarService;->setAreThereNotifications()V
    323.  
    324.     .line 319
    325.     iget-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mDateView:Lcom/android/systemui/statusbar/DateView;
    326.  
    327.     const/4 v7, 0x4
    328.  
    329.     invoke-virtual {v6, v7}, Lcom/android/systemui/statusbar/DateView;->setVisibility(I)V
    330.  
    331.     .line 322
    332.     new-instance v2, Landroid/content/IntentFilter;
    333.  
    334.     invoke-direct {v2}, Landroid/content/IntentFilter;-><init>()V
    335.  
    336.     .line 323
    337.     .local v2, filter:Landroid/content/IntentFilter;
    338.     const-string v6, "android.intent.action.CONFIGURATION_CHANGED"
    339.  
    340.     invoke-virtual {v2, v6}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V
    341.  
    342.     .line 324
    343.     const-string v6, "android.intent.action.CLOSE_SYSTEM_DIALOGS"
    344.  
    345.     invoke-virtual {v2, v6}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V
    346.  
    347.     .line 325
    348.     const-string v6, "android.intent.action.SCREEN_OFF"
    349.  
    350.     invoke-virtual {v2, v6}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V
    351.  
    352.     .line 326
    353.     iget-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mBroadcastReceiver:Landroid/content/BroadcastReceiver;
    354.  
    355.     invoke-virtual {p1, v6, v2}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
    356.  
    357.     const v6, 0x7f030008
    358.  
    359.     invoke-static {p1, v6, v9}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
    360.  
    361.     move-result-object v5
    362.  
    363.     check-cast v5, Lcom/lidroid/systemui/quickpanel/PowerWidget;
    364.  
    365.     .local v5, qsv:Lcom/lidroid/systemui/quickpanel/PowerWidget;
    366.     invoke-virtual {v5}, Lcom/lidroid/systemui/quickpanel/PowerWidget;->setupWidget()V
    367.  
    368.     iget-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mExpandedView:Lcom/android/systemui/statusbar/ExpandedView;
    369.  
    370.     invoke-virtual {v6, v5, v11}, Lcom/android/systemui/statusbar/ExpandedView;->addView(Landroid/view/View;I)V
    371.  
    372.     .line 327
    373.     return-void
    374. .end method
    Save the file and close it

    5. Now go up into /systemui/smali/... drag and drop the file labeled "lidroid_1" into this location and remove the "_1" at the end of the file name...

    Now go into com and place the file labeled "lidroid_2" place it into this location... like before erase the "_2" found at the end of the file name

    Now we are pretty much done with the smali coding... there is still more to do but not quite yet...

    6. Now back out and go into the res folder and go into the folder labeled "layout"... grab the three power widget xmls out of my zip and move them here

    7. Back out of "layout and go into the folder labeled "Values"... and first open the ids.xml... copy and paste the below code in between the last entry and </resources> and save the file

    Code (Text):
    1.  
    2.     <item type="id" name="power_widget_button">false</item>
    3.     <item type="id" name="power_widget_button_image">false</item>
    4.     <item type="id" name="power_widget_button_text">false</item>
    5.     <item type="id" name="power_widget_button_indic">false</item>
    6.  
    8. This step by far is the longest and most interactive... go into public.xml and scroll down to the last entry labeled like this <public type="drawable"... go under it and copy and paste these entries directly under it

    Code (Text):
    1.  
    2.     <public type="drawable" name="stat_2g3g_off" id="0x7f020174" />
    3.     <public type="drawable" name="stat_2g3g_on" id="0x7f020175" />
    4.     <public type="drawable" name="stat_3g_on" id="0x7f020176" />
    5.     <public type="drawable" name="stat_airplane_off" id="0x7f020177" />
    6.     <public type="drawable" name="stat_airplane_on" id="0x7f020178" />
    7.     <public type="drawable" name="stat_bluetooth_off" id="0x7f020179" />
    8.     <public type="drawable" name="stat_bluetooth_on" id="0x7f02017a" />
    9.     <public type="drawable" name="stat_brightness_auto" id="0x7f02017b" />
    10.     <public type="drawable" name="stat_brightness_mid" id="0x7f02017c" />
    11.     <public type="drawable" name="stat_brightness_off" id="0x7f02017d" />
    12.     <public type="drawable" name="stat_brightness_on" id="0x7f02017e" />
    13.     <public type="drawable" name="stat_data_off" id="0x7f02017f" />
    14.     <public type="drawable" name="stat_data_on" id="0x7f020180" />
    15.     <public type="drawable" name="stat_flashlight_off" id="0x7f020181" />
    16.     <public type="drawable" name="stat_flashlight_on" id="0x7f020182" />
    17.     <public type="drawable" name="stat_gps_off" id="0x7f020183" />
    18.     <public type="drawable" name="stat_gps_on" id="0x7f020184" />
    19.     <public type="drawable" name="stat_ing_off" id="0x7f020185" />
    20.     <public type="drawable" name="stat_lock_screen_off" id="0x7f020186" />
    21.     <public type="drawable" name="stat_lock_screen_on" id="0x7f020187" />
    22.     <public type="drawable" name="stat_orientation_off" id="0x7f020188" />
    23.     <public type="drawable" name="stat_orientation_on" id="0x7f020189" />
    24.     <public type="drawable" name="stat_ring_on" id="0x7f02018a" />
    25.     <public type="drawable" name="stat_screen_timeout_off" id="0x7f02018b" />
    26.     <public type="drawable" name="stat_screen_timeout_on" id="0x7f02018c" />
    27.     <public type="drawable" name="stat_silent" id="0x7f02018d" />
    28.     <public type="drawable" name="stat_sleep" id="0x7f02018e" />
    29.     <public type="drawable" name="stat_sync_off" id="0x7f02018f" />
    30.     <public type="drawable" name="stat_sync_on" id="0x7f020190" />
    31.     <public type="drawable" name="stat_vibrate_off" id="0x7f020196" />
    32.     <public type="drawable" name="stat_vibrate_on" id="0x7f020197" />
    33.     <public type="drawable" name="stat_wifi_ap_off" id="0x7f020198" />
    34.     <public type="drawable" name="stat_wifi_ap_on" id="0x7f020199" />
    35.     <public type="drawable" name="stat_wifi_off" id="0x7f02019a" />
    36.     <public type="drawable" name="stat_wifi_on" id="0x7f02019b" />
    37.     <public type="drawable" name="stat_bg_ing" id="0x7f020191" />
    38.     <public type="drawable" name="stat_bg_off" id="0x7f020192" />
    39.     <public type="drawable" name="stat_bg_on" id="0x7f020193" />
    40.     <public type="drawable" name="stat_power_bg" id="0x7f020194" />
    41.     <public type="drawable" name="stat_ring_vibrate_on" id="0x7f020195" />
    42.  
    Here goes the time consuming part... do you see where it says id="0x********"? This a unique identifier that is used to identify the entries in the smali code... and the id must be unique or you will not be able to compile properly... so you must change all of the above ids to ones that arent specified yet in the xml... you must find the last hexadecimal number already under use in the "drawable" section... mine was 0x7f020173... so I started numbering mine at 0x7f020174... not all of the entries in the xml are in order so you will have to manually find the last number used...

    After you have correctly labeled each entry scroll down to the last entry labeled like this <public type="layout" and go under it and copy and paste this

    Code (Text):
    1.  
    2.     <public type="layout" name="power_widget_button" id="0x7f030007" />
    3.     <public type="layout" name="power_widget_layout" id="0x7f030008" />
    4.     <public type="layout" name="power_widget_scrollview" id="0x7f030009" />
    5.  

    Once again... make sure the new entries have unique ids... there should only be a few entries in the layout section so it should be easier this go around..


    Once you are done scroll down to the last entry labeled like this <public type="string" and copy and past this code directly under it

    Code (Text):
    1.  
    2.     <public type="string" name="quickpanel_wifi_text" id="0x7f070013" />
    3.     <public type="string" name="quickpanel_dc_text" id="0x7f070014" />
    4.     <public type="string" name="quickpanel_network_mode_text" id="0x7f070015" />
    5.     <public type="string" name="quickpanel_sound_text" id="0x7f070016" />
    6.     <public type="string" name="quickpanel_sound_vibration_text" id="0x7f070017" />
    7.     <public type="string" name="quickpanel_silent_text" id="0x7f070018" />
    8.     <public type="string" name="quickpanel_vibration_text" id="0x7f070019" />
    9.     <public type="string" name="quickpanel_rotation_text" id="0x7f07001a" />
    10.     <public type="string" name="quickpanel_bluetooth_text" id="0x7f07001b" />
    11.     <public type="string" name="quickpanel_gps_text" id="0x7f07001c" />
    12.     <public type="string" name="quickpanel_autosync_text" id="0x7f07001d" />
    13.     <public type="string" name="quickpanel_brightness_text" id="0x7f07001e" />
    14.     <public type="string" name="quickpanel_airplane_text" id="0x7f07001f" />
    15.  
    Again... give each new entry a unique id

    Scroll down to the bottom of the xml and look at the last entry labeled <public type="id" and copy and paste this code

    Code (Text):
    1.  
    2.     <public type="id" name="power_widget_button" id="0x7f09001a" />
    3.     <public type="id" name="power_widget_button_image" id="0x7f09001b" />
    4.     <public type="id" name="power_widget_button_text" id="0x7f09001c" />
    5.     <public type="id" name="power_widget_button_indic" id="0x7f09001d" />
    6.  
    Now... you still there? guess what... YOU FINISHED STEP 8!!!!!!!! XDXDXDXDXD Ready for step 9? Yes(scroll down) No(Press the big red X on the top right of your screen) Maybe (Save all of your work... take a nap and come back later) lol...

    9. Keep the public.xml open and back out of the res folder and go into /systemui/smali/com/lidroid/systemui/quickpanel/ and keep the folder open...

    This step involves telling the code which icons to use for the notification toggles... if you dont do this step you will probably end up with battery icons for the toggles the same way I did... =/

    Inside of the zip that you downloaded earlier you will see a file named "ID_Values"... open it... In an attempt to make this as noob friendly I have replaced all of the hexadecimal ids in the smali with text which corresponds to which id you should use and specified which smali file they are located in... look at the first part of the xml... you should see

    AirplaneButton.smali
    stat_airplane_off = Airplane_off
    stat_airplane_on = Airplane_on

    What this means is that inside of the AirplaneButton.smali file I have inserted Airplane_off and Airplane_on and that they correspond to stat_airplane_off and stat_airplane_on in the public.xml.

    What you must do is search for the text on the right of the equal sign in the smali file... once found go into the public.xml and search for the text on the left of the equal sign and copy its hexadecimal id into the smali file over the text... if you didnt understand I will show you what I mean...


    If in my public.xml I had this

    Code (Text):
    1. <public type="drawable" name="stat_airplane_on" id="0x00000000" />
    2.  
    then I would copy 0x00000000 and paste it over Airplane_on...

    your end result should now look like this

    Code (Text):
    1. .line 24
    2.     const v0, 0x00000000
    3.  
    Instead of

    Code (Text):
    1.  
    2. .line 24
    3.     const v0, Airplane_on
    4.  
    Now... got that? you must do this for every entry that I specified in "ID_Values" after you are done you may move on to the next step

    10.Now hang in there... you're almost there... open strings.xml and copy and paste this code under the last entry

    Code (Text):
    1.  
    2.     <string name="quickpanel_wifi_text" />
    3.     <string name="quickpanel_dc_text" />
    4.     <string name="quickpanel_network_mode_text" />
    5.     <string name="quickpanel_sound_text" />
    6.     <string name="quickpanel_sound_vibration_text" />
    7.     <string name="quickpanel_silent_text" />
    8.     <string name="quickpanel_vibration_text" />
    9.     <string name="quickpanel_rotation_text" />
    10.     <string name="quickpanel_bluetooth_text" />
    11.     <string name="quickpanel_gps_text" />
    12.     <string name="quickpanel_autosync_text" />
    13.     <string name="quickpanel_brightness_text" />
    14.     <string name="quickpanel_airplane_text" />
    15.  
    save and exit the file


    11. Welcome to the last step... which should be simple enough... extract the zip file named icons located inside of the zip I created and place each png into /systemui/res/drawable-hdpi... and VOILA!!! compile your now modified apk... for any compile errors you receive please notify me in this thread so I can assist you.

    Advertisement
    downthemachine and Prinny like this.
  2. downthemachine

    downthemachine Developer Incognito VIP Member

    Its official, that is the longest post ever! Thanks for the tut!
  3. jetx2x

    jetx2x Well-Known Member Developer

    Haha... yeah... I dont know if everything is correct though... I need a tester to verify before I post it in all things root

    Sent from my N860 using Tapatalk 2 Beta-5

Share This Page