From aa7e84fcb8314f2f765609c20a4fb714200f7f46 Mon Sep 17 00:00:00 2001 From: Paul Kocialkowski Date: Sat, 23 Apr 2011 12:31:35 +0200 Subject: fix cyanogenmod bug #2770 (cannot find symbol statusbar_background_sq) The cyanogenmod bug #2770 is available at : http://code.google.com/p/cyanogenmod/issues/detail?id=2770 The bug is a compilation failure which fails like that: target Dex: Development frameworks/base/services/java/com/android/server/status/StatusBarService.java:338: cannot find symbol symbol : variable statusbar_background_sq location: class com.android.internal.R.drawable mStatusBarView.setBackgroundDrawable(res.getDrawable(com.android.internal.R.drawable.statusbar_background_sq, [...] Note that only the commit message was touched by Denis 'GNUtoo' Carikli The patch itself was untouched. Signed-off-by: Paul Kocialkowski Acked-by: Denis 'GNUtoo' Carikli --- .../android/server/status/StatusBarService.java | 33 ++-------------------- .../android/server/status/TrackingPatternView.java | 12 ++------ 2 files changed, 4 insertions(+), 41 deletions(-) diff --git a/services/java/com/android/server/status/StatusBarService.java b/services/java/com/android/server/status/StatusBarService.java index 18154a5..42a6dc4 100644 --- a/services/java/com/android/server/status/StatusBarService.java +++ b/services/java/com/android/server/status/StatusBarService.java @@ -335,10 +335,6 @@ public class StatusBarService extends IStatusBar.Stub mDateView = (DateView)sb.findViewById(R.id.date); if (custNotBar) { - mStatusBarView.setBackgroundDrawable(res.getDrawable(com.android.internal.R.drawable.statusbar_background_sq, - notifBarColorMask, notifPDMode)); - mDateView.setBackgroundDrawable(res.getDrawable(com.android.internal.R.drawable.statusbar_background_sq, - notifBarColorMask, notifPDMode)); mDateView.setPadding(6, 0, 6, 0); } @@ -952,21 +948,7 @@ public class StatusBarService extends IStatusBar.Stub }); } ViewGroup content = (ViewGroup)row.findViewById(com.android.internal.R.id.content); - if (custExpBar) { - StateListDrawable sld = new StateListDrawable(); - int stateFocused = android.R.attr.state_focused; - int statePressed = android.R.attr.state_pressed; - Drawable colornormal = res.getDrawable(com.android.internal.R.drawable.status_bar_item_background_normal_cust); - Drawable colorfocused = res.getDrawable(com.android.internal.R.drawable.status_bar_item_background_focus_cust); - Drawable colorpressed = res.getDrawable(com.android.internal.R.drawable.status_bar_item_background_pressed_cust); - sld.addState(new int[] {stateFocused}, colorfocused); - sld.addState(new int[] {statePressed}, colorpressed); - sld.addState(new int[] {}, colornormal); - sld.mutate(); - sld.setColorFilter(expBarColorMask, expPDMode); - content.setBackgroundDrawable(sld); - - } + content.setDescendantFocusability(ViewGroup.FOCUS_BLOCK_DESCENDANTS); content.setOnFocusChangeListener(mFocusChangeListener); PendingIntent contentIntent = n.contentIntent; @@ -2229,12 +2211,7 @@ public class StatusBarService extends IStatusBar.Stub Settings.System.NOTIF_EXPANDED_BAR_COLOR, whiteColor); int noalpha = expBarColorMask | 0xFF000000; if (useCustomExp) { - closerDrawable = res.getDrawable(com.android.internal.R.drawable.status_bar_close_on_cust); - expBarHeadDrawable = res.getDrawable(com.android.internal.R.drawable.status_bar_header_background_cust, - expBarColorMask, expPDMode); - expBarNotifTitleDrawable = res.getDrawable(com.android.internal.R.drawable.title_bar_portrait_cust, - noalpha, expPDMode); // always solid - custExpBar = true; + custExpBar = false; } else { custExpBar = false; } @@ -2359,12 +2336,6 @@ public class StatusBarService extends IStatusBar.Stub mLatestTitle.setBackgroundDrawable(expBarNotifTitleDrawable); } if (custNotBar) { - mStatusBarView.setBackgroundDrawable( - res.getDrawable(com.android.internal.R.drawable.statusbar_background_sq, - notifBarColorMask, notifPDMode)); - mDateView.setBackgroundDrawable( - res.getDrawable(com.android.internal.R.drawable.statusbar_background_sq, - notifBarColorMask, notifPDMode)); mDateView.setPadding(6, 0, 6, 0); } } else if (uri.equals(Settings.System.getUriFor(Settings.System.WIDGET_BUTTONS))) { diff --git a/services/java/com/android/server/status/TrackingPatternView.java b/services/java/com/android/server/status/TrackingPatternView.java index 46648af..774d88d 100644 --- a/services/java/com/android/server/status/TrackingPatternView.java +++ b/services/java/com/android/server/status/TrackingPatternView.java @@ -77,15 +77,7 @@ public class TrackingPatternView extends View { Settings.System.NOTIF_EXPANDED_BAR_CUSTOM, 0) == 1; int expBarColorMask = Settings.System.getInt(mContext.getContentResolver(), Settings.System.NOTIF_EXPANDED_BAR_COLOR, 0xFF000000); - if (useCustomExp) { - Bitmap tempbm = BitmapFactory.decodeResource(getResources(), - com.android.internal.R.drawable.status_bar_background_cust); - Bitmap mutable = Bitmap.createBitmap(tempbm.getWidth(), tempbm.getHeight(), Bitmap.Config.ARGB_8888); - mutable.eraseColor(expBarColorMask); - mTexture = mutable; - } else { - mTexture = BitmapFactory.decodeResource(getResources(), - com.android.internal.R.drawable.status_bar_background); - } + mTexture = BitmapFactory.decodeResource(getResources(), + com.android.internal.R.drawable.status_bar_background); } } -- cgit v1.1