[Android Themes] Adi Aisiteru Reborn:
How to add Music VisualizerView - Graphic Equalizer animation style to Notification panel

XDA PORTAL : http://www.xda-developers.com/mod-spotlight-graphic-equalizer-for-notification-panel/

Hello good day XDA :)

This mod is a ported mod from CM11 Tiles, but I guess this mod will work to all device /OS which has Landroid/media/AudioManager.smali and Landroid/media/audiofx/Visualizer.smali

Oke let's start it

REQUIREMENT:

- BRAIN

- Patient

- experience

- Know how to decompile/recompiling Apk

- notepad++

- APKTOOL 2 ++

STEP 1

Decompile SystemUI.apk

Download attached smali and merge to your decompiled SystemUI

STEP 2

go to SystemUI.apk/res/layout/ status_bar_expanded.xml, gemini_status_bar_expanded.xml, tw_status_bar_expanded.xml, status_bar_tracking.xml , depend on your UI

and add the red line

<?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">
<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" />
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginBottom="@dimen/close_handle_underlap" android:animateLayoutChanges="false">
<include android:layout_width="fill_parent" android:layout_height="@dimen/notification_panel_header_height" layout="@layout/status_bar_expanded_header" />
<ViewStub android:id="@id/ribbon_settings_stub" android:layout="@layout/ribbon_settings" android:layout_width="fill_parent" android:layout_height="@dimen/notification_min_height" />
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Network.EmergencyOnly" android:gravity="center" android:id="@id/emergency_calls_only" android:padding="4.0dip" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="wrap_content" />
<FrameLayout android:layout_width="fill_parent" android:layout_height="wrap_content">
<ViewStub android:id="@id/flip_settings_stub" android:layout="@layout/flip_settings" 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="wrap_content" android:overScrollMode="ifContentScrolls">
<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>
</FrameLayout>
</LinearLayout>
[COLOR="Red"]<com.adi.rom.interface.MusicEqualizerVisualizer android:layout_gravity="bottom" android:id="@id/visualizer_view_panel" android:layout_width="fill_parent" android:layout_height="48.0dip" android:layout_marginBottom="36.0dip">
<LinearLayout android:orientation="vertical" android:id="@id/custom_visualizer_view_panel" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.adi.rom.interface.VisualizerView android:id="@id/custom_visualizer_view" android:layout_width="fill_parent" android:layout_height="fill_parent" />
</LinearLayout>
</com.adi.rom.interface.MusicEqualizerVisualizer>[/COLOR]
</com.android.systemui.statusbar.phone.NotificationPanelView>

NEXT

SystemUI.apk/res/values/colors.xml

add the red line to end of it before </resources>

<color name="pie_selected_color">@android:color/holo_blue_light</color>
<color name="pie_long_pressed_color">#ff8ad5f0</color>
<color name="pie_outline_color">#dd0099cc</color>
[COLOR="Red"]<color name="custom_equalizer_fill_color">#96ffffff</color>[/COLOR]
</resources>

SystemUI.apk/res/values/dimens.xml

add the red line to end of it before </resources>

<dimen name="pie_navbar_height">85.0dip</dimen>
<dimen name="pie_sysinfo_radius">165.0dip</dimen>
<dimen name="pie_sysinfo_height">85.0sp</dimen>
[COLOR="Red"]<dimen name="custom_eqalizer_path_effect_1">6.0dip</dimen>
<dimen name="custom_eqalizer_path_effect_2">1.0dip</dimen>
<dimen name="custom_eqalizer_path_stroke_width">6.0dip</dimen>[/COLOR]
</resources>

SystemUI.apk/res/values/ids.xml

add the red line to end of it before </resources>

<item type="id" name="notification_inspect_item">false</item>
<item type="id" name="recent_remove_item">false</item>
<item type="id" name="recent_inspect_item">false</item>
[COLOR="Red"]<item type="id" name="custom_visualizer_view">false</item>
<item type="id" name="visualizer_view_panel">false</item>
<item type="id" name="custom_visualizer_view_panel">false</item>[/COLOR]
</resources>

SystemUI.apk/res/values/integers.xml

add the red line to end of it before </resources>

<integer name="blinds_pop_duration_ms">10</integer>
<integer name="notification_panel_layout_gravity">0x37</integer>
<integer name="settings_panel_layout_gravity">0x37</integer>
[COLOR="Red"]<integer name="custom_equalizer_divisions">4</integer>
<integer name="custom_equalizer_db_fuzz_factor">2</integer>
<integer name="custom_equalizer_db_fuzz">-10</integer>[/COLOR]
</resources>

Done and compile your SystemUI.apk

STEP 3

Decompile the newly recompiled again

next go to systemui/res/values/public.xml

leave it but keep it open

STEP 4

go to -SystemUI.apk/smali/com/adi/rom/interface/MusicEqualizerVisualizer.smali

search for 0x7f??????

Change the value in the smali with the value you got in your own public.xml

STEP 5

AndroidManifest.xml

Add the red line

<uses-permission android:name="android.permission.READ_DREAM_STATE"/>
<uses-permission android:name="android.permission.WRITE_DREAM_STATE"/>
<uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS"/>
<uses-permission android:name="android.permission.READ_SYNC_SETTINGS"/>
<uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS"/>
[COLOR="Red"]<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>[/COLOR]
<application android:allowBackup="false" android:allowClearUserData="false" android:hardwareAccelerated="true" android:icon="@android:drawable/platlogo" android:label="@string/app_label" android:persistent="true">
<service android:exported="true" android:name="SystemUIService"/>

STEP 6

- Compile

- Sign it

- Disable Signature check

You can try using any of the keys that come with whatever apk signing tool you use, but you will more then likely end up with a SystemUI.apk that wont show as being installed, you must sign it with platfrom keys from CyanogenMod's android_build github https://github.com/CyanogenMod/android_build/tree/jellybean/target/product/security

Note !

for CM / AOSP from source whic has

STATIC TILES, you need to uncheck/disable Equalizer tile, otherwise the Visualizer will not appear on Notification panel