Post Reply

[GUIDE][SMALI] Custom Notification Drawer style for CM10/CM10.1/CM10.2/CM11

OP Adi Aisiteru Reborn

20th March 2014, 08:02 AM   |  #1  
Adi Aisiteru Reborn's Avatar
OP Senior Member
Flag Bandar Lampung
Thanks Meter: 4,478
 
1,649 posts
Join Date:Joined: Apr 2013
Guide for CyanogenMod 10/10.1/10.2/11


Hello again guys, I want to share to you smali Guide how to port with settings. custom Notification Drawer style.
credit to AOKP, Slimroms, Crdroid

ok lets go to Guide:
first of all need some requirement for this MOD-GUIDE

REQUIREMENT:
- BRAIN
- Patient
- experience
- Know how to decompile/recompiling Apk and JAR file
- notepad++
- Tool for decompiling, : apkmanager/apktool/Virtous/apkmultitools/ or else


Settings.apk
CM10/CM10.1/CM10.2/CM11

Decompile your settings.apk
- Download attached file and merge it to your decompiled Settings.apk
- Settings.apk\res\values\arrays.xml
add this lines to end of it before </resources>

Code:
<string-array name="adi_notification_wallpaper_entries">
        <item>@string/adi_notification_background_color_fill</item>
        <item>@string/adi_notification_background_custom_image</item>
        <item>@string/adi_notification_background_default_wallpaper</item>
    </string-array>
    <string-array name="adi_notification_wallpaper_values">
        <item>0</item>
        <item>1</item>
        <item>2</item>
    </string-array>
    <string-array name="adi_notification_wallpaper_landscape_entries">
        <item>@string/adi_notification_background_custom_image</item>
        <item>@string/adi_notification_background_default_wallpaper</item>
    </string-array>
    <string-array name="adi_notification_wallpaper_landscape_values">
        <item>0</item>
        <item>1</item>
    </string-array>
</resources>
- Settings.apk\res\values\ids.xml
add this lines to end of it before </resources>

Code:
<item type="id" name="adi_color_picker_view">false</item>
    <item type="id" name="adi_old_color_panel">false</item>
    <item type="id" name="adi_new_color_panel">false</item>
    <item type="id" name="adi_hex">false</item>
    <item type="id" name="adi_enter">false</item>
    <item type="id" name="adi_ics_color">false</item>
    <item type="id" name="adi_color_panel_view">false</item>
    <item type="id" name="monitor_box_adi">false</item>
    <item type="id" name="seek_bar_adi">false</item>
</resources>
- Settings.apk\res\values\strings.xml
add this lines to end of it before </resources>

Code:
<string name="adi_notification_wallpaper_title">Notification drawer background</string>
    <string name="adi_notification_wallpaper_landscape_title">Different landscape background</string>
    <string name="adi_notification_background_color_fill">Color fill</string>
    <string name="adi_notification_background_custom_image">Custom image</string>
    <string name="adi_notification_background_default_wallpaper">Default background</string>
    <string name="adi_dialog_color_picker">Color Picker</string>
    <string name="adi_press_color_to_apply">Press on Color to apply</string>
    <string name="adi_arrow_right">→</string>
    <string name="adi_arrow_down">↓</string>
    <string name="adi_hex">Hex:</string>
    <string name="adi_hex_hint">\#FF000000</string>
    <string name="adi_set">Set</string>
    <string name="adi_ics_color">Holo</string>
    <string name="adi_choose_color_title">Choose color</string>
    <string name="adi_notification_style_grouptitle">Style</string>
    <string name="adi_notification_style_title">Notification drawer style</string>
    <string name="adi_notification_style_summary">Change your notification drawer style</string>
    <string name="adi_notif_wallpaper_alpha_title">Notification background transparency</string>
    <string name="adi_notif_alpha_title">Notification Rows transparency</string>
</resources>
- Settings.apk\res\xml\display_settings.xml
put this line
Code:
<PreferenceScreen android:title="@string/adi_notification_style_title" android:key="notification_style" android:summary="@string/adi_notification_style_summary" android:fragment="com.android.settings.adi.NotificationDrawerStyle" />
Code:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen android:title="@string/display_settings"
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
    <PreferenceScreen android:title="@string/adi_notification_style_title" android:key="notification_style" android:summary="@string/adi_notification_style_summary" android:fragment="com.android.settings.adi.NotificationDrawerStyle" />
    <com.android.settings.BrightnessPreference android:title="@string/brightness" android:key="brightness" android:dialogTitle="@string/brightness" />
    <PreferenceScreen android:title="@string/backlight_title" android:key="backlight_widget" android:summary="@string/backlight_summary" android:fragment="com.android.settings.cyanogenmod.Backlight" />
    <PreferenceScreen android:title="@string/display_rotation_title" android:key="display_rotation" android:fragment="com.android.settings.cyanogenmod.DisplayRotation" />
    <CheckBoxPreference android:title="@string/accelerometer_title" android:key="accelerometer" />
    <ListPreference android:persistent="false" android:entries="@array/screen_timeout_entries" android:title="@string/screen_timeout" android:key="screen_timeout" android:summary="@string/screen_timeout_summary" android:entryValues="@array/screen_timeout_values" />
    <PreferenceScreen android:title="@string/screensaver_settings_title" android:key="screensaver" android:fragment="com.android.settings.DreamSettings" />
    <PreferenceScreen android:title="@string/notification_pulse_title" android:key="notification_pulse" android:fragment="com.android.settings.notificationlight.NotificationLightSettings" />
    <PreferenceScreen android:title="@string/battery_light_title" android:key="battery_light" android:fragment="com.android.settings.notificationlight.BatteryLightSettings" />
    <PreferenceCategory android:title="@string/display_category_wakeup_options_title" android:key="category_wakeup_options" />
    <CheckBoxPreference android:title="@string/pref_volume_wake_title" android:key="pref_volume_wake" android:summary="@string/pref_volume_wake_summary" android:defaultValue="false" />
</PreferenceScreen>
but you can put the line whereever you like,.system_settings.xml/system_ui_settings.xml/notification_drawer.xml
/etc..

- Recompile your Settings.apk

- Decompile the newly recompiled APK again
go to your secondly decompiled Settings.apk\res\values\public.xml
search for all this lines :

Code:
<public type="layout" name="adi_dialog_color_picker" id="0x7f??????" />

<public type="layout" name="adi_slider_preference" id="0x7f??????" />

<public type="xml" name="adi_notification_drawer_style" id="0x7f??????" />

<public type="string" name="adi_notification_wallpaper_title" id="0x7f??????" />

<public type="string" name="adi_notification_wallpaper_landscape_title" id="0x7f??????" />

<public type="string" name="adi_notification_background_color_fill" id="0x7f??????" />

<public type="string" name="adi_notification_background_custom_image" id="0x7f??????" />

<public type="string" name="adi_notification_background_default_wallpaper" id="0x7f??????" />

<public type="string" name="adi_dialog_color_picker" id="0x7f??????" />

<public type="string" name="adi_press_color_to_apply" id="0x7f??????" />

<public type="string" name="adi_arrow_right" id="0x7f??????" />

<public type="string" name="adi_arrow_down" id="0x7f??????" />

<public type="string" name="adi_hex" id="0x7f??????" />

<public type="string" name="adi_hex_hint" id="0x7f??????" />

<public type="string" name="adi_set" id="0x7f??????" />

<public type="string" name="adi_ics_color" id="0x7f??????" />

<public type="string" name="adi_choose_color_title" id="0x7f??????" />

<public type="string" name="adi_notification_style_grouptitle" id="0x7f??????" />

<public type="string" name="adi_notification_style_title" id="0x7f??????" />

<public type="string" name="adi_notification_style_summary" id="0x7f??????" />

<public type="string" name="adi_notif_wallpaper_alpha_title" id="0x7f??????" />

<public type="string" name="adi_notif_alpha_title" id="0x7f??????" />

<public type="array" name="adi_notification_wallpaper_entries" id="0x7f??????" />

<public type="array" name="adi_notification_wallpaper_values" id="0x7f??????" />

<public type="array" name="adi_notification_wallpaper_landscape_entries" id="0x7f??????" />

<public type="array" name="adi_notification_wallpaper_landscape_values" id="0x7f??????" />

<public type="id" name="adi_color_picker_view" id="0x7f??????" />

<public type="id" name="adi_old_color_panel" id="0x7f??????" />

<public type="id" name="adi_new_color_panel" id="0x7f??????" />

<public type="id" name="adi_hex" id="0x7f??????" />

<public type="id" name="adi_enter" id="0x7f??????" />

<public type="id" name="adi_ics_color" id="0x7f??????" />

<public type="id" name="adi_color_panel_view" id="0x7f??????" />

<public type="string" name="ok" id="0x7f??????" />

 <public type="string" name="cancel" id="0x7f??????" />
Pay attention to this 0x7f?????? !!!



- Settings.apk\smali\net\margaritov\preference\color picker\ColorPickerDialog.smali
search this -> const v2, 0x7f040095
1. change this -> 0x7f040095 , according to the value you got in your own public.xml
Code:
<public type="layout" name="adi_dialog_color_picker" id="0x7f??????" />
do it too to all lines below, in the smali

2. const v2, 0x7f0708ed
Code:
<public type="string" name="adi_dialog_color_picker" id="0x7f??????" />
3. const v2, 0x7f0a0233
Code:
<public type="id" name="adi_color_picker_view" id="0x7f??????" />
4. const v2, 0x7f0a0234
Code:
<public type="id" name="adi_old_color_panel" id="0x7f??????" />
5. const v2, 0x7f0a0235
Code:
<public type="id" name="adi_new_color_panel" id="0x7f??????" />
6. const v2, 0x7f0a0236
Code:
<public type="id" name="adi_hex" id="0x7f??????" />
7. const v2, 0x7f0a0237
Code:
<public type="id" name="adi_enter" id="0x7f??????" />
8. const v2, 0x7f0a0238
Code:
<public type="id" name="adi_ics_color" id="0x7f??????" />
9. const v1, 0x7f0a0235
Code:
<public type="id" name="adi_new_color_panel" id="0x7f??????" />

- Settings.apk\smali\com\android\settings\adi\ SeekBarPreference.smali
search this -> const v4, 0x7f040096

1. change this -> 0x7f040096, according to the value you got in your own public.xml
Code:
<public type="layout" name="adi_slider_preference" id="0x7f??????" />
do it too to all lines below, in the smali

2. const v3, 0x7f0a023a
Code:
<public type="id" name="monitor_box_adi" id="0x7f??????" />
3. const v3, 0x7f0a023b
Code:
<public type="id" name="seek_bar_adi" id="0x7f??????" />


- Settings.apk\smali\com\android\settings\adi\ NotificationDrawerStyle.smali
search this -> const v0, 0x7f0708ec

1. change this -> 0x7f0708ec, according to the value you got in your own public.xml
Code:
<public type="string" name="adi_notification_background_default_wallpaper" id="0x7f??????" />
do it too to all lines below, in the smali

2. const v0, 0x7f0708ec
Code:
<public type="string" name="adi_notification_background_default_wallpaper" id="0x7f??????" />
3. const v0, 0x7f0708eb
Code:
<public type="string" name="adi_notification_background_custom_image" id="0x7f??????" />
4. const v0, 0x7f0708ea
Code:
<public type="string" name="adi_notification_background_color_fill" id="0x7f??????" />
5. const v0, 0x7f0708eb
Code:
<public type="string" name="adi_notification_background_custom_image" id="0x7f??????" />
6. const v4, 0x7f05005c
Code:
<public type="xml" name="adi_notification_drawer_style" id="0x7f??????" />
7. const v18, 0x7f0708f5
Code:
<public type="string" name="adi_choose_color_title" id="0x7f??????" />
8. const v18, 0x7f0708a6
Code:
<public type="string" name="ok" id="0x7f??????" />
9. const v18, 0x7f0700ec
Code:
<public type="string" name="cancel" id="0x7f??????" />
- Done and recompile it, push to you system/app, or system/priv-app
Attached Thumbnails
Click image for larger version

Name:	Screenshot_2014-03-20-14-05-39.png
Views:	2398
Size:	70.5 KB
ID:	2640032   Click image for larger version

Name:	Screenshot_2014-03-20-14-05-48.png
Views:	1696
Size:	52.3 KB
ID:	2640033   Click image for larger version

Name:	Screenshot_2014-03-20-14-05-57.png
Views:	1388
Size:	56.7 KB
ID:	2640034   Click image for larger version

Name:	Screenshot_2014-03-20-14-06-04.png
Views:	1166
Size:	43.5 KB
ID:	2640035  
Attached Files
File Type: zip Notification-Drawer-Style-Settings.apk.zip - [Click for QR Code] (35.7 KB, 976 views)
Last edited by Adi Aisiteru Reborn; 20th March 2014 at 08:07 AM.
The Following 16 Users Say Thank You to Adi Aisiteru Reborn For This Useful Post: [ View ]
20th March 2014, 08:03 AM   |  #2  
Adi Aisiteru Reborn's Avatar
OP Senior Member
Flag Bandar Lampung
Thanks Meter: 4,478
 
1,649 posts
Join Date:Joined: Apr 2013
CyanogenMod 10 only !

SystemUI.apk

CyanogenMod 10/JB 4.1.2

- Decompile your CM-10 SystemUI.apk

Download attached file and merge to your decompiled SystemUI.apk

- SystemUI.apk\res\layout\status_bar_expanded_header .xml
change this :
Code:
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:background="@drawable/notification_header_bg" android:layout_width="fill_parent" android:layout_height="wrap_content" android:baselineAligned="false"
to like this :
Code:
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:background="#ff000000" android:layout_width="fill_parent" android:layout_height="wrap_content" android:baselineAligned="false"
- SystemUI.apk\res\layout\status_bar_expanded.xml
add the red line
Code:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout android:id="@id/notification_panel" android:background="@drawable/notification_panel_bg" android:paddingTop="@dimen/notification_panel_padding_top" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginLeft="@dimen/notification_panel_margin_left"
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
    <com.android.systemui.statusbar.phone.NotificationWallpaper android:id="@id/notification_wallpaper" android:layout_width="fill_parent" android:layout_height="fill_parent" />
    <TextView android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Network" android:gravity="center" android:layout_gravity="bottom" android:id="@id/carrier_label" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="@dimen/carrier_label_height" android:layout_marginBottom="@dimen/close_handle_height" />
    <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginBottom="@dimen/close_handle_underlap">
        <include android:layout_width="fill_parent" android:layout_height="@dimen/notification_panel_header_height" layout="@layout/status_bar_expanded_header" />
        <com.android.systemui.statusbar.powerwidget.PowerWidget android:id="@id/exp_power_stat" android:layout_width="fill_parent" android:layout_height="@dimen/notification_panel_widget_height" />
        <TextView android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Network.EmergencyOnly" android:gravity="center" android:id="@id/emergency_calls_only" android:paddingBottom="4.0dip" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="wrap_content" />
        <ScrollView android:id="@id/scroll" android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="fill_parent" android:overScrollMode="always">
            <com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/latestItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/notification_row_min_height" />
        </ScrollView>
    </LinearLayout>
    <com.android.systemui.statusbar.phone.CloseDragHandle android:layout_gravity="bottom" android:orientation="vertical" android:id="@id/close" android:layout_width="fill_parent" android:layout_height="@dimen/close_handle_height">
        <ImageView android:layout_gravity="bottom" android:layout_width="fill_parent" android:layout_height="@dimen/close_handle_height" android:src="@drawable/status_bar_close" android:scaleType="fitXY" />
    </com.android.systemui.statusbar.phone.CloseDragHandle>
</FrameLayout>
- SystemUI.apk\res\values\ids.xml
add this line to end of it before </resources>
Code:
<item type="id" name="notification_wallpaper">false</item>
</resources>
- SystemUI.apk\res\values\public.xml
seacrh for this line
Code:
<public type="drawable" name="notification_panel_bg" id="0x7f??????" />
and pay attention to 0x7f??????

- SystemUI.apk\smali\com\android\systemui\statusbar\ phone\PhoneStatusBar.smali
add the red line

Code:
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/android/systemui/statusbar/phone/PhoneStatusBar$AdiObserver;,
        Lcom/android/systemui/statusbar/phone/PhoneStatusBar$FastColorDrawable;,
        Lcom/android/systemui/statusbar/phone/PhoneStatusBar$MyTicker;,
        Lcom/android/systemui/statusbar/phone/PhoneStatusBar$H;,
        Lcom/android/systemui/statusbar/phone/PhoneStatusBar$SettingsObserver;


Code:
new-instance v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$29;

    invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$29;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V

    iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStartTracing:Ljava/lang/Runnable;

    .line 2759
    new-instance v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$30;

    invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$30;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V

    iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStopTracing:Ljava/lang/Runnable;

    .line 2847
    return-void
.end method

.method static synthetic access$98000(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V
    .locals 0
    .parameter "x0"

    .prologue
    .line 125
    invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setNotificationsTransparency()V

    return-void
.end method

.method static synthetic access$99000(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V
    .locals 0
    .parameter "x0"

    .prologue
    .line 125
    invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setNotificationWallpaperHelper()V

    return-void
.end method

.method static synthetic access$000(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;I)V
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 116
    invoke-direct {p0, p1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->adjustBrightness(I)V

    return-void
.end method
Code:
.method private loadNotificationShade()V
    .locals 12

    .prologue
    .line 1009
    iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPile:Lcom/android/systemui/statusbar/policy/NotificationRowLayout;

    if-nez v10, :cond_0

    .line 1044
    :goto_0
    return-void

    .line 1011
    :cond_0
    iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationData:Lcom/android/systemui/statusbar/NotificationData;

    invoke-virtual {v10}, Lcom/android/systemui/statusbar/NotificationData;->size()I

    move-result v0

    .line 1013
    .local v0, N:I
    new-instance v8, Ljava/util/ArrayList;

    invoke-direct {v8}, Ljava/util/ArrayList;-><init>()V

    .line 1015
    .local v8, toShow:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Landroid/view/View;>;"
    invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->isDeviceProvisioned()Z

    move-result v5

    .line 1017
    .local v5, provisioned:Z
    const/4 v3, 0x0

    .local v3, i:I
    :goto_1
    if-ge v3, v0, :cond_3

    .line 1018
    iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationData:Lcom/android/systemui/statusbar/NotificationData;

    sub-int v11, v0, v3

    add-int/lit8 v11, v11, -0x1

    invoke-virtual {v10, v11}, Lcom/android/systemui/statusbar/NotificationData;->get(I)Lcom/android/systemui/statusbar/NotificationData$Entry;

    move-result-object v2

    .line 1019
    .local v2, ent:Lcom/android/systemui/statusbar/NotificationData$Entry;
    if-nez v5, :cond_1

    iget-object v10, v2, Lcom/android/systemui/statusbar/NotificationData$Entry;->notification:Lcom/android/internal/statusbar/StatusBarNotification;

    invoke-virtual {p0, v10}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->showNotificationEvenIfUnprovisioned(Lcom/android/internal/statusbar/StatusBarNotification;)Z

    move-result v10

    if-eqz v10, :cond_2

    .line 1020
    :cond_1
    iget-object v10, v2, Lcom/android/systemui/statusbar/NotificationData$Entry;->row:Landroid/view/View;

    invoke-virtual {v8, v10}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 1017
    :cond_2
    add-int/lit8 v3, v3, 0x1

    goto :goto_1

    .line 1024
    .end local v2           #ent:Lcom/android/systemui/statusbar/NotificationData$Entry;
    :cond_3
    new-instance v7, Ljava/util/ArrayList;

    invoke-direct {v7}, Ljava/util/ArrayList;-><init>()V

    .line 1025
    .local v7, toRemove:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Landroid/view/View;>;"
    const/4 v3, 0x0

    :goto_2
    iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPile:Lcom/android/systemui/statusbar/policy/NotificationRowLayout;

    invoke-virtual {v10}, Lcom/android/systemui/statusbar/policy/NotificationRowLayout;->getChildCount()I

    move-result v10

    if-ge v3, v10, :cond_5

    .line 1026
    iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPile:Lcom/android/systemui/statusbar/policy/NotificationRowLayout;

    invoke-virtual {v10, v3}, Lcom/android/systemui/statusbar/policy/NotificationRowLayout;->getChildAt(I)Landroid/view/View;

    move-result-object v1

    .line 1027
    .local v1, child:Landroid/view/View;
    invoke-virtual {v8, v1}, Ljava/util/ArrayList;->contains(Ljava/lang/Object;)Z

    move-result v10

    if-nez v10, :cond_4

    .line 1028
    invoke-virtual {v7, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 1025
    :cond_4
    add-int/lit8 v3, v3, 0x1

    goto :goto_2

    .line 1032
    .end local v1           #child:Landroid/view/View;
    :cond_5
    invoke-virtual {v7}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v4

    .local v4, i$:Ljava/util/Iterator;
    :goto_3
    invoke-interface {v4}, Ljava/util/Iterator;->hasNext()Z

    move-result v10

    if-eqz v10, :cond_6

    invoke-interface {v4}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v6

    check-cast v6, Landroid/view/View;

    .line 1033
    .local v6, remove:Landroid/view/View;
    iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPile:Lcom/android/systemui/statusbar/policy/NotificationRowLayout;

    invoke-virtual {v10, v6}, Lcom/android/systemui/statusbar/policy/NotificationRowLayout;->removeView(Landroid/view/View;)V

    goto :goto_3

    .line 1036
    .end local v6           #remove:Landroid/view/View;
    :cond_6
  invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setNotificationsTransparency()V

    const/4 v3, 0x0

    :goto_4
    invoke-virtual {v8}, Ljava/util/ArrayList;->size()I

    move-result v10

    if-ge v3, v10, :cond_8

    .line 1037
    invoke-virtual {v8, v3}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v9

    check-cast v9, Landroid/view/View;

    .line 1038
    .local v9, v:Landroid/view/View;
    invoke-virtual {v9}, Landroid/view/View;->getParent()Landroid/view/ViewParent;

    move-result-object v10

    if-nez v10, :cond_7

    .line 1039
    iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPile:Lcom/android/systemui/statusbar/policy/NotificationRowLayout;

    invoke-virtual {v10, v9, v3}, Lcom/android/systemui/statusbar/policy/NotificationRowLayout;->addView(Landroid/view/View;I)V

    .line 1036
    :cond_7
    add-int/lit8 v3, v3, 0x1

    goto :goto_4

    .line 1043
    .end local v9           #v:Landroid/view/View;
    :cond_8
    iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSettingsButton:Landroid/view/View;

    invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->isDeviceProvisioned()Z

    move-result v11

    invoke-virtual {v10, v11}, Landroid/view/View;->setEnabled(Z)V

    goto/16 :goto_0
.end method

Code:
.method private setIntruderAlertVisibility(Z)V
    .locals 0
    .parameter "vis"

    .prologue
    .line 2569
    return-void
.end method

.method private setNotificationWallpaperHelper()V
    .locals 5

    .prologue
    .line 2948
    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;

    invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    const-string v1, "notif_wallpaper_alpha"

    const/4 v2, 0x0

    invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getFloat(Landroid/content/ContentResolver;Ljava/lang/String;F)F

    move-result v0

    .line 2949
    iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;

    invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v1

    const-string v2, "notification_background"

    invoke-static {v1, v2}, Landroid/provider/Settings$System;->getString(Landroid/content/ContentResolver;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    .line 2950
    new-instance v2, Ljava/io/File;

    const-string v3, "/data/data/com.android.settings/files/notification_wallpaper.jpg"

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

    .line 2951
    iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationPanel:Landroid/view/View;

    const/4 v4, 0x0

    invoke-virtual {v3, v4}, Landroid/view/View;->setBackgroundResource(I)V

    .line 2952
    invoke-virtual {v2}, Ljava/io/File;->exists()Z

    move-result v2

    if-nez v2, :cond_1

    .line 2953
    iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationPanel:Landroid/view/View;

    const v3, 0x7f02004d

    invoke-virtual {v2, v3}, Landroid/view/View;->setBackgroundResource(I)V

    .line 2954
    iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationPanel:Landroid/view/View;

    invoke-virtual {v2}, Landroid/view/View;->getBackground()Landroid/graphics/drawable/Drawable;

    move-result-object v2

    .line 2955
    if-eqz v1, :cond_0

    invoke-virtual {v1}, Ljava/lang/String;->isEmpty()Z

    move-result v3

    if-nez v3, :cond_0

    .line 2956
    const/4 v3, 0x0

    invoke-virtual {v2, v3}, Landroid/graphics/drawable/Drawable;->setColorFilter(Landroid/graphics/ColorFilter;)V

    .line 2957
    invoke-static {v1}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v1

    sget-object v3, Landroid/graphics/PorterDuff$Mode;->SRC_ATOP:Landroid/graphics/PorterDuff$Mode;

    invoke-virtual {v2, v1, v3}, Landroid/graphics/drawable/Drawable;->setColorFilter(ILandroid/graphics/PorterDuff$Mode;)V

    .line 2959
    :cond_0
    const/high16 v1, 0x3f80

    sub-float v0, v1, v0

    const/high16 v1, 0x437f

    mul-float/2addr v0, v1

    float-to-int v0, v0

    invoke-virtual {v2, v0}, Landroid/graphics/drawable/Drawable;->setAlpha(I)V

    .line 2961
    :cond_1
    return-void
.end method

.method private setNotificationsTransparency()V
    .locals 8

    .prologue
    const/high16 v7, 0x437f

    const/high16 v6, 0x3f80

    .line 2965
    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;

    invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    const-string v1, "notif_alpha"

    const/4 v2, 0x0

    invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getFloat(Landroid/content/ContentResolver;Ljava/lang/String;F)F

    move-result v1

    .line 2966
    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPile:Lcom/android/systemui/statusbar/policy/NotificationRowLayout;

    if-eqz v0, :cond_2

    .line 2967
    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationData:Lcom/android/systemui/statusbar/NotificationData;

    invoke-virtual {v0}, Lcom/android/systemui/statusbar/NotificationData;->size()I

    move-result v2

    .line 2968
    const/4 v0, 0x0

    :goto_0
    if-ge v0, v2, :cond_2

    .line 2969
    iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationData:Lcom/android/systemui/statusbar/NotificationData;

    sub-int v4, v2, v0

    add-int/lit8 v4, v4, -0x1

    invoke-virtual {v3, v4}, Lcom/android/systemui/statusbar/NotificationData;->get(I)Lcom/android/systemui/statusbar/NotificationData$Entry;

    move-result-object v3

    .line 2970
    iget-object v4, v3, Lcom/android/systemui/statusbar/NotificationData$Entry;->expanded:Landroid/view/View;

    .line 2971
    if-eqz v4, :cond_0

    invoke-virtual {v4}, Landroid/view/View;->getBackground()Landroid/graphics/drawable/Drawable;

    move-result-object v5

    if-eqz v5, :cond_0

    invoke-virtual {v4}, Landroid/view/View;->getBackground()Landroid/graphics/drawable/Drawable;

    move-result-object v4

    sub-float v5, v6, v1

    mul-float/2addr v5, v7

    float-to-int v5, v5

    invoke-virtual {v4, v5}, Landroid/graphics/drawable/Drawable;->setAlpha(I)V

    .line 2972
    :cond_0
    invoke-virtual {v3}, Lcom/android/systemui/statusbar/NotificationData$Entry;->getLargeView()Landroid/view/View;

    move-result-object v3

    .line 2973
    if-eqz v3, :cond_1

    invoke-virtual {v3}, Landroid/view/View;->getBackground()Landroid/graphics/drawable/Drawable;

    move-result-object v4

    if-eqz v4, :cond_1

    invoke-virtual {v3}, Landroid/view/View;->getBackground()Landroid/graphics/drawable/Drawable;

    move-result-object v3

    sub-float v4, v6, v1

    mul-float/2addr v4, v7

    float-to-int v4, v4

    invoke-virtual {v3, v4}, Landroid/graphics/drawable/Drawable;->setAlpha(I)V

    .line 2968
    :cond_1
    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    .line 2976
    :cond_2
    return-void
.end method

.method private setPileLayers(I)V
    .locals 14
    .parameter "layerType"

    .prologue
    .line 1593
    iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPile:Lcom/android/systemui/statusbar/policy/NotificationRowLayout;

    invoke-virtual {v9}, Lcom/android/systemui/statusbar/policy/NotificationRowLayout;->getChildCount()I

    move-result v2

    .line 1595
    .local v2, count:I
    packed-switch p1, :pswitch_data_0
change this 0x7f02004d, according to the value you got in your own public.aml
<public type="drawable" name="notification_panel_bg" id="0x7f??????" />



Code:
 const-string v1, "android.intent.action.CLOSE_SYSTEM_DIALOGS"

    invoke-virtual {v0, v1}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V

    .line 655
    const-string v1, "android.intent.action.SCREEN_OFF"

    invoke-virtual {v0, v1}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V

    .line 656
    iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBroadcastReceiver:Landroid/content/BroadcastReceiver;

    invoke-virtual {v3, v1, v0}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

    .line 658
    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/android/systemui/statusbar/powerwidget/PowerWidget;

    invoke-virtual {v0}, Lcom/android/systemui/statusbar/powerwidget/PowerWidget;->setupWidget()V

    new-instance v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$AdiObserver;

    new-instance v1, Landroid/os/Handler;

    invoke-direct {v1}, Landroid/os/Handler;-><init>()V

    invoke-direct {v0, p0, v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$AdiObserver;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;Landroid/os/Handler;)V

    invoke-virtual {v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$AdiObserver;->observe()V

    .line 660
    invoke-static {}, Landroid/view/VelocityTracker;->obtain()Landroid/view/VelocityTracker;

    move-result-object v0

    iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mVelocityTracker:Landroid/view/VelocityTracker;

    .line 662
    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;

- -SystemUI.apk\smali\com\android\systemui\statusbar\ phone\PhoneStatusBar$FastColorDrawable.smali

change the red line
Code:
# virtual methods
.method public draw(Landroid/graphics/Canvas;)V
    .locals 2
    .parameter "canvas"

    .prologue
    .line 2856
   iget v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$FastColorDrawable;->mColor:I

    sget-object v1, Landroid/graphics/PorterDuff$Mode;->SRC:Landroid/graphics/PorterDuff$Mode;

    invoke-virtual {p1, v0, v1}, Landroid/graphics/Canvas;->drawColor(ILandroid/graphics/PorterDuff$Mode;)V

    .line 2857
    return-void
.end method
to like this

Code:
# virtual methods
.method public draw(Landroid/graphics/Canvas;)V
    .locals 2
    .parameter "canvas"

    .prologue
    .line 2856
    const v0, -0x28000000

    sget-object v1, Landroid/graphics/PorterDuff$Mode;->SRC:Landroid/graphics/PorterDuff$Mode;

    invoke-virtual {p1, v0, v1}, Landroid/graphics/Canvas;->drawColor(ILandroid/graphics/PorterDuff$Mode;)V

    .line 2857
    return-void
.end method
- Done and recompile your SystemUI.apk, push to system/app
Attached Files
File Type: zip only_CM10-SystemUI.apk.zip - [Click for QR Code] (5.2 KB, 300 views)
Last edited by Adi Aisiteru Reborn; 20th March 2014 at 08:23 AM.
The Following 9 Users Say Thank You to Adi Aisiteru Reborn For This Useful Post: [ View ]
20th March 2014, 08:03 AM   |  #3  
Adi Aisiteru Reborn's Avatar
OP Senior Member
Flag Bandar Lampung
Thanks Meter: 4,478
 
1,649 posts
Join Date:Joined: Apr 2013
CyanogenMod 10.1/10.2/11

SystemUI.apk

Cyanogenmod CM10.1/JB 4.2, CM10.2/JB.4.3, CM11/KK

- Decompile your CM10.1/CM10.2/CM11 SystemUI.apk
- Download attached file and merge to your decompiled SystemUI.apk
- SystemUI.apk\res\layout\status_bar_expanded.xml
add the red line
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.phone.NotificationPanelView android:id="@id/notification_panel" android:background="@drawable/notification_panel_bg" android:paddingTop="@dimen/notification_panel_padding_top" android:layout_width="0.0dip" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/notification_panel_margin_left"
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
   <com.android.systemui.statusbar.phone.NotificationWallpaper android:id="@id/notification_wallpaper" android:layout_width="fill_parent" android:layout_height="fill_parent" />
   <View android:id="@id/handle" android:background="@drawable/status_bar_close" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="@dimen/close_handle_height" />
    <include android:layout_gravity="bottom" android:layout_width="fill_parent" android:layout_height="@dimen/carrier_label_height" android:layout_marginBottom="@dimen/close_handle_height" layout="@layout/carrier_label" />
- SystemUI.apk\res\values\ids.xml
add this line to end of it before </resources>
Code:
<item type="id" name="notification_wallpaper">false</item>
</resources>
- SystemUI.apk\res\values\public.xml
seacrh for this line
Code:
<public type="drawable" name="notification_panel_bg" id="0x7f??????" />
and pay attention to 0x7f??????

- SystemUI.apk\smali\com\android\systemui\statusbar\ phone\PhoneStatusBar.smali
add the red line
Code:
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
	Lcom/android/systemui/statusbar/phone/PhoneStatusBar$AdiObserver;,
        Lcom/android/systemui/statusbar/phone/PhoneStatusBar$TilesChangedObserver;,
        Lcom/android/systemui/statusbar/phone/PhoneStatusBar$MyTicker;,
        Lcom/android/systemui/statusbar/phone/PhoneStatusBar$H;,
        Lcom/android/systemui/statusbar/phone/PhoneStatusBar$SettingsObserver;
Code:
new-instance v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$32;

    invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$32;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V

    iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStartTracing:Ljava/lang/Runnable;

    .line 2902
    new-instance v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$33;

    invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$33;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V

    iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStopTracing:Ljava/lang/Runnable;

    .line 2963
    return-void
.end method

.method static synthetic access$98000(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V
    .locals 0
    .parameter "x0"

    .prologue
    .line 125
    invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setNotificationsTransparency()V

    return-void
.end method

.method static synthetic access$99000(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V
    .locals 0
    .parameter "x0"

    .prologue
    .line 125
    invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setNotificationWallpaperHelper()V

    return-void
.end method

.method static synthetic access$000(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;I)V
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 116
    invoke-direct {p0, p1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->adjustBrightness(I)V

    return-void
.end method
Code:
.method private loadNotificationShade()V
    .locals 12

    .prologue
    .line 1138
    iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPile:Lcom/android/systemui/statusbar/policy/NotificationRowLayout;

    if-nez v10, :cond_1

    .line 1175
    :cond_0
    :goto_0
    return-void

    .line 1140
    :cond_1
    iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationData:Lcom/android/systemui/statusbar/NotificationData;

    invoke-virtual {v10}, Lcom/android/systemui/statusbar/NotificationData;->size()I

    move-result v0

    .line 1142
    .local v0, N:I
    new-instance v8, Ljava/util/ArrayList;

    invoke-direct {v8}, Ljava/util/ArrayList;-><init>()V

    .line 1144
    .local v8, toShow:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Landroid/view/View;>;"
    invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->isDeviceProvisioned()Z

    move-result v5

    .line 1146
    .local v5, provisioned:Z
    const/4 v3, 0x0

    .local v3, i:I
    :goto_1
    if-ge v3, v0, :cond_4

    .line 1147
    iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationData:Lcom/android/systemui/statusbar/NotificationData;

    sub-int v11, v0, v3

    add-int/lit8 v11, v11, -0x1

    invoke-virtual {v10, v11}, Lcom/android/systemui/statusbar/NotificationData;->get(I)Lcom/android/systemui/statusbar/NotificationData$Entry;

    move-result-object v2

    .line 1148
    .local v2, ent:Lcom/android/systemui/statusbar/NotificationData$Entry;
    if-nez v5, :cond_3

    iget-object v10, v2, Lcom/android/systemui/statusbar/NotificationData$Entry;->notification:Lcom/android/internal/statusbar/StatusBarNotification;

    invoke-virtual {p0, v10}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->showNotificationEvenIfUnprovisioned(Lcom/android/internal/statusbar/StatusBarNotification;)Z

    move-result v10

    if-nez v10, :cond_3

    .line 1146
    :cond_2
    :goto_2
    add-int/lit8 v3, v3, 0x1

    goto :goto_1

    .line 1149
    :cond_3
    iget-object v10, v2, Lcom/android/systemui/statusbar/NotificationData$Entry;->notification:Lcom/android/internal/statusbar/StatusBarNotification;

    invoke-virtual {p0, v10}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->notificationIsForCurrentUser(Lcom/android/internal/statusbar/StatusBarNotification;)Z

    move-result v10

    if-eqz v10, :cond_2

    .line 1150
    iget-object v10, v2, Lcom/android/systemui/statusbar/NotificationData$Entry;->row:Landroid/view/View;

    invoke-virtual {v8, v10}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    goto :goto_2

    .line 1153
    .end local v2           #ent:Lcom/android/systemui/statusbar/NotificationData$Entry;
    :cond_4
    new-instance v7, Ljava/util/ArrayList;

    invoke-direct {v7}, Ljava/util/ArrayList;-><init>()V

    .line 1154
    .local v7, toRemove:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Landroid/view/View;>;"
    const/4 v3, 0x0

    :goto_3
    iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPile:Lcom/android/systemui/statusbar/policy/NotificationRowLayout;

    invoke-virtual {v10}, Lcom/android/systemui/statusbar/policy/NotificationRowLayout;->getChildCount()I

    move-result v10

    if-ge v3, v10, :cond_6

    .line 1155
    iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPile:Lcom/android/systemui/statusbar/policy/NotificationRowLayout;

    invoke-virtual {v10, v3}, Lcom/android/systemui/statusbar/policy/NotificationRowLayout;->getChildAt(I)Landroid/view/View;

    move-result-object v1

    .line 1156
    .local v1, child:Landroid/view/View;
    invoke-virtual {v8, v1}, Ljava/util/ArrayList;->contains(Ljava/lang/Object;)Z

    move-result v10

    if-nez v10, :cond_5

    .line 1157
    invoke-virtual {v7, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 1154
    :cond_5
    add-int/lit8 v3, v3, 0x1

    goto :goto_3

    .line 1161
    .end local v1           #child:Landroid/view/View;
    :cond_6
    invoke-virtual {v7}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v4

    .local v4, i$:Ljava/util/Iterator;
    :goto_4
    invoke-interface {v4}, Ljava/util/Iterator;->hasNext()Z

    move-result v10

    if-eqz v10, :cond_7

    invoke-interface {v4}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v6

    check-cast v6, Landroid/view/View;

    .line 1162
    .local v6, remove:Landroid/view/View;
    iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPile:Lcom/android/systemui/statusbar/policy/NotificationRowLayout;

    invoke-virtual {v10, v6}, Lcom/android/systemui/statusbar/policy/NotificationRowLayout;->removeView(Landroid/view/View;)V

    goto :goto_4

    .line 1165
    .end local v6           #remove:Landroid/view/View;
    :cond_7
 invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setNotificationsTransparency()V

    const/4 v3, 0x0

    :goto_5
    invoke-virtual {v8}, Ljava/util/ArrayList;->size()I

    move-result v10

    if-ge v3, v10, :cond_9

    .line 1166
    invoke-virtual {v8, v3}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v9

    check-cast v9, Landroid/view/View;

    .line 1167
    .local v9, v:Landroid/view/View;
    invoke-virtual {v9}, Landroid/view/View;->getParent()Landroid/view/ViewParent;

    move-result-object v10

    if-nez v10, :cond_8

    .line 1168
    iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPile:Lcom/android/systemui/statusbar/policy/NotificationRowLayout;

    invoke-virtual {v10, v9, v3}, Lcom/android/systemui/statusbar/policy/NotificationRowLayout;->addView(Landroid/view/View;I)V

    .line 1165
    :cond_8
    add-int/lit8 v3, v3, 0x1

    goto :goto_5

    .line 1172
    .end local v9           #v:Landroid/view/View;
    :cond_9
    iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSettingsButton:Landroid/widget/ImageView;

    if-eqz v10, :cond_0

    .line 1173
    iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSettingsButton:Landroid/widget/ImageView;

    invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->isDeviceProvisioned()Z

    move-result v11

    invoke-virtual {v10, v11}, Landroid/widget/ImageView;->setEnabled(Z)V

    goto/16 :goto_0
.end method
Code:
.method private setIntruderAlertVisibility(Z)V
    .locals 0
    .parameter "vis"

    .prologue
    .line 2711
    return-void
.end method

.method private setNotificationsTransparency()V
    .locals 8

    .prologue
    const/high16 v7, 0x437f

    const/high16 v6, 0x3f80

    .line 3216
    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;

    invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    const-string v1, "notif_alpha"

    const/4 v2, 0x0

    invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getFloat(Landroid/content/ContentResolver;Ljava/lang/String;F)F

    move-result v1

    .line 3217
    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPile:Lcom/android/systemui/statusbar/policy/NotificationRowLayout;

    if-eqz v0, :cond_2

    .line 3218
    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationData:Lcom/android/systemui/statusbar/NotificationData;

    invoke-virtual {v0}, Lcom/android/systemui/statusbar/NotificationData;->size()I

    move-result v2

    .line 3219
    const/4 v0, 0x0

    :goto_0
    if-ge v0, v2, :cond_2

    .line 3220
    iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationData:Lcom/android/systemui/statusbar/NotificationData;

    sub-int v4, v2, v0

    add-int/lit8 v4, v4, -0x1

    invoke-virtual {v3, v4}, Lcom/android/systemui/statusbar/NotificationData;->get(I)Lcom/android/systemui/statusbar/NotificationData$Entry;

    move-result-object v3

    .line 3221
    iget-object v4, v3, Lcom/android/systemui/statusbar/NotificationData$Entry;->expanded:Landroid/view/View;

    .line 3222
    if-eqz v4, :cond_0

    invoke-virtual {v4}, Landroid/view/View;->getBackground()Landroid/graphics/drawable/Drawable;

    move-result-object v5

    if-eqz v5, :cond_0

    invoke-virtual {v4}, Landroid/view/View;->getBackground()Landroid/graphics/drawable/Drawable;

    move-result-object v4

    sub-float v5, v6, v1

    mul-float/2addr v5, v7

    float-to-int v5, v5

    invoke-virtual {v4, v5}, Landroid/graphics/drawable/Drawable;->setAlpha(I)V

    .line 3223
    :cond_0
    invoke-virtual {v3}, Lcom/android/systemui/statusbar/NotificationData$Entry;->getLargeView()Landroid/view/View;

    move-result-object v3

    .line 3224
    if-eqz v3, :cond_1

    invoke-virtual {v3}, Landroid/view/View;->getBackground()Landroid/graphics/drawable/Drawable;

    move-result-object v4

    if-eqz v4, :cond_1

    invoke-virtual {v3}, Landroid/view/View;->getBackground()Landroid/graphics/drawable/Drawable;

    move-result-object v3

    sub-float v4, v6, v1

    mul-float/2addr v4, v7

    float-to-int v4, v4

    invoke-virtual {v3, v4}, Landroid/graphics/drawable/Drawable;->setAlpha(I)V

    .line 3219
    :cond_1
    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    .line 3227
    :cond_2
    return-void
.end method

.method private setNotificationWallpaperHelper()V
    .locals 6

    .prologue
    const/4 v5, 0x0

    .line 3200
    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;

    invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    const-string v1, "notif_wallpaper_alpha"

    const v2, 0x3dcccccd

    invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getFloat(Landroid/content/ContentResolver;Ljava/lang/String;F)F

    move-result v0

    .line 3201
    iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;

    invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v1

    const-string v2, "notification_background"

    invoke-static {v1, v2}, Landroid/provider/Settings$System;->getString(Landroid/content/ContentResolver;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    .line 3202
    new-instance v2, Ljava/io/File;

    const-string v3, "/data/data/com.android.settings/files/notification_wallpaper.jpg"

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

    .line 3203
    iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationPanel:Lcom/android/systemui/statusbar/phone/NotificationPanelView;

    invoke-virtual {v3, v5}, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->setBackgroundResource(I)V

    .line 3204
    iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationPanel:Lcom/android/systemui/statusbar/phone/NotificationPanelView;

    const v4, 0x7f02012d

    invoke-virtual {v3, v4}, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->setBackgroundResource(I)V

    .line 3205
    iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationPanel:Lcom/android/systemui/statusbar/phone/NotificationPanelView;

    invoke-virtual {v3}, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->getBackground()Landroid/graphics/drawable/Drawable;

    move-result-object v3

    .line 3206
    invoke-virtual {v3, v5}, Landroid/graphics/drawable/Drawable;->setAlpha(I)V

    .line 3207
    invoke-virtual {v2}, Ljava/io/File;->exists()Z

    move-result v2

    if-nez v2, :cond_1

    .line 3208
    if-eqz v1, :cond_0

    invoke-virtual {v1}, Ljava/lang/String;->isEmpty()Z

    move-result v2

    if-nez v2, :cond_0

    .line 3209
    invoke-static {v1}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v1

    sget-object v2, Landroid/graphics/PorterDuff$Mode;->SRC_ATOP:Landroid/graphics/PorterDuff$Mode;

    invoke-virtual {v3, v1, v2}, Landroid/graphics/drawable/Drawable;->setColorFilter(ILandroid/graphics/PorterDuff$Mode;)V

    .line 3211
    :cond_0
    const/high16 v1, 0x3f80

    sub-float v0, v1, v0

    const/high16 v1, 0x437f

    mul-float/2addr v0, v1

    float-to-int v0, v0

    invoke-virtual {v3, v0}, Landroid/graphics/drawable/Drawable;->setAlpha(I)V

    .line 3213
    :cond_1
    return-void
.end method

.method private setStatusBarLowProfile(Z)V
    .locals 18
    .parameter

    .prologue
    .line 2153
    move-object/from16 v0, p0

    iget-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mLightsOutAnimation:Landroid/animation/Animator;

    if-nez v1, :cond_6

    .line 2154
    move-object/from16 v0, p0

    iget-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
or for CyanogenMod 11
Code:
  const-string v1, "user_setup_complete"

    invoke-static {v1}, Landroid/provider/Settings$Secure;->getUriFor(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v1

    const/4 v2, 0x1

    iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mUserSetupObserver:Landroid/database/ContentObserver;

    iget v4, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mCurrentUserId:I

    invoke-virtual {v0, v1, v2, v3, v4}, Landroid/content/ContentResolver;->registerContentObserver(Landroid/net/Uri;ZLandroid/database/ContentObserver;I)V

    .line 3105
    return-void
.end method

.method private setNotificationsTransparency()V
    .locals 8

    .prologue
    const/high16 v7, 0x437f

    const/high16 v6, 0x3f80

    .line 3216
    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;

    invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    const-string v1, "notif_alpha"

    const/4 v2, 0x0

    invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getFloat(Landroid/content/ContentResolver;Ljava/lang/String;F)F

    move-result v1

    .line 3217
    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPile:Lcom/android/systemui/statusbar/policy/NotificationRowLayout;

    if-eqz v0, :cond_2

    .line 3218
    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationData:Lcom/android/systemui/statusbar/NotificationData;

    invoke-virtual {v0}, Lcom/android/systemui/statusbar/NotificationData;->size()I

    move-result v2

    .line 3219
    const/4 v0, 0x0

    :goto_0
    if-ge v0, v2, :cond_2

    .line 3220
    iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationData:Lcom/android/systemui/statusbar/NotificationData;

    sub-int v4, v2, v0

    add-int/lit8 v4, v4, -0x1

    invoke-virtual {v3, v4}, Lcom/android/systemui/statusbar/NotificationData;->get(I)Lcom/android/systemui/statusbar/NotificationData$Entry;

    move-result-object v3

    .line 3221
    iget-object v4, v3, Lcom/android/systemui/statusbar/NotificationData$Entry;->expanded:Landroid/view/View;

    .line 3222
    if-eqz v4, :cond_0

    invoke-virtual {v4}, Landroid/view/View;->getBackground()Landroid/graphics/drawable/Drawable;

    move-result-object v5

    if-eqz v5, :cond_0

    invoke-virtual {v4}, Landroid/view/View;->getBackground()Landroid/graphics/drawable/Drawable;

    move-result-object v4

    sub-float v5, v6, v1

    mul-float/2addr v5, v7

    float-to-int v5, v5

    invoke-virtual {v4, v5}, Landroid/graphics/drawable/Drawable;->setAlpha(I)V

    .line 3223
    :cond_0
    invoke-virtual {v3}, Lcom/android/systemui/statusbar/NotificationData$Entry;->getLargeView()Landroid/view/View;

    move-result-object v3

    .line 3224
    if-eqz v3, :cond_1

    invoke-virtual {v3}, Landroid/view/View;->getBackground()Landroid/graphics/drawable/Drawable;

    move-result-object v4

    if-eqz v4, :cond_1

    invoke-virtual {v3}, Landroid/view/View;->getBackground()Landroid/graphics/drawable/Drawable;

    move-result-object v3

    sub-float v4, v6, v1

    mul-float/2addr v4, v7

    float-to-int v4, v4

    invoke-virtual {v3, v4}, Landroid/graphics/drawable/Drawable;->setAlpha(I)V

    .line 3219
    :cond_1
    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    .line 3227
    :cond_2
    return-void
.end method

.method private setNotificationWallpaperHelper()V
    .locals 6

    .prologue
    const/4 v5, 0x0

    .line 3200
    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;

    invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    const-string v1, "notif_wallpaper_alpha"

    const v2, 0x3dcccccd

    invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getFloat(Landroid/content/ContentResolver;Ljava/lang/String;F)F

    move-result v0

    .line 3201
    iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;

    invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v1

    const-string v2, "notification_background"

    invoke-static {v1, v2}, Landroid/provider/Settings$System;->getString(Landroid/content/ContentResolver;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    .line 3202
    new-instance v2, Ljava/io/File;

    const-string v3, "/data/data/com.android.settings/files/notification_wallpaper.jpg"

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

    .line 3203
    iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationPanel:Lcom/android/systemui/statusbar/phone/NotificationPanelView;

    invoke-virtual {v3, v5}, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->setBackgroundResource(I)V

    .line 3204
    iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationPanel:Lcom/android/systemui/statusbar/phone/NotificationPanelView;

    const v4, 0x7f02012d

    invoke-virtual {v3, v4}, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->setBackgroundResource(I)V

    .line 3205
    iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationPanel:Lcom/android/systemui/statusbar/phone/NotificationPanelView;

    invoke-virtual {v3}, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->getBackground()Landroid/graphics/drawable/Drawable;

    move-result-object v3

    .line 3206
    invoke-virtual {v3, v5}, Landroid/graphics/drawable/Drawable;->setAlpha(I)V

    .line 3207
    invoke-virtual {v2}, Ljava/io/File;->exists()Z

    move-result v2

    if-nez v2, :cond_1

    .line 3208
    if-eqz v1, :cond_0

    invoke-virtual {v1}, Ljava/lang/String;->isEmpty()Z

    move-result v2

    if-nez v2, :cond_0

    .line 3209
    invoke-static {v1}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v1

    sget-object v2, Landroid/graphics/PorterDuff$Mode;->SRC_ATOP:Landroid/graphics/PorterDuff$Mode;

    invoke-virtual {v3, v1, v2}, Landroid/graphics/drawable/Drawable;->setColorFilter(ILandroid/graphics/PorterDuff$Mode;)V

    .line 3211
    :cond_0
    const/high16 v1, 0x3f80

    sub-float v0, v1, v0

    const/high16 v1, 0x437f

    mul-float/2addr v0, v1

    float-to-int v0, v0

    invoke-virtual {v3, v0}, Landroid/graphics/drawable/Drawable;->setAlpha(I)V

    .line 3213
    :cond_1
    return-void
.end method

.method private resumeSuspendedAutohide()V
    .locals 4

    .prologue
    .line 2490
    iget-boolean v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mAutohideSuspended:Z

    if-eqz v0, :cond_0

    .line 2491
    invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->scheduleAutohide()V

change this 0x7f02012d, according to the value you got in your own public.aml
Code:
<public type="drawable" name="notification_panel_bg" id="0x7f??????" />
next
Code:
 invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->resetUserSetupObserver()V

    .line 780
    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/android/systemui/statusbar/powerwidget/PowerWidget;

    invoke-virtual {v0}, Lcom/android/systemui/statusbar/powerwidget/PowerWidget;->setupWidget()V

    .line 781
    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/android/systemui/statusbar/powerwidget/PowerWidget;

    invoke-virtual {v0}, Lcom/android/systemui/statusbar/powerwidget/PowerWidget;->updateVisibility()V
    
   new-instance v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$AdiObserver;

    new-instance v1, Landroid/os/Handler;

    invoke-direct {v1}, Landroid/os/Handler;-><init>()V

    invoke-direct {v0, p0, v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$AdiObserver;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;Landroid/os/Handler;)V

    invoke-virtual {v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$AdiObserver;->observe()V

    .line 783
    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
or for CM10.2/CM11

Code:
const-string v1, "android.intent.action.SCREEN_ON"

    invoke-virtual {v0, v1}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V

    .line 864
    iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBroadcastReceiver:Landroid/content/BroadcastReceiver;

    invoke-virtual {v5, v1, v0}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

    .line 867
    invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->resetUserSetupObserver()V

	 new-instance v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$AdiObserver;

    new-instance v1, Landroid/os/Handler;

    invoke-direct {v1}, Landroid/os/Handler;-><init>()V

    invoke-direct {v0, p0, v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$AdiObserver;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;Landroid/os/Handler;)V

    invoke-virtual {v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$AdiObserver;->observe()V

    .line 869
    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
- Done and recompile your SystemUI.apk
Attached Files
File Type: zip CM10.1-CM10.2-CM11-SystemUI.apk.zip - [Click for QR Code] (5.4 KB, 514 views)
Last edited by Adi Aisiteru Reborn; 20th March 2014 at 09:34 AM.
The Following 6 Users Say Thank You to Adi Aisiteru Reborn For This Useful Post: [ View ]
20th March 2014, 08:04 AM   |  #4  
Adi Aisiteru Reborn's Avatar
OP Senior Member
Flag Bandar Lampung
Thanks Meter: 4,478
 
1,649 posts
Join Date:Joined: Apr 2013
done ,

have a nice Moding

Good luck
Last edited by Adi Aisiteru Reborn; 20th March 2014 at 09:04 AM.
The Following 5 Users Say Thank You to Adi Aisiteru Reborn For This Useful Post: [ View ]
20th March 2014, 08:04 AM   |  #5  
Adi Aisiteru Reborn's Avatar
OP Senior Member
Flag Bandar Lampung
Thanks Meter: 4,478
 
1,649 posts
Join Date:Joined: Apr 2013
Update FIXED, for CyanogenMod 11 !!

oke guys, here is the fix code for CyanogenMod 11

this is who have followed my guide
before :
this code has made SystemUI force stop when there is new incoming notification :
Code:
.method private setNotificationsTransparency()V
    .locals 8

    .prologue
    const/high16 v7, 0x437f

    const/high16 v6, 0x3f80

    .line 3216
    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;

    invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    const-string v1, "notif_alpha"

    const/4 v2, 0x0

    invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getFloat(Landroid/content/ContentResolver;Ljava/lang/String;F)F

    move-result v1

    .line 3217
    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPile:Lcom/android/systemui/statusbar/policy/NotificationRowLayout;

    if-eqz v0, :cond_2

    .line 3218
    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationData:Lcom/android/systemui/statusbar/NotificationData;

    invoke-virtual {v0}, Lcom/android/systemui/statusbar/NotificationData;->size()I

    move-result v2

    .line 3219
    const/4 v0, 0x0

    :goto_0
    if-ge v0, v2, :cond_2

    .line 3220
    iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationData:Lcom/android/systemui/statusbar/NotificationData;

    sub-int v4, v2, v0

    add-int/lit8 v4, v4, -0x1

    invoke-virtual {v3, v4}, Lcom/android/systemui/statusbar/NotificationData;->get(I)Lcom/android/systemui/statusbar/NotificationData$Entry;

    move-result-object v3

    .line 3221
    iget-object v4, v3, Lcom/android/systemui/statusbar/NotificationData$Entry;->expanded:Landroid/view/View;

    .line 3222
    if-eqz v4, :cond_0

    invoke-virtual {v4}, Landroid/view/View;->getBackground()Landroid/graphics/drawable/Drawable;

    move-result-object v5

    if-eqz v5, :cond_0

    invoke-virtual {v4}, Landroid/view/View;->getBackground()Landroid/graphics/drawable/Drawable;

    move-result-object v4

    sub-float v5, v6, v1

    mul-float/2addr v5, v7

    float-to-int v5, v5

    invoke-virtual {v4, v5}, Landroid/graphics/drawable/Drawable;->setAlpha(I)V

    .line 3223
    :cond_0
    invoke-virtual {v3}, Lcom/android/systemui/statusbar/NotificationData$Entry;->getLargeView()Landroid/view/View;

    move-result-object v3

    .line 3224
    if-eqz v3, :cond_1

    invoke-virtual {v3}, Landroid/view/View;->getBackground()Landroid/graphics/drawable/Drawable;

    move-result-object v4

    if-eqz v4, :cond_1

    invoke-virtual {v3}, Landroid/view/View;->getBackground()Landroid/graphics/drawable/Drawable;

    move-result-object v3

    sub-float v4, v6, v1

    mul-float/2addr v4, v7

    float-to-int v4, v4

    invoke-virtual {v3, v4}, Landroid/graphics/drawable/Drawable;->setAlpha(I)V

    .line 3219
    :cond_1
    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    .line 3227
    :cond_2
    return-void
.end method
so the fix is like this
new code is
Code:
.method private setNotificationsTransparency()V
     .locals 6

    .prologue
    .line 3537
    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPile:Lcom/android/systemui/statusbar/policy/NotificationRowLayout;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationData:Lcom/android/systemui/statusbar/NotificationData;

    if-nez v0, :cond_1

    .line 3560
    :cond_0
    return-void

    .line 3540
    :cond_1
    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;

    invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    const-string v1, "notif_alpha"

    const/4 v2, 0x0

    const/4 v3, -0x2

    invoke-static {v0, v1, v2, v3}, Landroid/provider/Settings$System;->getFloatForUser(Landroid/content/ContentResolver;Ljava/lang/String;FI)F

    move-result v0

    .line 3543
    const/high16 v1, 0x3f80

    sub-float v0, v1, v0

    const/high16 v1, 0x437f

    mul-float/2addr v0, v1

    float-to-int v1, v0

    .line 3544
    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationData:Lcom/android/systemui/statusbar/NotificationData;

    invoke-virtual {v0}, Lcom/android/systemui/statusbar/NotificationData;->size()I

    move-result v2

    .line 3545
    const/4 v0, 0x0

    :goto_0
    if-ge v0, v2, :cond_0

    .line 3546
    iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationData:Lcom/android/systemui/statusbar/NotificationData;

    sub-int v4, v2, v0

    add-int/lit8 v4, v4, -0x1

    invoke-virtual {v3, v4}, Lcom/android/systemui/statusbar/NotificationData;->get(I)Lcom/android/systemui/statusbar/NotificationData$Entry;

    move-result-object v3

    .line 3547
    iget-object v4, v3, Lcom/android/systemui/statusbar/NotificationData$Entry;->expanded:Landroid/view/View;

    .line 3548
    if-eqz v4, :cond_2

    invoke-virtual {v4}, Landroid/view/View;->getBackground()Landroid/graphics/drawable/Drawable;

    move-result-object v5

    if-eqz v5, :cond_2

    .line 3549
    invoke-virtual {v4}, Landroid/view/View;->getBackground()Landroid/graphics/drawable/Drawable;

    move-result-object v4

    invoke-virtual {v4, v1}, Landroid/graphics/drawable/Drawable;->setAlpha(I)V

    .line 3551
    :cond_2
    invoke-virtual {v3}, Lcom/android/systemui/statusbar/NotificationData$Entry;->getBigContentView()Landroid/view/View;

    move-result-object v4

    .line 3552
    if-eqz v4, :cond_3

    invoke-virtual {v4}, Landroid/view/View;->getBackground()Landroid/graphics/drawable/Drawable;

    move-result-object v5

    if-eqz v5, :cond_3

    .line 3553
    invoke-virtual {v4}, Landroid/view/View;->getBackground()Landroid/graphics/drawable/Drawable;

    move-result-object v4

    invoke-virtual {v4, v1}, Landroid/graphics/drawable/Drawable;->setAlpha(I)V

    .line 3555
    :cond_3
    iget-object v3, v3, Lcom/android/systemui/statusbar/NotificationData$Entry;->icon:Lcom/android/systemui/statusbar/StatusBarIconView;

    .line 3556
    if-eqz v3, :cond_4

    invoke-virtual {v3}, Lcom/android/systemui/statusbar/StatusBarIconView;->getBackground()Landroid/graphics/drawable/Drawable;

    move-result-object v4

    if-eqz v4, :cond_4

    .line 3557
    invoke-virtual {v3}, Lcom/android/systemui/statusbar/StatusBarIconView;->getBackground()Landroid/graphics/drawable/Drawable;

    move-result-object v3

    invoke-virtual {v3, v1}, Landroid/graphics/drawable/Drawable;->setAlpha(I)V

    .line 3545
    :cond_4
    add-int/lit8 v0, v0, 0x1

    goto :goto_0
.end method


----------------------------------------------------------------------------------------------------------------------------------------------------------

Update FIX, for MTK JB 4.2 !!

Go here : http://forum.xda-developers.com/show...5&postcount=40
Last edited by Adi Aisiteru Reborn; 12th May 2014 at 05:47 AM.
The Following 3 Users Say Thank You to Adi Aisiteru Reborn For This Useful Post: [ View ]
20th March 2014, 09:00 AM   |  #6  
cleverior.ipul's Avatar
Senior Member
Flag Bogor
Thanks Meter: 348
 
413 posts
Join Date:Joined: Nov 2012
More
1st !!!
The Following User Says Thank You to cleverior.ipul For This Useful Post: [ View ]
20th March 2014, 09:18 AM   |  #7  
zhalx's Avatar
Senior Member
Flag Visit Indonesia
Thanks Meter: 409
 
265 posts
Join Date:Joined: Nov 2012
Donate to Me
Niceee....

bookmarked.
keep sharing um.

_/|\_
The Following 2 Users Say Thank You to zhalx For This Useful Post: [ View ]
20th March 2014, 11:23 AM   |  #8  
Adi Aisiteru Reborn's Avatar
OP Senior Member
Flag Bandar Lampung
Thanks Meter: 4,478
 
1,649 posts
Join Date:Joined: Apr 2013
sorry guys, I think there is a little problem in CM11,.
when there is new incoming notification, systemUi suddently force stop,.
I' ll fix for CM11 ASAP
thanks
The Following 2 Users Say Thank You to Adi Aisiteru Reborn For This Useful Post: [ View ]
20th March 2014, 11:44 AM   |  #9  
SuperDroid-BOND's Avatar
Recognized Contributor
Flag Your Heart, SweetHeart
Thanks Meter: 3,395
 
1,320 posts
Join Date:Joined: Dec 2012
Donate to Me
More
Angry
Quote:
Originally Posted by Adi Aisiteru Reborn

Adi Sir,

Do we need to check the register values also while doing the copy paste action. because in mine PhoneStatusBar.smali --> mBroadcastReceiver, registers are v13, v0 and no parameters (p0) which is there in your guide.

Please help in this, that, do we have to adapt the register values according to our SystemUI.

BTW, with your earlier guidance, I already got this mode from your ROM.
The Following 2 Users Say Thank You to SuperDroid-BOND For This Useful Post: [ View ]
20th March 2014, 11:51 AM   |  #10  
Adi Aisiteru Reborn's Avatar
OP Senior Member
Flag Bandar Lampung
Thanks Meter: 4,478
 
1,649 posts
Join Date:Joined: Apr 2013
Quote:
Originally Posted by SuperDroid-BOND

Adi Sir,

Do we need to check the register values also while doing the copy paste action. because in mine PhoneStatusBar.smali --> mBroadcastReceiver, registers are v13, v0 and no parameters (p0) which is there in your guide.

Please help in this, that, do we have to adapt the register values according to our SystemUI.

BTW, with your earlier guidance, I already got this mode from your ROM.

I just want to try to make it general Bond, if you already succed with the other method, that's good

and btw, am not good in fixing register value like that Bond , am sorry

The Following 3 Users Say Thank You to Adi Aisiteru Reborn For This Useful Post: [ View ]
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top Threads in Android Themes by ThreadRank