diff options
Diffstat (limited to 'services/java/com/android/server/status')
-rw-r--r-- | services/java/com/android/server/status/StatusBarPolicy.java | 7 | ||||
-rw-r--r-- | services/java/com/android/server/status/StatusBarService.java | 15 |
2 files changed, 12 insertions, 10 deletions
diff --git a/services/java/com/android/server/status/StatusBarPolicy.java b/services/java/com/android/server/status/StatusBarPolicy.java index 3a5b13c..f4ff5df 100644 --- a/services/java/com/android/server/status/StatusBarPolicy.java +++ b/services/java/com/android/server/status/StatusBarPolicy.java @@ -234,7 +234,7 @@ public class StatusBarPolicy { } else if (action.equals(AudioManager.RINGER_MODE_CHANGED_ACTION) || action.equals(AudioManager.VIBRATE_SETTING_CHANGED_ACTION)) { - updateVolume(intent); + updateVolume(); } else if (action.equals(TelephonyIntents.ACTION_SIM_STATE_CHANGED)) { updateSimState(intent); @@ -326,6 +326,7 @@ public class StatusBarPolicy { null, com.android.internal.R.drawable.stat_sys_ringer_silent, 0, 0); mVolumeIcon = service.addIcon(mVolumeData, null); service.setIconVisibility(mVolumeIcon, false); + updateVolume(); IntentFilter filter = new IntentFilter(); @@ -755,9 +756,7 @@ public class StatusBarPolicy { } } - private final void updateVolume(Intent intent) { - // This can be called from two different received intents, so don't use extras. - + private final void updateVolume() { AudioManager audioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE); final int ringerMode = audioManager.getRingerMode(); final boolean visible = ringerMode == AudioManager.RINGER_MODE_SILENT || diff --git a/services/java/com/android/server/status/StatusBarService.java b/services/java/com/android/server/status/StatusBarService.java index 4748389..5442e1d 100644 --- a/services/java/com/android/server/status/StatusBarService.java +++ b/services/java/com/android/server/status/StatusBarService.java @@ -176,11 +176,11 @@ public class StatusBarService extends IStatusBar.Stub WindowManager.LayoutParams mExpandedParams; ScrollView mScrollView; View mNotificationLinearLayout; - View mOngoingTitle; + TextView mOngoingTitle; LinearLayout mOngoingItems; - View mLatestTitle; + TextView mLatestTitle; LinearLayout mLatestItems; - View mNoNotificationsTitle; + TextView mNoNotificationsTitle; TextView mSpnLabel; TextView mPlmnLabel; TextView mClearButton; @@ -270,11 +270,11 @@ public class StatusBarService extends IStatusBar.Stub mExpandedDialog = new ExpandedDialog(context); mExpandedView = expanded; - mOngoingTitle = expanded.findViewById(R.id.ongoingTitle); + mOngoingTitle = (TextView)expanded.findViewById(R.id.ongoingTitle); mOngoingItems = (LinearLayout)expanded.findViewById(R.id.ongoingItems); - mLatestTitle = expanded.findViewById(R.id.latestTitle); + mLatestTitle = (TextView)expanded.findViewById(R.id.latestTitle); mLatestItems = (LinearLayout)expanded.findViewById(R.id.latestItems); - mNoNotificationsTitle = expanded.findViewById(R.id.noNotificationsTitle); + mNoNotificationsTitle = (TextView)expanded.findViewById(R.id.noNotificationsTitle); mClearButton = (TextView)expanded.findViewById(R.id.clear_all_button); mClearButton.setOnClickListener(mClearButtonListener); mSpnLabel = (TextView)expanded.findViewById(R.id.spnLabel); @@ -1705,6 +1705,9 @@ public class StatusBarService extends IStatusBar.Stub */ void updateResources() { mClearButton.setText(mContext.getText(R.string.status_bar_clear_all_button)); + mOngoingTitle.setText(mContext.getText(R.string.status_bar_ongoing_events_title)); + mLatestTitle.setText(mContext.getText(R.string.status_bar_latest_events_title)); + mNoNotificationsTitle.setText(mContext.getText(R.string.status_bar_no_notifications_title)); Log.d(TAG, "updateResources"); } |