You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

965 lines
72 KiB
Java

package name.mikanoshi.darkonemini;
import static de.robv.android.xposed.XposedHelpers.*;
import java.util.ArrayList;
import android.app.Activity;
import android.app.Application;
import android.content.Context;
import android.content.res.XModuleResources;
import android.content.res.XResources;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.PorterDuffColorFilter;
import android.graphics.Typeface;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.util.AttributeSet;
import android.util.TypedValue;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;
import de.robv.android.xposed.IXposedHookInitPackageResources;
import de.robv.android.xposed.IXposedHookLoadPackage;
import de.robv.android.xposed.IXposedHookZygoteInit;
import de.robv.android.xposed.XC_MethodHook;
import de.robv.android.xposed.XC_MethodHook.MethodHookParam;
import de.robv.android.xposed.XposedBridge;
import de.robv.android.xposed.XposedHelpers;
import de.robv.android.xposed.callbacks.XC_InitPackageResources.InitPackageResourcesParam;
import de.robv.android.xposed.callbacks.XC_LayoutInflated;
import de.robv.android.xposed.callbacks.XC_LoadPackage.LoadPackageParam;
public class MainModule implements IXposedHookZygoteInit, IXposedHookLoadPackage, IXposedHookInitPackageResources {
private static String MODULE_PATH = null;
private static class resItem {
public String pkg;
public String type;
public String name;
public int resId;
resItem(String pkg0, String type0, String name0, int resId0){
pkg = pkg0;
type = type0;
name = name0;
resId = resId0;
}
}
private static void changeToast(View toastView) {
try {
XModuleResources modRes = XModuleResources.createInstance(MODULE_PATH, null);
TextView toast = (TextView)toastView.findViewById(android.R.id.message);
toast.setTextSize(TypedValue.COMPLEX_UNIT_SP, 15);
toast.setTypeface(Typeface.DEFAULT);
toast.setTextColor(toast.getResources().getColor(android.R.color.primary_text_dark));
LinearLayout toastLayout = (LinearLayout)toastView;
toastLayout.setBackground(modRes.getDrawable(R.drawable.toast_frame_holo));
} catch (Throwable t) {
XposedBridge.log(t);
}
}
private static void changeTextColor(MethodHookParam param) {
try {
Object recentcallslistitemcache = param.args[0];
Object mListItem2LineText = XposedHelpers.getObjectField(recentcallslistitemcache, "mListItem2LineText");
TextView getText2 = (TextView)XposedHelpers.callMethod(mListItem2LineText, "getText2");
if (getText2.getCurrentTextColor() == 0x7f06000e) getText2.setTextColor(getText2.getResources().getColor(android.R.color.secondary_text_light));
} catch (Throwable t) {
XposedBridge.log(t);
}
}
@Override
public void initZygote(IXposedHookZygoteInit.StartupParam startupParam) throws Throwable {
MODULE_PATH = startupParam.modulePath;
ArrayList<resItem> allRes = new ArrayList<resItem>();
allRes.add(new resItem("android", "color", "background_dark", R.color.background_dark));
allRes.add(new resItem("android", "color", "background_light", R.color.background_light));
allRes.add(new resItem("android", "color", "bright_foreground_light", R.color.bright_foreground_light));
allRes.add(new resItem("android", "color", "bright_foreground_dark", R.color.bright_foreground_dark));
allRes.add(new resItem("android", "color", "bright_foreground_dark_disabled", R.color.bright_foreground_dark_disabled));
allRes.add(new resItem("android", "color", "bright_foreground_dark_inverse", R.color.bright_foreground_dark_inverse));
allRes.add(new resItem("android", "color", "bright_foreground_light_disabled", R.color.bright_foreground_light_disabled));
allRes.add(new resItem("android", "color", "bright_foreground_light_inverse", R.color.bright_foreground_light_inverse));
allRes.add(new resItem("android", "color", "dim_foreground_light", R.color.dim_foreground_light));
allRes.add(new resItem("android", "color", "dim_foreground_light_disabled", R.color.dim_foreground_light_disabled));
allRes.add(new resItem("android", "color", "dim_foreground_light_inverse", R.color.dim_foreground_light_inverse));
allRes.add(new resItem("android", "color", "dim_foreground_light_inverse_disabled", R.color.dim_foreground_light_inverse_disabled));
allRes.add(new resItem("android", "color", "background_holo_dark", R.color.background_holo_dark));
allRes.add(new resItem("android", "color", "background_holo_light", R.color.background_holo_light));
allRes.add(new resItem("android", "color", "bright_foreground_holo_dark", R.color.bright_foreground_holo_dark));
allRes.add(new resItem("android", "color", "bright_foreground_holo_light", R.color.bright_foreground_holo_light));
allRes.add(new resItem("android", "color", "bright_foreground_disabled_holo_dark", R.color.bright_foreground_disabled_holo_dark));
allRes.add(new resItem("android", "color", "bright_foreground_disabled_holo_light", R.color.bright_foreground_disabled_holo_light));
allRes.add(new resItem("android", "color", "bright_foreground_inverse_holo_dark", R.color.bright_foreground_inverse_holo_dark));
allRes.add(new resItem("android", "color", "bright_foreground_inverse_holo_light", R.color.bright_foreground_inverse_holo_light));
allRes.add(new resItem("android", "color", "dim_foreground_holo_light", R.color.dim_foreground_holo_light));
allRes.add(new resItem("android", "color", "dim_foreground_disabled_holo_light", R.color.dim_foreground_disabled_holo_light));
allRes.add(new resItem("android", "color", "dim_foreground_inverse_holo_light", R.color.dim_foreground_inverse_holo_light));
allRes.add(new resItem("android", "color", "dim_foreground_inverse_disabled_holo_light", R.color.dim_foreground_inverse_disabled_holo_light));
allRes.add(new resItem("android", "color", "dim_foreground_holo_dark", R.color.dim_foreground_holo_dark));
allRes.add(new resItem("android", "color", "dim_foreground_disabled_holo_dark", R.color.dim_foreground_disabled_holo_dark));
allRes.add(new resItem("android", "color", "dim_foreground_inverse_holo_dark", R.color.dim_foreground_inverse_holo_dark));
allRes.add(new resItem("android", "color", "dim_foreground_inverse_disabled_holo_dark", R.color.dim_foreground_inverse_disabled_holo_dark));
allRes.add(new resItem("android", "color", "group_button_dialog_pressed_holo_light", R.color.group_button_dialog_pressed_holo_light));
allRes.add(new resItem("android", "color", "group_button_dialog_focused_holo_light", R.color.group_button_dialog_focused_holo_light));
allRes.add(new resItem("android", "color", "holo_blue_light", R.color.holo_blue_light));
allRes.add(new resItem("android", "color", "holo_blue_dark", R.color.holo_blue_dark));
allRes.add(new resItem("android", "color", "link_text_light", R.color.link_text_light));
allRes.add(new resItem("android", "color", "link_text_holo_light", R.color.link_text_holo_light));
//allRes.add(new resItem("android", "color", "highlighted_text_holo_light", R.color.highlighted_text_holo_light));
//allRes.add(new resItem("android", "color", "highlighted_text_holo_dark", R.color.highlighted_text_holo_dark));
allRes.add(new resItem("com.htc.framework", "color", "ap_background_color", R.color.ap_background_color));
allRes.add(new resItem("com.htc.framework", "color", "light_expand_list_color", R.color.light_expand_list_color));
allRes.add(new resItem("com.htc.framework", "color", "light_primaryfont_color", R.color.light_primaryfont_color));
allRes.add(new resItem("com.htc.framework", "color", "light_primaryfont_disable_color", R.color.light_primaryfont_disable_color));
allRes.add(new resItem("com.htc.framework", "color", "list_item_bg_center_color", R.color.list_item_bg_center_color));
allRes.add(new resItem("com.htc.framework", "color", "list_item_bg_top_color", R.color.list_item_bg_top_color));
allRes.add(new resItem("com.htc.framework", "color", "list_item_bg_bottom_color", R.color.list_item_bg_bottom_color));
allRes.add(new resItem("com.htc.framework", "color", "multiply_color", R.color.multiply_color));
allRes.add(new resItem("com.htc.framework", "color", "multiply_opacity_color", R.color.multiply_opacity_color));
allRes.add(new resItem("com.htc.framework", "color", "overlay_color", R.color.overlay_color));
allRes.add(new resItem("com.htc.framework", "color", "text_selection_opacity_color", R.color.text_selection_opacity_color));
allRes.add(new resItem("com.htc.framework", "color", "text_selection_color", R.color.text_selection_color));
allRes.add(new resItem("com.htc", "color", "ap_background_color", R.color.ap_background_color));
allRes.add(new resItem("com.htc", "color", "light_expand_list_color", R.color.light_expand_list_color));
allRes.add(new resItem("com.htc", "color", "light_primaryfont_color", R.color.light_primaryfont_color));
allRes.add(new resItem("com.htc", "color", "light_primaryfont_disable_color", R.color.light_primaryfont_disable_color));
allRes.add(new resItem("com.htc", "color", "list_item_bg_center_color", R.color.list_item_bg_center_color));
allRes.add(new resItem("com.htc", "color", "list_item_bg_top_color", R.color.list_item_bg_top_color));
allRes.add(new resItem("com.htc", "color", "list_item_bg_bottom_color", R.color.list_item_bg_bottom_color));
allRes.add(new resItem("com.htc", "color", "multiply_color", R.color.multiply_color));
allRes.add(new resItem("com.htc", "color", "multiply_opacity_color", R.color.multiply_opacity_color));
allRes.add(new resItem("com.htc", "color", "overlay_color", R.color.overlay_color));
allRes.add(new resItem("com.htc", "color", "text_selection_opacity_color", R.color.text_selection_opacity_color));
allRes.add(new resItem("com.htc", "color", "text_selection_color", R.color.text_selection_color));
allRes.add(new resItem("com.htc", "color", "listview_app_background", R.color.listview_app_background));
allRes.add(new resItem("com.htc.framework", "drawable", "common_div", R.drawable.common_div));
allRes.add(new resItem("com.htc", "drawable", "common_div", R.drawable.common_div));
allRes.add(new resItem("com.htc", "drawable", "btn_star_off_normal_holo_light", R.drawable.btn_star_off_normal_holo_light));
allRes.add(new resItem("com.htc", "drawable", "common_b_bg_div", R.drawable.common_b_bg_div));
allRes.add(new resItem("com.htc", "drawable", "common_b_div", R.drawable.common_b_div));
allRes.add(new resItem("com.htc", "drawable", "common_b_div_detail", R.drawable.common_b_div_detail));
//allRes.add(new resItem("com.htc", "drawable", "common_b_div_land", R.drawable.common_b_div_land));
allRes.add(new resItem("com.htc", "drawable", "common_b_inputfield_pressed", R.drawable.common_b_inputfield_pressed));
allRes.add(new resItem("com.htc", "drawable", "common_b_inputfield_rest", R.drawable.common_b_inputfield_rest));
allRes.add(new resItem("com.htc", "drawable", "common_bg_div", R.drawable.common_bg_div));
allRes.add(new resItem("com.htc", "drawable", "common_button_rest", R.drawable.common_button_rest));
allRes.add(new resItem("com.htc", "drawable", "common_collect_rest", R.drawable.common_collect_rest));
allRes.add(new resItem("com.htc", "drawable", "common_delete_rest", R.drawable.common_delete_rest));
//allRes.add(new resItem("com.htc", "drawable", "common_dialogbox_bottom_bright", R.drawable.common_dialogbox_bottom_bright));
//allRes.add(new resItem("com.htc", "drawable", "common_dialogbox_bottom_dark", R.drawable.common_dialogbox_bottom_dark));
//allRes.add(new resItem("com.htc", "drawable", "common_dialogbox_bottom_medium", R.drawable.common_dialogbox_bottom_medium));
allRes.add(new resItem("com.htc", "drawable", "common_dialogbox_center_bright", R.drawable.common_dialogbox_center_dark));
allRes.add(new resItem("com.htc", "drawable", "common_dialogbox_center_dark", R.drawable.common_dialogbox_center_dark));
allRes.add(new resItem("com.htc", "drawable", "common_dialogbox_center_medium", R.drawable.common_dialogbox_center_dark));
//allRes.add(new resItem("com.htc", "drawable", "common_dialogbox_full_bright", R.drawable.common_dialogbox_full_bright));
//allRes.add(new resItem("com.htc", "drawable", "common_dialogbox_full_dark", R.drawable.common_dialogbox_full_dark));
//allRes.add(new resItem("com.htc", "drawable", "common_dialogbox_top_bright", R.drawable.common_dialogbox_top_bright));
//allRes.add(new resItem("com.htc", "drawable", "common_dialogbox_top_dark", R.drawable.common_dialogbox_top_dark));
//allRes.add(new resItem("com.htc", "drawable", "common_div_detail", R.drawable.common_div_detail));
allRes.add(new resItem("com.htc", "drawable", "common_div_land", R.drawable.common_div_land));
allRes.add(new resItem("com.htc", "drawable", "common_dropdown_background", R.drawable.common_dropdown_background));
allRes.add(new resItem("com.htc", "drawable", "common_folder_bg", R.drawable.common_folder_bg));
allRes.add(new resItem("com.htc", "drawable", "common_grid_background", R.drawable.common_grid_background));
allRes.add(new resItem("com.htc", "drawable", "common_icon_clear_input_rest", R.drawable.common_icon_clear_input_rest));
allRes.add(new resItem("com.htc", "drawable", "common_inputfield_full_pressed", R.drawable.common_inputfield_full_pressed));
allRes.add(new resItem("com.htc", "drawable", "common_inputfield_full_rest", R.drawable.common_inputfield_full_rest));
allRes.add(new resItem("com.htc", "drawable", "common_inputfield_pressed", R.drawable.common_inputfield_pressed));
allRes.add(new resItem("com.htc", "drawable", "common_inputfield_rest", R.drawable.common_inputfield_rest));
allRes.add(new resItem("com.htc", "drawable", "common_list_div_top", R.drawable.common_list_div_top));
allRes.add(new resItem("com.htc", "drawable", "common_list_divider", R.drawable.common_list_divider));
allRes.add(new resItem("com.htc", "drawable", "common_list_shadow", R.drawable.common_list_shadow));
//allRes.add(new resItem("com.htc", "drawable", "common_footer", R.drawable.common_footer));
//allRes.add(new resItem("com.htc", "drawable", "common_panel", R.drawable.common_panel));
allRes.add(new resItem("com.htc", "drawable", "common_panel_dark", R.drawable.common_panel_dark));
allRes.add(new resItem("com.htc", "drawable", "common_panel_light", R.drawable.common_panel_light));
allRes.add(new resItem("com.htc", "drawable", "common_photo_frame", R.drawable.common_photo_frame));
//allRes.add(new resItem("com.htc", "drawable", "common_popupmenu", R.drawable.common_popupmenu));
allRes.add(new resItem("com.htc", "drawable", "common_progress_button", R.drawable.common_progress_button));
allRes.add(new resItem("com.htc", "drawable", "common_progress_empty", R.drawable.common_progress_empty));
allRes.add(new resItem("com.htc", "drawable", "common_progress_full", R.drawable.common_progress_full));
allRes.add(new resItem("com.htc", "drawable", "common_progress_full_empty", R.drawable.common_progress_full_empty));
allRes.add(new resItem("com.htc", "drawable", "common_radio_rest_dark", R.drawable.common_radio_rest_dark));
allRes.add(new resItem("com.htc", "drawable", "common_radio_rest_light", R.drawable.common_radio_rest_light));
allRes.add(new resItem("com.htc", "drawable", "common_rating_rest", R.drawable.common_rating_rest));
allRes.add(new resItem("com.htc", "drawable", "common_scroller_grip", R.drawable.common_scroller_grip));
allRes.add(new resItem("com.htc", "drawable", "common_stripe_off", R.drawable.common_stripe_off));
allRes.add(new resItem("com.htc", "drawable", "common_tab", R.drawable.common_tab));
allRes.add(new resItem("com.htc", "drawable", "common_tab_div", R.drawable.common_tab_div));
//allRes.add(new resItem("com.htc", "drawable", "common_tab_popupmenu", R.drawable.common_tab_popupmenu));
//allRes.add(new resItem("com.htc", "drawable", "common_tab_popupmenu_arrow", R.drawable.common_tab_popupmenu_arrow));
allRes.add(new resItem("com.htc", "drawable", "common_timer_shadow", R.drawable.common_timer_shadow));
allRes.add(new resItem("com.htc", "drawable", "common_timer_tumblers", R.drawable.common_timer_tumblers));
allRes.add(new resItem("com.htc", "drawable", "common_toggle_mask", R.drawable.common_toggle_mask));
allRes.add(new resItem("com.htc", "drawable", "common_toggle_mask_dark", R.drawable.common_toggle_mask_dark));
allRes.add(new resItem("com.htc", "drawable", "common_toggle_on", R.drawable.common_toggle_on));
allRes.add(new resItem("com.htc", "drawable", "common_toggle_outer", R.drawable.common_toggle_outer));
allRes.add(new resItem("com.htc", "drawable", "common_toggle_outer_dark", R.drawable.common_toggle_outer_dark));
allRes.add(new resItem("com.htc", "drawable", "common_toggle_rest", R.drawable.common_toggle_rest));
allRes.add(new resItem("com.htc", "drawable", "common_toggle_rest_dark", R.drawable.common_toggle_rest_dark));
allRes.add(new resItem("com.htc", "drawable", "dialog_top_holo_dark", R.drawable.dialog_top_holo_dark));
allRes.add(new resItem("com.htc", "drawable", "dialog_middle_holo_dark", R.drawable.dialog_middle_holo_dark));
allRes.add(new resItem("com.htc", "drawable", "dialog_bottom_holo_dark", R.drawable.dialog_bottom_holo_dark));
allRes.add(new resItem("com.htc", "drawable", "dialog_full_holo_dark", R.drawable.dialog_full_holo_dark));
allRes.add(new resItem("com.htc", "drawable", "editbox_dropdown_background_dark", R.drawable.editbox_dropdown_background_dark));
allRes.add(new resItem("com.htc", "drawable", "lockscreen_drag_direction_green", R.drawable.lockscreen_drag_direction_green));
allRes.add(new resItem("com.htc", "drawable", "lockscreen_point_green", R.drawable.lockscreen_point_green));
allRes.add(new resItem("com.htc", "drawable", "menu_dropdown_panel_holo_dark", R.drawable.menu_dropdown_panel_holo_dark));
allRes.add(new resItem("com.htc", "drawable", "menu_dropdown_panel_holo_light", R.drawable.menu_dropdown_panel_holo_dark));
allRes.add(new resItem("com.htc", "drawable", "menu_hardkey_panel_holo_dark", R.drawable.menu_hardkey_panel_holo_dark));
allRes.add(new resItem("com.htc", "drawable", "menu_hardkey_panel_holo_light", R.drawable.menu_hardkey_panel_holo_dark));
allRes.add(new resItem("com.htc", "drawable", "rate_star_big_half_holo_dark", R.drawable.rate_star_big_half_holo_dark));
allRes.add(new resItem("com.htc", "drawable", "rate_star_big_half_holo_light", R.drawable.rate_star_big_half_holo_light));
allRes.add(new resItem("com.htc", "drawable", "rate_star_big_off_holo_dark", R.drawable.rate_star_big_off_holo_dark));
allRes.add(new resItem("com.htc", "drawable", "rate_star_big_off_holo_light", R.drawable.rate_star_big_off_holo_light));
allRes.add(new resItem("com.htc", "drawable", "rate_star_small_half_holo_dark", R.drawable.rate_star_small_half_holo_dark));
allRes.add(new resItem("com.htc", "drawable", "rate_star_small_half_holo_light", R.drawable.rate_star_small_half_holo_light));
allRes.add(new resItem("com.htc", "drawable", "rate_star_small_off_holo_dark", R.drawable.rate_star_small_off_holo_dark));
allRes.add(new resItem("com.htc", "drawable", "rate_star_small_off_holo_light", R.drawable.rate_star_small_off_holo_light));
allRes.add(new resItem("com.htc", "drawable", "section_b_divider_top", R.drawable.section_b_divider_top));
allRes.add(new resItem("com.htc", "drawable", "section_divider_top", R.drawable.section_divider_top));
allRes.add(new resItem("com.htc", "drawable", "common_b_checkbox_rest", R.drawable.common_b_checkbox_rest));
allRes.add(new resItem("com.htc", "drawable", "common_b_circle_outer", R.drawable.common_b_circle_outer));
allRes.add(new resItem("com.htc", "drawable", "common_checkbox_on", R.drawable.common_checkbox_on));
allRes.add(new resItem("com.htc", "drawable", "common_checkbox_partial", R.drawable.common_checkbox_partial));
allRes.add(new resItem("com.htc", "drawable", "common_checkbox_rest", R.drawable.common_checkbox_rest));
allRes.add(new resItem("com.htc", "drawable", "common_circle_outer", R.drawable.common_circle_outer));
//allRes.add(new resItem("android", "drawable", "btn_circle_disable", R.drawable.btn_circle_disable));
//allRes.add(new resItem("android", "drawable", "btn_circle_disable_focused", R.drawable.btn_circle_disable_focused));
//allRes.add(new resItem("android", "drawable", "btn_circle_normal", R.drawable.btn_circle_normal));
//allRes.add(new resItem("android", "drawable", "btn_circle_pressed", R.drawable.btn_circle_pressed));
//allRes.add(new resItem("android", "drawable", "btn_circle_selected", R.drawable.btn_circle_selected));
//allRes.add(new resItem("android", "drawable", "btn_radio_off", R.drawable.btn_radio_off));
//allRes.add(new resItem("android", "drawable", "btn_radio_off_pressed", R.drawable.btn_radio_off_pressed));
//allRes.add(new resItem("android", "drawable", "btn_radio_off_selected", R.drawable.btn_radio_off_selected));
//allRes.add(new resItem("android", "drawable", "btn_radio_on", R.drawable.btn_radio_on));
//allRes.add(new resItem("android", "drawable", "btn_radio_on_pressed", R.drawable.btn_radio_on_pressed));
//allRes.add(new resItem("android", "drawable", "btn_radio_on_selected", R.drawable.btn_radio_on_selected));
//allRes.add(new resItem("android", "drawable", "radiobutton_off_background", R.drawable.radiobutton_off_background));
//allRes.add(new resItem("android", "drawable", "radiobutton_on_background", R.drawable.radiobutton_on_background));
//allRes.add(new resItem("android", "drawable", "btn_radio_off", R.drawable.btn_radio_off));
//allRes.add(new resItem("android", "drawable", "btn_radio_on", R.drawable.btn_radio_on));
allRes.add(new resItem("android", "drawable", "menu_hardkey_panel_holo_dark", R.drawable.menu_hardkey_panel_holo_dark));
allRes.add(new resItem("android", "drawable", "background_holo_dark", R.drawable.background_holo_dark));
allRes.add(new resItem("android", "drawable", "bottom_bar", R.drawable.bottom_bar));
allRes.add(new resItem("android", "drawable", "btn_global_search_normal", R.drawable.btn_global_search_normal));
allRes.add(new resItem("android", "drawable", "btn_rating_star_off_normal", R.drawable.btn_rating_star_off_normal));
allRes.add(new resItem("android", "drawable", "btn_square_overlay_normal", R.drawable.btn_square_overlay_normal));
allRes.add(new resItem("android", "drawable", "btn_star_big_off", R.drawable.btn_star_big_off));
allRes.add(new resItem("android", "drawable", "btn_star_big_off_disable", R.drawable.btn_star_big_off_disable));
allRes.add(new resItem("android", "drawable", "dialog_bottom_holo_dark", R.drawable.dialog_bottom_holo_dark));
allRes.add(new resItem("android", "drawable", "dialog_full_holo_dark", R.drawable.dialog_full_holo_dark));
allRes.add(new resItem("android", "drawable", "dialog_middle_holo_dark", R.drawable.dialog_middle_holo_dark_android));
allRes.add(new resItem("android", "drawable", "dialog_top_holo_dark", R.drawable.dialog_top_holo_dark_android));
allRes.add(new resItem("android", "drawable", "popup_bottom_bright", R.drawable.popup_bottom_dark));
allRes.add(new resItem("android", "drawable", "popup_bottom_dark", R.drawable.popup_bottom_dark));
allRes.add(new resItem("android", "drawable", "popup_bottom_medium", R.drawable.popup_bottom_dark));
allRes.add(new resItem("android", "drawable", "popup_center_bright", R.drawable.popup_center_dark));
allRes.add(new resItem("android", "drawable", "popup_center_dark", R.drawable.popup_center_dark));
allRes.add(new resItem("android", "drawable", "popup_center_medium", R.drawable.popup_center_dark));
allRes.add(new resItem("android", "drawable", "popup_full_bright", R.drawable.popup_full_dark));
allRes.add(new resItem("android", "drawable", "popup_full_dark", R.drawable.popup_full_dark));
allRes.add(new resItem("android", "drawable", "popup_top_bright", R.drawable.popup_top_dark));
allRes.add(new resItem("android", "drawable", "popup_top_dark", R.drawable.popup_top_dark));
allRes.add(new resItem("android", "drawable", "rate_star_big_half", R.drawable.rate_star_big_half));
allRes.add(new resItem("android", "drawable", "rate_star_big_off", R.drawable.rate_star_big_off));
allRes.add(new resItem("android", "drawable", "rate_star_med_half", R.drawable.rate_star_med_half));
allRes.add(new resItem("android", "drawable", "rate_star_med_off", R.drawable.rate_star_med_off));
allRes.add(new resItem("android", "drawable", "rate_star_small_half", R.drawable.rate_star_small_half));
allRes.add(new resItem("android", "drawable", "rate_star_small_off", R.drawable.rate_star_small_off));
allRes.add(new resItem("android", "drawable", "seek_thumb_normal", R.drawable.seek_thumb_normal));
allRes.add(new resItem("android", "drawable", "star_big_off", R.drawable.star_big_off));
allRes.add(new resItem("android", "drawable", "star_off", R.drawable.star_off));
allRes.add(new resItem("android", "drawable", "title_bar_portrait", R.drawable.title_bar_portrait));
allRes.add(new resItem("android", "drawable", "overscroll_edge", R.drawable.overscroll_edge));
allRes.add(new resItem("android", "drawable", "overscroll_glow", R.drawable.overscroll_glow));
allRes.add(new resItem("android", "drawable", "list_selector_background_focus", R.drawable.list_selector_background_focus));
allRes.add(new resItem("android", "drawable", "list_selector_background_longpress", R.drawable.list_selector_background_longpress));
allRes.add(new resItem("android", "drawable", "list_selector_background_pressed", R.drawable.list_selector_background_pressed));
final XModuleResources modRes = XModuleResources.createInstance(MODULE_PATH, null);
for (resItem resi : allRes) try {
XResources.setSystemWideReplacement(resi.pkg, resi.type, resi.name, modRes.fwd(resi.resId));
} catch (Throwable t) { XposedBridge.log(t); }
XResources.setSystemWideReplacement("com.htc", "drawable", "common_app_bkg", new XResources.DrawableLoader() {
@Override
public Drawable newDrawable(XResources res, int id) throws Throwable {
return new ColorDrawable(modRes.getColor(R.color.ap_background_color));
}
});
/*
XResources.setSystemWideReplacement("com.htc:drawable/common_header", new XResources.DrawableLoader(){
@Override
public Drawable newDrawable(XResources res, int id) throws Throwable {
return new ColorDrawable(Color.TRANSPARENT);
}
});
*/
XResources.setSystemWideReplacement("com.htc:drawable/common_panel", new XResources.DrawableLoader(){
@Override
public Drawable newDrawable(XResources res, int id) throws Throwable {
return new ColorDrawable(Color.TRANSPARENT);
}
});
XResources.setSystemWideReplacement("com.htc:drawable/common_footer", new XResources.DrawableLoader(){
@Override
public Drawable newDrawable(XResources res, int id) throws Throwable {
return new ColorDrawable(Color.TRANSPARENT);
}
});
findAndHookMethod("com.htc.fragment.widget.CarouselUtil.Skin", null, "getBackgroundColorDark", Context.class, AttributeSet.class, new XC_MethodHook() {
@Override
protected void beforeHookedMethod(final MethodHookParam param) throws Throwable {
param.setResult(0xff161616);
}
});
findAndHookMethod("com.htc.fragment.widget.CarouselUtil.Skin", null, "getBackgroundColorLight", Context.class, AttributeSet.class, new XC_MethodHook() {
@Override
protected void beforeHookedMethod(final MethodHookParam param) throws Throwable {
param.setResult(0xff161616);
}
});
findAndHookMethod("com.htc.fragment.widget.CarouselUtil.Skin", null, "getExpandedBackgroundColor", Context.class, AttributeSet.class, new XC_MethodHook() {
@Override
protected void beforeHookedMethod(final MethodHookParam param) throws Throwable {
param.setResult(0xff161616);
}
});
findAndHookMethod("com.htc.fragment.widget.CarouselUtil.Skin", null, "getExpandedShadowColor", Context.class, AttributeSet.class, new XC_MethodHook() {
@Override
protected void beforeHookedMethod(final MethodHookParam param) throws Throwable {
param.setResult(0xff232323);
}
});
findAndHookMethod("com.htc.view.viewpager.HtcViewPager", null, "init", Context.class, new XC_MethodHook() {
@Override
protected void afterHookedMethod(final MethodHookParam param) throws Throwable {
ViewGroup viewPager = (ViewGroup)param.thisObject;
viewPager.setBackgroundColor(0xff161616);
}
});
XposedBridge.hookAllConstructors(findClass("com.htc.widget.HtcListView", null), new XC_MethodHook() {
@Override
protected void afterHookedMethod(final MethodHookParam param) throws Throwable {
XposedHelpers.setObjectField(param.thisObject, "mLightDivider", new ColorDrawable(0xff131313));
XposedHelpers.setObjectField(param.thisObject, "mDarkDivider", new ColorDrawable(0xff131313));
}
});
XposedBridge.hookAllConstructors(findClass("android.widget.ListView", null), new XC_MethodHook() {
@Override
protected void afterHookedMethod(final MethodHookParam param) throws Throwable {
XposedHelpers.setObjectField(param.thisObject, "mLightDivider", new ColorDrawable(0xff131313));
}
});
try {
XResources.hookSystemWideLayout("android", "layout", "transient_notification", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
changeToast(liparam.view);
}
});
findAndHookMethod("android.widget.Toast", null, "makeText", Context.class, CharSequence.class, int.class, new XC_MethodHook() {
@Override
public void afterHookedMethod(final MethodHookParam param) throws Throwable {
Toast tst = (Toast)param.getResult();
if (tst != null) changeToast(tst.getView());
}
});
} catch (Throwable t) {
XposedBridge.log(t);
}
}
@Override
public void handleInitPackageResources(InitPackageResourcesParam resparam) throws Throwable {
XModuleResources modRes = XModuleResources.createInstance(MODULE_PATH, resparam.res);
if (resparam.packageName.equals("com.htc.launcher")) try {
resparam.res.setReplacement("com.htc.launcher", "drawable", "gallery_checkbox_on", modRes.fwd(R.drawable.gallery_checkbox_on));
} catch (Throwable t) { XposedBridge.log(t); }
if (resparam.packageName.equals("com.android.settings")) try {
resparam.res.setReplacement("com.android.settings", "color", "background_color", modRes.fwd(R.color.ap_background_color));
resparam.res.setReplacement("com.android.settings", "color", "list_light_background", modRes.fwd(R.color.list_light_background));
} catch (Throwable t) { XposedBridge.log(t); }
if (resparam.packageName.equals("com.htc.android.worldclock")) try {
resparam.res.setReplacement("com.htc.android.worldclock", "color", "black", modRes.fwd(R.color.worldclock_black));
resparam.res.setReplacement("com.htc.android.worldclock", "color", "day_color", modRes.fwd(R.color.worldclock_day_color));
//resparam.res.setReplacement("com.htc.android.worldclock", "color", "list_primary_font_color", modRes.fwd(R.color.worldclock_list_primary_font_color));
//resparam.res.setReplacement("com.htc.android.worldclock", "color", "list_secondary_font_color", modRes.fwd(R.color.worldclock_list_secondary_font_color));
} catch (Throwable t) { XposedBridge.log(t); }
if (resparam.packageName.equals("com.htc.calendar")) try {
resparam.res.setReplacement("com.htc.calendar", "color", "month_view_background", modRes.fwd(R.color.calendar_month_view_background));
resparam.res.setReplacement("com.htc.calendar", "color", "month_agenda_background", modRes.fwd(R.color.calendar_month_agenda_background));
resparam.res.setReplacement("com.htc.calendar", "color", "event_background_color", modRes.fwd(R.color.calendar_event_background_color));
resparam.res.setReplacement("com.htc.calendar", "color", "light_primaryfont_color", modRes.fwd(R.color.calendar_light_primaryfont_color));
resparam.res.setReplacement("com.htc.calendar", "color", "month_day_number", modRes.fwd(R.color.calendar_month_day_number));
resparam.res.setReplacement("com.htc.calendar", "color", "month_other_month_day_number", modRes.fwd(R.color.calendar_month_other_month_day_number));
resparam.res.setReplacement("com.htc.calendar", "color", "htc_more_all_day_event", modRes.fwd(R.color.calendar_htc_more_all_day_event));
resparam.res.setReplacement("com.htc.calendar", "color", "all_day_event_color", modRes.fwd(R.color.calendar_all_day_event_color));
resparam.res.setReplacement("com.htc.calendar", "color", "more_event_text_color", modRes.fwd(R.color.calendar_more_event_text_color));
resparam.res.setReplacement("com.htc.calendar", "color", "dark_primaryfont_color", modRes.fwd(R.color.calendar_dark_primaryfont_color));
resparam.res.setReplacement("com.htc.calendar", "color", "event_center", modRes.fwd(R.color.calendar_event_center));
resparam.res.setReplacement("com.htc.calendar", "color", "view_pager_margin_center_color", modRes.fwd(R.color.calendar_view_pager_margin_center_color));
resparam.res.setReplacement("com.htc.calendar", "color", "view_pager_margin_shadow_color", modRes.fwd(R.color.calendar_view_pager_margin_shadow_color));
resparam.res.setReplacement("com.htc.calendar", "drawable", "common_list_div_top", modRes.fwd(R.drawable.common_list_div_top));
resparam.res.setReplacement("com.htc.calendar", "drawable", "common_tab", modRes.fwd(R.drawable.common_tab));
} catch (Throwable t) { XposedBridge.log(t); }
if (resparam.packageName.equals("com.htc.calendar")) try {
resparam.res.setReplacement("com.htc.calendar", "color", "month_view_background", modRes.fwd(R.color.calendar_month_view_background));
} catch (Throwable t) { XposedBridge.log(t); }
if (resparam.packageName.equals("com.android.documentsui")) try {
resparam.res.setReplacement("com.android.documentsui", "drawable", "ic_breadcrumb_arrow", modRes.fwd(R.drawable.ic_breadcrumb_arrow));
resparam.res.setReplacement("com.android.documentsui", "drawable", "ic_cab_accept", modRes.fwd(R.drawable.ic_cab_accept));
resparam.res.setReplacement("com.android.documentsui", "drawable", "ic_cab_cancel", modRes.fwd(R.drawable.ic_cab_cancel));
resparam.res.setReplacement("com.android.documentsui", "drawable", "ic_cab_select_item", modRes.fwd(R.drawable.ic_cab_select_item));
resparam.res.setReplacement("com.android.documentsui", "drawable", "ic_dialog_alert", modRes.fwd(R.drawable.ic_dialog_alert));
resparam.res.setReplacement("com.android.documentsui", "drawable", "ic_dialog_info", modRes.fwd(R.drawable.ic_dialog_info));
resparam.res.setReplacement("com.android.documentsui", "drawable", "ic_dir_shadow", modRes.fwd(R.drawable.ic_dir_shadow));
resparam.res.setReplacement("com.android.documentsui", "drawable", "ic_doc_album", modRes.fwd(R.drawable.ic_doc_album));
resparam.res.setReplacement("com.android.documentsui", "drawable", "ic_doc_apk", modRes.fwd(R.drawable.ic_doc_apk));
resparam.res.setReplacement("com.android.documentsui", "drawable", "ic_doc_audio", modRes.fwd(R.drawable.ic_doc_audio));
resparam.res.setReplacement("com.android.documentsui", "drawable", "ic_doc_certificate", modRes.fwd(R.drawable.ic_doc_certificate));
resparam.res.setReplacement("com.android.documentsui", "drawable", "ic_doc_codes", modRes.fwd(R.drawable.ic_doc_codes));
resparam.res.setReplacement("com.android.documentsui", "drawable", "ic_doc_compressed", modRes.fwd(R.drawable.ic_doc_compressed));
resparam.res.setReplacement("com.android.documentsui", "drawable", "ic_doc_contact", modRes.fwd(R.drawable.ic_doc_contact));
resparam.res.setReplacement("com.android.documentsui", "drawable", "ic_doc_event", modRes.fwd(R.drawable.ic_doc_event));
resparam.res.setReplacement("com.android.documentsui", "drawable", "ic_doc_font", modRes.fwd(R.drawable.ic_doc_font));
resparam.res.setReplacement("com.android.documentsui", "drawable", "ic_doc_generic", modRes.fwd(R.drawable.ic_doc_generic));
resparam.res.setReplacement("com.android.documentsui", "drawable", "ic_doc_image", modRes.fwd(R.drawable.ic_doc_image));
resparam.res.setReplacement("com.android.documentsui", "drawable", "ic_doc_pdf", modRes.fwd(R.drawable.ic_doc_pdf));
resparam.res.setReplacement("com.android.documentsui", "drawable", "ic_doc_presentation", modRes.fwd(R.drawable.ic_doc_presentation));
resparam.res.setReplacement("com.android.documentsui", "drawable", "ic_doc_spreadsheet", modRes.fwd(R.drawable.ic_doc_spreadsheet));
resparam.res.setReplacement("com.android.documentsui", "drawable", "ic_doc_text", modRes.fwd(R.drawable.ic_doc_text));
resparam.res.setReplacement("com.android.documentsui", "drawable", "ic_doc_video", modRes.fwd(R.drawable.ic_doc_video));
resparam.res.setReplacement("com.android.documentsui", "drawable", "ic_drawer_glyph", modRes.fwd(R.drawable.ic_drawer_glyph));
resparam.res.setReplacement("com.android.documentsui", "drawable", "ic_drawer_hairline_divider", modRes.fwd(R.drawable.ic_drawer_hairline_divider));
resparam.res.setReplacement("com.android.documentsui", "drawable", "ic_drawer_shadow", modRes.fwd(R.drawable.ic_drawer_shadow));
resparam.res.setReplacement("com.android.documentsui", "drawable", "ic_drawer_shadow_tablet", modRes.fwd(R.drawable.ic_drawer_shadow_tablet));
resparam.res.setReplacement("com.android.documentsui", "drawable", "ic_drawer_tall_divider", modRes.fwd(R.drawable.ic_drawer_tall_divider));
resparam.res.setReplacement("com.android.documentsui", "drawable", "ic_grid_card_background", modRes.fwd(R.drawable.ic_grid_card_background));
resparam.res.setReplacement("com.android.documentsui", "drawable", "ic_grid_folder", modRes.fwd(R.drawable.ic_grid_folder));
resparam.res.setReplacement("com.android.documentsui", "drawable", "ic_menu_copy", modRes.fwd(R.drawable.ic_menu_copy));
resparam.res.setReplacement("com.android.documentsui", "drawable", "ic_menu_delete", modRes.fwd(R.drawable.ic_menu_delete));
resparam.res.setReplacement("com.android.documentsui", "drawable", "ic_menu_new_folder", modRes.fwd(R.drawable.ic_menu_new_folder));
resparam.res.setReplacement("com.android.documentsui", "drawable", "ic_menu_overflow", modRes.fwd(R.drawable.ic_menu_overflow));
resparam.res.setReplacement("com.android.documentsui", "drawable", "ic_menu_rename", modRes.fwd(R.drawable.ic_menu_rename));
resparam.res.setReplacement("com.android.documentsui", "drawable", "ic_menu_search", modRes.fwd(R.drawable.ic_menu_search));
resparam.res.setReplacement("com.android.documentsui", "drawable", "ic_menu_settings", modRes.fwd(R.drawable.ic_menu_settings));
resparam.res.setReplacement("com.android.documentsui", "drawable", "ic_menu_share", modRes.fwd(R.drawable.ic_menu_share));
resparam.res.setReplacement("com.android.documentsui", "drawable", "ic_menu_sortby", modRes.fwd(R.drawable.ic_menu_sortby));
resparam.res.setReplacement("com.android.documentsui", "drawable", "ic_menu_undo", modRes.fwd(R.drawable.ic_menu_undo));
resparam.res.setReplacement("com.android.documentsui", "drawable", "ic_menu_view_grid", modRes.fwd(R.drawable.ic_menu_view_grid));
resparam.res.setReplacement("com.android.documentsui", "drawable", "ic_menu_view_list", modRes.fwd(R.drawable.ic_menu_view_list));
resparam.res.setReplacement("com.android.documentsui", "drawable", "ic_open", modRes.fwd(R.drawable.ic_open));
resparam.res.setReplacement("com.android.documentsui", "drawable", "ic_popout", modRes.fwd(R.drawable.ic_popout));
resparam.res.setReplacement("com.android.documentsui", "drawable", "ic_root_download", modRes.fwd(R.drawable.ic_root_download));
resparam.res.setReplacement("com.android.documentsui", "drawable", "ic_root_folder", modRes.fwd(R.drawable.ic_root_folder));
resparam.res.setReplacement("com.android.documentsui", "drawable", "ic_root_recent", modRes.fwd(R.drawable.ic_root_recent));
resparam.res.setReplacement("com.android.documentsui", "drawable", "ic_root_sdcard", modRes.fwd(R.drawable.ic_root_sdcard));
resparam.res.setReplacement("com.android.documentsui", "drawable", "ic_root_usb", modRes.fwd(R.drawable.ic_root_usb));
resparam.res.setReplacement("com.android.documentsui", "drawable", "ic_subdirectory_arrow", modRes.fwd(R.drawable.ic_subdirectory_arrow));
resparam.res.setReplacement("com.android.documentsui", "color", "chip", modRes.fwd(R.color.documentsui_chip));
resparam.res.setReplacement("com.android.documentsui", "color", "item_root_pressed", modRes.fwd(R.color.documentsui_item_root_pressed));
resparam.res.setReplacement("com.android.documentsui", "color", "item_root_focused", modRes.fwd(R.color.documentsui_item_root_focused));
} catch (Throwable t) { XposedBridge.log(t); }
// Theme YouTube
if (resparam.packageName.equals("com.google.android.youtube")) try {
resparam.res.setReplacement("com.google.android.youtube", "drawable", "abc_ab_bottom_solid_light_holo", modRes.fwd(R.drawable.abc_ab_bottom_solid_light_holo));
resparam.res.setReplacement("com.google.android.youtube", "drawable", "abc_ab_solid_light_holo", modRes.fwd(R.drawable.abc_ab_solid_light_holo));
resparam.res.setReplacement("com.google.android.youtube", "drawable", "abc_ab_stacked_solid_light_holo", modRes.fwd(R.drawable.abc_ab_stacked_solid_light_holo));
resparam.res.setReplacement("com.google.android.youtube", "drawable", "abc_list_selector_disabled_holo_light", modRes.fwd(R.drawable.abc_list_selector_disabled_holo_light));
resparam.res.setReplacement("com.google.android.youtube", "drawable", "abc_menu_dropdown_panel_holo_light", modRes.fwd(R.drawable.abc_menu_dropdown_panel_holo_light));
resparam.res.setReplacement("com.google.android.youtube", "drawable", "abc_menu_hardkey_panel_holo_light", modRes.fwd(R.drawable.abc_menu_hardkey_panel_holo_light));
resparam.res.setReplacement("com.google.android.youtube", "drawable", "action_bar_background", modRes.fwd(R.drawable.action_bar_background));
resparam.res.setReplacement("com.google.android.youtube", "drawable", "card_frame", modRes.fwd(R.drawable.card_frame));
resparam.res.setReplacement("com.google.android.youtube", "drawable", "card_frame_bottom", modRes.fwd(R.drawable.card_frame_bottom));
resparam.res.setReplacement("com.google.android.youtube", "drawable", "card_frame_middle", modRes.fwd(R.drawable.card_frame_middle));
resparam.res.setReplacement("com.google.android.youtube", "drawable", "card_frame_top", modRes.fwd(R.drawable.card_frame_top));
resparam.res.setReplacement("com.google.android.youtube", "drawable", "card_frame_selected", modRes.fwd(R.drawable.card_frame_selected));
resparam.res.setReplacement("com.google.android.youtube", "drawable", "card_frame_bottom_selected", modRes.fwd(R.drawable.card_frame_bottom_selected));
resparam.res.setReplacement("com.google.android.youtube", "drawable", "card_frame_middle_selected", modRes.fwd(R.drawable.card_frame_middle_selected));
resparam.res.setReplacement("com.google.android.youtube", "drawable", "card_frame_top_selected", modRes.fwd(R.drawable.card_frame_top_selected));
resparam.res.setReplacement("com.google.android.youtube", "drawable", "arrow_down", modRes.fwd(R.drawable.arrow_down));
resparam.res.setReplacement("com.google.android.youtube", "drawable", "arrow_up", modRes.fwd(R.drawable.arrow_up));
resparam.res.setReplacement("com.google.android.youtube", "drawable", "btn_subscribed", modRes.fwd(R.drawable.btn_subscribed));
resparam.res.setReplacement("com.google.android.youtube", "drawable", "btn_subscribed_pressed", modRes.fwd(R.drawable.btn_subscribed_pressed));
resparam.res.setReplacement("com.google.android.youtube", "drawable", "contextual_menu_anchor_normal", modRes.fwd(R.drawable.contextual_menu_anchor_normal));
resparam.res.setReplacement("com.google.android.youtube", "drawable", "contextual_menu_background", modRes.fwd(R.drawable.contextual_menu_background));
resparam.res.setReplacement("com.google.android.youtube", "drawable", "ic_dislike", modRes.fwd(R.drawable.ic_dislike));
resparam.res.setReplacement("com.google.android.youtube", "drawable", "ic_like", modRes.fwd(R.drawable.ic_like));
//resparam.res.setReplacement("com.google.android.youtube", "drawable", "ic_flag", modRes.fwd(R.drawable.ic_flag));
resparam.res.setReplacement("com.google.android.youtube", "drawable", "ic_menu_add", modRes.fwd(R.drawable.ic_menu_add));
resparam.res.setReplacement("com.google.android.youtube", "drawable", "ic_menu_search", modRes.fwd(R.drawable.ic_menu_search));
resparam.res.setReplacement("com.google.android.youtube", "drawable", "ic_menu_upload", modRes.fwd(R.drawable.ic_menu_upload));
resparam.res.setReplacement("com.google.android.youtube", "drawable", "channel_store_item_border", modRes.fwd(R.drawable.channel_store_item_border));
resparam.res.setReplacement("com.google.android.youtube", "drawable", "tab_divider_dark", modRes.fwd(R.drawable.tab_divider_dark));
resparam.res.setReplacement("com.google.android.youtube", "drawable", "watch_card_background", modRes.fwd(R.drawable.watch_card_background));
resparam.res.setReplacement("com.google.android.youtube", "drawable", "alert_error", modRes.fwd(R.drawable.alert_error));
resparam.res.setReplacement("com.google.android.youtube", "drawable", "bg_stripes_light", modRes.fwd(R.drawable.bg_stripes_light));
resparam.res.setReplacement("com.google.android.youtube", "drawable", "bg_stripes_medium", modRes.fwd(R.drawable.bg_stripes_medium));
resparam.res.setReplacement("com.google.android.youtube", "drawable", "missing_avatar", modRes.fwd(R.drawable.missing_avatar));
resparam.res.setReplacement("com.google.android.youtube", "drawable", "description_fading_edge", modRes.fwd(R.drawable.description_fading_edge));
resparam.res.setReplacement("com.google.android.youtube", "drawable", "remote_watch_dialog_gradient", modRes.fwd(R.drawable.remote_watch_dialog_gradient));
resparam.res.setReplacement("com.google.android.youtube", "color", "primary_background", modRes.fwd(R.color.youtube_primary_background));
resparam.res.setReplacement("com.google.android.youtube", "color", "event_font", modRes.fwd(R.color.youtube_event_font));
resparam.res.setReplacement("com.google.android.youtube", "color", "white", modRes.fwd(R.color.youtube_white));
resparam.res.setReplacement("com.google.android.youtube", "color", "light_grey", modRes.fwd(R.color.youtube_light_grey));
resparam.res.setReplacement("com.google.android.youtube", "color", "grey", modRes.fwd(R.color.youtube_grey));
resparam.res.setReplacement("com.google.android.youtube", "color", "dark_grey", modRes.fwd(R.color.youtube_dark_grey));
resparam.res.setReplacement("com.google.android.youtube", "color", "lighter_transparent", modRes.fwd(R.color.youtube_lighter_transparent));
resparam.res.setReplacement("com.google.android.youtube", "color", "light_transparent", modRes.fwd(R.color.youtube_light_transparent));
resparam.res.setReplacement("com.google.android.youtube", "color", "contents_text", modRes.fwd(R.color.youtube_contents_text));
resparam.res.setReplacement("com.google.android.youtube", "color", "encode_view", modRes.fwd(R.color.youtube_encode_view));
resparam.res.setReplacement("com.google.android.youtube", "color", "help_button_view", modRes.fwd(R.color.youtube_help_button_view));
resparam.res.setReplacement("com.google.android.youtube", "color", "help_view", modRes.fwd(R.color.youtube_help_view));
resparam.res.setReplacement("com.google.android.youtube", "color", "result_image_border", modRes.fwd(R.color.youtube_result_image_border));
resparam.res.setReplacement("com.google.android.youtube", "color", "result_minor_text", modRes.fwd(R.color.youtube_result_minor_text));
resparam.res.setReplacement("com.google.android.youtube", "color", "result_text", modRes.fwd(R.color.youtube_result_text));
resparam.res.setReplacement("com.google.android.youtube", "color", "result_view", modRes.fwd(R.color.youtube_result_view));
resparam.res.setReplacement("com.google.android.youtube", "color", "sbc_header_text", modRes.fwd(R.color.youtube_sbc_header_text));
resparam.res.setReplacement("com.google.android.youtube", "color", "sbc_header_view", modRes.fwd(R.color.youtube_sbc_header_view));
resparam.res.setReplacement("com.google.android.youtube", "color", "sbc_list_item", modRes.fwd(R.color.youtube_sbc_list_item));
resparam.res.setReplacement("com.google.android.youtube", "color", "sbc_layout_view", modRes.fwd(R.color.youtube_sbc_layout_view));
resparam.res.setReplacement("com.google.android.youtube", "color", "sbc_page_number_text", modRes.fwd(R.color.youtube_sbc_page_number_text));
resparam.res.setReplacement("com.google.android.youtube", "color", "sbc_snippet_text", modRes.fwd(R.color.youtube_sbc_snippet_text));
resparam.res.setReplacement("com.google.android.youtube", "color", "share_text", modRes.fwd(R.color.youtube_share_text));
resparam.res.setReplacement("com.google.android.youtube", "color", "status_view", modRes.fwd(R.color.youtube_status_view));
resparam.res.setReplacement("com.google.android.youtube", "color", "status_text", modRes.fwd(R.color.youtube_status_text));
resparam.res.setReplacement("com.google.android.youtube", "color", "video_item_duration_font", modRes.fwd(R.color.youtube_video_item_duration_font));
resparam.res.setReplacement("com.google.android.youtube", "color", "video_item_title_font", modRes.fwd(R.color.youtube_video_item_title_font));
resparam.res.setReplacement("com.google.android.youtube", "color", "video_item_uploader_font", modRes.fwd(R.color.youtube_video_item_uploader_font));
resparam.res.setReplacement("com.google.android.youtube", "color", "video_item_light_font", modRes.fwd(R.color.youtube_video_item_light_font));
resparam.res.setReplacement("com.google.android.youtube", "color", "video_item_dark_font", modRes.fwd(R.color.youtube_video_item_dark_font));
resparam.res.setReplacement("com.google.android.youtube", "color", "set_bar_video_item_light_font", modRes.fwd(R.color.youtube_set_bar_video_item_light_font));
resparam.res.setReplacement("com.google.android.youtube", "color", "set_bar_video_item_dark_font", modRes.fwd(R.color.youtube_set_bar_video_item_dark_font));
resparam.res.setReplacement("com.google.android.youtube", "color", "watch_secondary_color", modRes.fwd(R.color.youtube_watch_secondary_color));
resparam.res.setReplacement("com.google.android.youtube", "color", "watch_thin_separator_color", modRes.fwd(R.color.youtube_watch_thin_separator_color));
resparam.res.setReplacement("com.google.android.youtube", "color", "watch_comment_time_color", modRes.fwd(R.color.youtube_watch_comment_time_color));
resparam.res.setReplacement("com.google.android.youtube", "color", "watch_subscribe_button_text_color", modRes.fwd(R.color.youtube_watch_subscribe_button_text_color));
resparam.res.setReplacement("com.google.android.youtube", "color", "watch_subscribed_button_text_color", modRes.fwd(R.color.youtube_watch_subscribed_button_text_color));
resparam.res.setReplacement("com.google.android.youtube", "color", "thumbnail_background_solid_color", modRes.fwd(R.color.youtube_thumbnail_background_solid_color));
resparam.res.setReplacement("com.google.android.youtube", "color", "card_separator_color", modRes.fwd(R.color.youtube_card_separator_color));
resparam.res.setReplacement("com.google.android.youtube", "color", "ics_grey", modRes.fwd(R.color.youtube_ics_grey));
resparam.res.setReplacement("com.google.android.youtube", "color", "ics_dark_grey", modRes.fwd(R.color.youtube_ics_dark_grey));
resparam.res.setReplacement("com.google.android.youtube", "color", "ics_blue", modRes.fwd(R.color.youtube_ics_blue));
resparam.res.setReplacement("com.google.android.youtube", "color", "ics_blue_glow", modRes.fwd(R.color.youtube_ics_blue_glow));
resparam.res.setReplacement("com.google.android.youtube", "dimen", "guide_separator_height", modRes.fwd(R.dimen.guide_separator_height));
resparam.res.setReplacement("com.google.android.youtube", "dimen", "card_separator_height", modRes.fwd(R.dimen.card_separator_height));
// Kill separators!
resparam.res.hookLayout("com.google.android.youtube", "layout", "distiller_load_more_button", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
ImageView separator = (ImageView)liparam.view.findViewById(liparam.res.getIdentifier("comment_separator", "id", "com.google.android.youtube"));
replaceImageSeparator(separator);
}
});
resparam.res.hookLayout("com.google.android.youtube", "layout", "distiller_top_level_comment", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
ImageView separator = (ImageView)liparam.view.findViewById(liparam.res.getIdentifier("comment_separator", "id", "com.google.android.youtube"));
replaceImageSeparator(separator);
}
});
resparam.res.hookLayout("com.google.android.youtube", "layout", "related_artist_item", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
ImageView separator = (ImageView)liparam.view.findViewById(liparam.res.getIdentifier("separator", "id", "com.google.android.youtube"));
replaceImageSeparator(separator);
}
});
resparam.res.hookLayout("com.google.android.youtube", "layout", "watch_card_list_item_separator", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
replaceSeparator(liparam.view);
}
});
resparam.res.hookLayout("com.google.android.youtube", "layout", "tab_separator", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
ImageView separator = (ImageView)liparam.view;
replaceImageSeparator(separator);
}
});
resparam.res.hookLayout("com.google.android.youtube", "layout", "like_dislike_panel", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
View separator = liparam.view.findViewById(liparam.res.getIdentifier("separator", "id", "com.google.android.youtube"));
replaceSeparator(separator);
}
});
resparam.res.hookLayout("com.google.android.youtube", "layout", "upload_item", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
View separator = liparam.view.findViewById(liparam.res.getIdentifier("separator", "id", "com.google.android.youtube"));
replaceSeparator(separator);
}
});
resparam.res.hookLayout("com.google.android.youtube", "layout", "video_feed_entry", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
View separator = liparam.view.findViewById(liparam.res.getIdentifier("separator", "id", "com.google.android.youtube"));
replaceSeparator(separator);
}
});
resparam.res.hookLayout("com.google.android.youtube", "layout", "detailed_video_item", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
ImageView separator = (ImageView)liparam.view.findViewById(liparam.res.getIdentifier("separator", "id", "com.google.android.youtube"));
replaceImageSeparator(separator);
}
});
resparam.res.hookLayout("com.google.android.youtube", "layout", "offline_video_item", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
View separator = liparam.view.findViewById(liparam.res.getIdentifier("separator", "id", "com.google.android.youtube"));
replaceSeparator(separator);
}
});
resparam.res.hookLayout("com.google.android.youtube", "layout", "guide_channel_header", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
LinearLayout header = (LinearLayout)liparam.view;
if (header.getChildCount() > 2) {
View separator = header.getChildAt(1);
replaceSeparator(separator);
}
}
});
resparam.res.hookLayout("com.google.android.youtube", "layout", "playlist_info_dialog_fragment", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
View content = liparam.view.findViewById(liparam.res.getIdentifier("content", "id", "com.google.android.youtube"));
XposedBridge.log(content.toString());
replaceSeparator(content);
View title = liparam.view.findViewById(liparam.res.getIdentifier("title", "id", "com.google.android.youtube"));
XposedBridge.log(title.getParent().toString());
replaceSeparator((LinearLayout)title.getParent());
}
});
resparam.res.hookLayout("com.google.android.youtube", "layout", "card_item_chrome", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
ImageView separator = (ImageView)liparam.view.findViewById(liparam.res.getIdentifier("separator", "id", "com.google.android.youtube"));
replaceImageSeparator(separator);
}
});
resparam.res.hookLayout("com.google.android.youtube", "layout", "distiller_header", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
ImageView separator = (ImageView)liparam.view.findViewById(liparam.res.getIdentifier("separator", "id", "com.google.android.youtube"));
replaceImageSeparator(separator);
}
});
resparam.res.hookLayout("com.google.android.youtube", "layout", "playlist_header", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
View separator = liparam.view.findViewById(liparam.res.getIdentifier("playlist_header_separator", "id", "com.google.android.youtube"));
replaceSeparator(separator);
LinearLayout actionsBar = (LinearLayout)liparam.view.findViewById(liparam.res.getIdentifier("actions_bar", "id", "com.google.android.youtube"));
replaceSeparator(actionsBar);
}
});
resparam.res.hookLayout("com.google.android.youtube", "layout", "watch_description_card", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
ImageView separator = (ImageView)liparam.view.findViewById(liparam.res.getIdentifier("separator", "id", "com.google.android.youtube"));
replaceImageSeparator(separator);
}
});
resparam.res.hookLayout("com.google.android.youtube", "layout", "contextual_menu_layout", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
ListView popuplistview = (ListView)liparam.view.findViewById(liparam.res.getIdentifier("items", "id", "com.google.android.youtube"));
replaceSeparator(popuplistview);
}
});
} catch (Throwable t) { XposedBridge.log(t); }
if (resparam.packageName.equals("com.htc.htcpowermanager")) try {
resparam.res.setReplacement("com.htc.htcpowermanager", "color", "title_text_font_color", modRes.fwd(R.color.htcpower_title_text_font_color));
} catch (Throwable t) { XposedBridge.log(t); }
if (resparam.packageName.equals("com.htc.usage")) try {
resparam.res.setReplacement("com.htc.usage", "color", "usage_chart_background", modRes.fwd(R.color.usage_usage_chart_background));
resparam.res.setReplacement("com.htc.usage", "color", "bg_usage_chart_secondary_fill", modRes.fwd(R.color.usage_bg_usage_chart_secondary_fill));
resparam.res.setReplacement("com.htc.usage", "color", "pie_chart_outline_stroke", modRes.fwd(R.color.usage_pie_chart_outline_stroke));
resparam.res.setReplacement("com.htc.usage", "color", "usage_chart_secondary_fill", modRes.fwd(R.color.usage_usage_chart_secondary_fill));
resparam.res.setReplacement("com.htc.usage", "color", "detail_usage_chart_secondary_fill", modRes.fwd(R.color.usage_detail_usage_chart_secondary_fill));
resparam.res.setReplacement("com.htc.usage", "drawable", "data_usage_grid_border", modRes.fwd(R.drawable.data_usage_grid_border));
resparam.res.setReplacement("com.htc.usage", "drawable", "data_usage_grid_primary", modRes.fwd(R.drawable.data_usage_grid_primary));
resparam.res.setReplacement("com.htc.usage", "drawable", "data_usage_grid_secondary", modRes.fwd(R.drawable.data_usage_grid_secondary));
} catch (Throwable t) { XposedBridge.log(t); }
if (resparam.packageName.equals("com.htc.Weather")) try {
resparam.res.setReplacement("com.htc.Weather", "color", "ap_background_color", modRes.fwd(R.color.background_dark));
} catch (Throwable t) { XposedBridge.log(t); }
}
private void replaceSeparator(View separator) {
if (separator != null) {
separator.setBackground(null);
separator.setBackgroundColor(0x161616);
}
}
private void replaceImageSeparator(ImageView separator) {
if (separator != null) {
separator.setImageDrawable(null);
separator.setBackground(null);
separator.setBackgroundColor(0x161616);
}
}
@Override
public void handleLoadPackage(final LoadPackageParam lpparam) throws Throwable {
final XModuleResources modRes = XModuleResources.createInstance(MODULE_PATH, null);
// Fix for phone number color in contacts
if (lpparam.packageName.equals("com.htc.contacts") || lpparam.packageName.equals("com.android.htccontacts")) {
try {
findAndHookMethod(lpparam.packageName + ".fragment.BrowseCallHistoryFragment", lpparam.classLoader, "bind2LineSecondaryText", lpparam.packageName + ".fragment.BrowseCallHistoryFragment.RecentCallsListItemCache", String.class, String.class, new XC_MethodHook() {
@Override
protected void afterHookedMethod(final MethodHookParam param) throws Throwable {
changeTextColor(param);
}
});
} catch (Throwable t) { }
try {
findAndHookMethod(lpparam.packageName + ".fragment.BrowseCallHistoryFragment", lpparam.classLoader, "bind2LineSecondaryText", lpparam.packageName + ".fragment.BrowseCallHistoryFragment.RecentCallsListItemCache", String.class, String.class, boolean.class, new XC_MethodHook() {
@Override
protected void afterHookedMethod(final MethodHookParam param) throws Throwable {
changeTextColor(param);
}
});
} catch (Throwable t) { }
}
// Fix for days of the week and description color in alarms
if (lpparam.packageName.equals("com.htc.android.worldclock")) try {
findAndHookMethod("com.htc.android.worldclock.alarmclock.AlarmClockResUtils", lpparam.classLoader, "setDescription", Context.class, View.class, String.class, new XC_MethodHook() {
@Override
protected void afterHookedMethod(final MethodHookParam param) throws Throwable {
String s = (String)param.args[2];
View view = (View)param.args[1];
TextView textview = (TextView)view.findViewById(view.getResources().getIdentifier("description", "id", "com.htc.android.worldclock"));
if (s != null && s.length() != 0)
textview.setTextColor(modRes.getColorStateList(R.color.worldclock_list_primary_font_color));
else
textview.setTextColor(modRes.getColorStateList(R.color.worldclock_list_secondary_font_color));
}
});
findAndHookMethod("com.htc.android.worldclock.alarmclock.AlarmClockResUtils", lpparam.classLoader, "setDaysOfWeek", Context.class, View.class, int.class, "com.htc.android.worldclock.alarmclock.AlarmUtils.DaysOfWeek" , new XC_MethodHook() {
@Override
protected void beforeHookedMethod(final MethodHookParam param) throws Throwable {
Object daysOfWeek = param.args[3];
XposedHelpers.setAdditionalStaticField(findClass("com.htc.android.worldclock.alarmclock.AlarmClockResUtils", lpparam.classLoader), "daysOfWeekTmp", daysOfWeek);
boolean[] daysOnOff = (boolean[])XposedHelpers.callMethod(daysOfWeek, "getBooleanArray");
for (int i = 0; i < 7; i++)
XposedHelpers.callMethod(daysOfWeek, "set", i, !daysOnOff[i]);
param.args[3] = daysOfWeek;
}
@Override
protected void afterHookedMethod(final MethodHookParam param) throws Throwable {
Object daysOfWeekTmp = XposedHelpers.getAdditionalStaticField(findClass("com.htc.android.worldclock.alarmclock.AlarmClockResUtils", lpparam.classLoader), "daysOfWeekTmp");
if (daysOfWeekTmp != null) param.args[3] = daysOfWeekTmp;
}
});
} catch (Throwable t) { XposedBridge.log(t); }
// Theme Downloads
if (lpparam.packageName.equals("com.android.documentsui")) try {
findAndHookMethod("com.android.documentsui.DocumentsActivity", lpparam.classLoader, "onCreate", Bundle.class, new XC_MethodHook() {
@Override
protected void beforeHookedMethod(final MethodHookParam param) throws Throwable {
Activity act = (Activity)param.thisObject;
act.setTheme(android.R.style.Theme_Holo_Light_DarkActionBar);
}
});
findAndHookMethod("com.android.documentsui.SettingsActivity", lpparam.classLoader, "onCreate", Bundle.class, new XC_MethodHook() {
@Override
protected void beforeHookedMethod(final MethodHookParam param) throws Throwable {
Activity act = (Activity)param.thisObject;
act.setTheme(android.R.style.Theme_Holo_DialogWhenLarge);
}
});
} catch (Throwable t) { XposedBridge.log(t); }
// Theme YouTube
if (lpparam.packageName.equals("com.google.android.youtube")) try {
findAndHookMethod("com.google.android.apps.youtube.app.YouTubeApplication", lpparam.classLoader, "d", new XC_MethodHook() {
@Override
protected void beforeHookedMethod(final MethodHookParam param) throws Throwable {
Application act = (Application)param.thisObject;
act.setTheme(act.getApplicationContext().getResources().getIdentifier("Theme.AppCompat", "style", act.getPackageName()));
}
});
findAndHookMethod("com.google.android.apps.youtube.app.WatchWhileActivity", lpparam.classLoader, "onCreate", Bundle.class, new XC_MethodHook() {
@Override
protected void beforeHookedMethod(final MethodHookParam param) throws Throwable {
Activity act = (Activity)param.thisObject;
act.setTheme(act.getApplicationContext().getResources().getIdentifier("Theme.AppCompat", "style", act.getPackageName()));
}
});
findAndHookMethod("com.google.android.apps.youtube.app.honeycomb.SettingsActivity", lpparam.classLoader, "onCreate", Bundle.class, new XC_MethodHook() {
@Override
protected void beforeHookedMethod(final MethodHookParam param) throws Throwable {
Activity act = (Activity)param.thisObject;
act.setTheme(act.getApplicationContext().getResources().getIdentifier("Theme.AppCompat", "style", act.getPackageName()));
}
});
findAndHookMethod("com.google.android.apps.youtube.app.honeycomb.SettingsActivityV8", lpparam.classLoader, "onCreate", Bundle.class, new XC_MethodHook() {
@Override
protected void beforeHookedMethod(final MethodHookParam param) throws Throwable {
Activity act = (Activity)param.thisObject;
act.setTheme(act.getApplicationContext().getResources().getIdentifier("Theme.AppCompat", "style", act.getPackageName()));
}
});
XposedBridge.hookAllConstructors(findClass("com.google.android.apps.youtube.core.ui.YouTubeTextView", lpparam.classLoader), new XC_MethodHook() {
@Override
protected void afterHookedMethod(final MethodHookParam param) throws Throwable {
TextView txt = (TextView)param.thisObject;
if (txt.getCurrentTextColor() == 0xff666666) txt.setTextColor(0xffefefef);
else if (txt.getCurrentTextColor() == 0xff333333 || txt.getCurrentTextColor() == 0xff222222) txt.setTextColor(0xffdfdfdf);
else if (txt.getCurrentTextColor() == 0xff1b7fcc) txt.setTextColor(0xff33b5e5);
}
});
XposedHelpers.setStaticIntField(findClass("com.google.android.apps.youtube.app.ui.TabbedView", lpparam.classLoader), "d", 0xffdfdfdf);
XposedHelpers.setStaticIntField(findClass("com.google.android.apps.youtube.app.ui.TabbedView", lpparam.classLoader), "e", 0xff161616);
} catch (Throwable t) { XposedBridge.log(t); }
if (lpparam.packageName.equals("com.htc.htcpowermanager")) try {
findAndHookMethod("com.htc.htcpowermanager.battery.BatteryHistoryView", lpparam.classLoader, "onDraw", Canvas.class, new XC_MethodHook() {
@Override
protected void afterHookedMethod(final MethodHookParam param) throws Throwable {
Canvas canvas = (Canvas)param.args[0];
LinearLayout bhv = (LinearLayout) param.thisObject;
if (canvas != null && bhv != null) {
Paint paint1 = new Paint();
paint1.setStyle(Paint.Style.FILL);
paint1.setARGB(255, 22, 22, 22);
canvas.drawRect(bhv.getLeft(), bhv.getTop(), bhv.getRight(), bhv.getBottom(), paint1);
}
}
});
XposedBridge.hookAllConstructors(findClass("com.htc.htcpowermanager.battery.BatteryHistoryChart.BatteryHistoryChartThread", lpparam.classLoader), new XC_MethodHook() {
@Override
protected void afterHookedMethod(final MethodHookParam param) throws Throwable {
Paint mBackgroundPaint = (Paint)XposedHelpers.getObjectField(param.thisObject, "mBackgroundPaint");
if (mBackgroundPaint != null) {
mBackgroundPaint.setARGB(0, 22, 22, 22);
XposedHelpers.setObjectField(param.thisObject, "mBackgroundPaint", mBackgroundPaint);
}
Paint mGridPaint = (Paint)XposedHelpers.getObjectField(param.thisObject, "mGridPaint");
if (mGridPaint != null) {
PorterDuffColorFilter porterduffcolorfilter = new PorterDuffColorFilter(0xff323232, android.graphics.PorterDuff.Mode.DST_OVER);
mGridPaint.setARGB(255, 70, 70, 70);
mGridPaint.setColorFilter(porterduffcolorfilter);
XposedHelpers.setObjectField(param.thisObject, "mGridPaint", mGridPaint);
}
Paint mBatteryCurvePaint = (Paint)XposedHelpers.getObjectField(param.thisObject, "mBatteryCurvePaint");
if (mBatteryCurvePaint != null) {
mBatteryCurvePaint.setAlpha(230);
XposedHelpers.setObjectField(param.thisObject, "mBatteryCurvePaint", mBatteryCurvePaint);
}
Paint mChargingPaint = (Paint)XposedHelpers.getObjectField(param.thisObject, "mChargingPaint");
if (mChargingPaint != null) {
mChargingPaint.setAlpha(230);
XposedHelpers.setObjectField(param.thisObject, "mChargingPaint", mChargingPaint);
}
Paint mScreenOnPaint = (Paint)XposedHelpers.getObjectField(param.thisObject, "mScreenOnPaint");
if (mScreenOnPaint != null) {
mScreenOnPaint.setAlpha(230);
XposedHelpers.setObjectField(param.thisObject, "mScreenOnPaint", mScreenOnPaint);
}
Paint mGpsOnPaint = (Paint)XposedHelpers.getObjectField(param.thisObject, "mGpsOnPaint");
if (mGpsOnPaint != null) {
mGpsOnPaint.setAlpha(230);
XposedHelpers.setObjectField(param.thisObject, "mGpsOnPaint", mGpsOnPaint);
}
Paint mWifiRunningPaint = (Paint)XposedHelpers.getObjectField(param.thisObject, "mWifiRunningPaint");
if (mWifiRunningPaint != null) {
mWifiRunningPaint.setAlpha(230);
XposedHelpers.setObjectField(param.thisObject, "mWifiRunningPaint", mWifiRunningPaint);
}
Paint mWakeLockPaint = (Paint)XposedHelpers.getObjectField(param.thisObject, "mWakeLockPaint");
if (mWakeLockPaint != null) {
mWakeLockPaint.setAlpha(230);
XposedHelpers.setObjectField(param.thisObject, "mWakeLockPaint", mWakeLockPaint);
}
}
});
} catch (Throwable t) { XposedBridge.log(t); }
}
}