Loading packages/SystemUI/res/values-de/strings.xml +1 −0 Original line number Diff line number Diff line Loading @@ -140,4 +140,5 @@ <string name="gps_notification_searching_text" msgid="8574247005642736060">"GPS wird gesucht"</string> <string name="gps_notification_found_text" msgid="4619274244146446464">"Standort durch GPS festgelegt"</string> <string name="accessibility_clear_all" msgid="5235938559247164925">"Alle Benachrichtigungen löschen"</string> <string name="powerwidget_screen_timeout_toast">Bildschirm-Timeout ist jetzt %1$d %2$s</string> </resources> packages/SystemUI/res/values/strings.xml +2 −0 Original line number Diff line number Diff line Loading @@ -403,4 +403,6 @@ <string name="navbar_menu_conditional_button">Menu (autoHide) button</string> <string name="navbar_menu_always_button">Menu (alwaysShow) button</string> <string name="navbar_menu_big_button">Menu button</string> <string name="powerwidget_screen_timeout_toast">Screen timeout set to: %1$d %2$s</string> </resources> packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +1 −2 Original line number Diff line number Diff line Loading @@ -401,7 +401,6 @@ public class PhoneStatusBar extends StatusBar { mPowerWidget = (PowerWidget)expanded.findViewById(R.id.exp_power_stat); mPowerWidget.setupSettingsObserver(mHandler); mPowerWidget.setGlobalButtonOnClickListener(new View.OnClickListener() { public void onClick(View v) { if(Settings.System.getInt(mContext.getContentResolver(), Loading Loading @@ -612,7 +611,7 @@ public class PhoneStatusBar extends StatusBar { StatusBarIconView view = new StatusBarIconView(mContext, slot, null); view.set(icon); mStatusIcons.addView(view, viewIndex, new LinearLayout.LayoutParams(mIconSize, mIconSize)); mPowerWidget.updateWidget(); mPowerWidget.updateAllButtons(); } public void updateIcon(String slot, int index, int viewIndex, Loading packages/SystemUI/src/com/android/systemui/statusbar/powerwidget/AirplaneButton.java +6 −7 Original line number Diff line number Diff line Loading @@ -21,8 +21,8 @@ public class AirplaneButton extends PowerButton { public AirplaneButton() { mType = BUTTON_AIRPLANE; } @Override protected void updateState() { if (getState(mView.getContext())) { protected void updateState(Context context) { if (getState(context)) { mIcon = R.drawable.stat_airplane_on; mState = STATE_ENABLED; } else { Loading @@ -32,8 +32,7 @@ public class AirplaneButton extends PowerButton { } @Override protected void toggleState() { Context context = mView.getContext(); protected void toggleState(Context context) { boolean state = getState(context); Settings.System.putInt(context.getContentResolver(), Settings.System.AIRPLANE_MODE_ON, state ? 0 : 1); Loading @@ -45,11 +44,11 @@ public class AirplaneButton extends PowerButton { } @Override protected boolean handleLongClick() { protected boolean handleLongClick(Context context) { Intent intent = new Intent("android.settings.AIRPLANE_MODE_SETTINGS"); intent.addCategory(Intent.CATEGORY_DEFAULT); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); mView.getContext().startActivity(intent); context.startActivity(intent); return true; } Loading @@ -58,7 +57,7 @@ public class AirplaneButton extends PowerButton { return OBSERVED_URIS; } private static boolean getState(Context context) { private boolean getState(Context context) { return Settings.System.getInt(context.getContentResolver(), Settings.System.AIRPLANE_MODE_ON,0) == 1; } Loading packages/SystemUI/src/com/android/systemui/statusbar/powerwidget/AutoRotateButton.java +9 −9 Original line number Diff line number Diff line Loading @@ -28,8 +28,8 @@ public class AutoRotateButton extends PowerButton { public AutoRotateButton() { mType = BUTTON_AUTOROTATE; } @Override protected void updateState() { if (getAutoRotation()) { protected void updateState(Context context) { if (getAutoRotation(context)) { mIcon = R.drawable.stat_orientation_on; mState = STATE_ENABLED; } else { Loading @@ -39,16 +39,16 @@ public class AutoRotateButton extends PowerButton { } @Override protected void toggleState() { setAutoRotation(!getAutoRotation()); protected void toggleState(Context context) { setAutoRotation(!getAutoRotation(context)); } @Override protected boolean handleLongClick() { protected boolean handleLongClick(Context context) { Intent intent = new Intent("android.settings.DISPLAY_SETTINGS"); intent.addCategory(Intent.CATEGORY_DEFAULT); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); mView.getContext().startActivity(intent); context.startActivity(intent); return true; } Loading @@ -57,9 +57,9 @@ public class AutoRotateButton extends PowerButton { return OBSERVED_URIS; } private boolean getAutoRotation() { ContentResolver cr = mView.getContext().getContentResolver(); return 0 != Settings.System.getInt(cr, Settings.System.ACCELEROMETER_ROTATION, 0); private boolean getAutoRotation(Context context) { ContentResolver cr = context.getContentResolver(); return Settings.System.getInt(cr, Settings.System.ACCELEROMETER_ROTATION, 0) != 0; } private void setAutoRotation(final boolean autorotate) { Loading Loading
packages/SystemUI/res/values-de/strings.xml +1 −0 Original line number Diff line number Diff line Loading @@ -140,4 +140,5 @@ <string name="gps_notification_searching_text" msgid="8574247005642736060">"GPS wird gesucht"</string> <string name="gps_notification_found_text" msgid="4619274244146446464">"Standort durch GPS festgelegt"</string> <string name="accessibility_clear_all" msgid="5235938559247164925">"Alle Benachrichtigungen löschen"</string> <string name="powerwidget_screen_timeout_toast">Bildschirm-Timeout ist jetzt %1$d %2$s</string> </resources>
packages/SystemUI/res/values/strings.xml +2 −0 Original line number Diff line number Diff line Loading @@ -403,4 +403,6 @@ <string name="navbar_menu_conditional_button">Menu (autoHide) button</string> <string name="navbar_menu_always_button">Menu (alwaysShow) button</string> <string name="navbar_menu_big_button">Menu button</string> <string name="powerwidget_screen_timeout_toast">Screen timeout set to: %1$d %2$s</string> </resources>
packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +1 −2 Original line number Diff line number Diff line Loading @@ -401,7 +401,6 @@ public class PhoneStatusBar extends StatusBar { mPowerWidget = (PowerWidget)expanded.findViewById(R.id.exp_power_stat); mPowerWidget.setupSettingsObserver(mHandler); mPowerWidget.setGlobalButtonOnClickListener(new View.OnClickListener() { public void onClick(View v) { if(Settings.System.getInt(mContext.getContentResolver(), Loading Loading @@ -612,7 +611,7 @@ public class PhoneStatusBar extends StatusBar { StatusBarIconView view = new StatusBarIconView(mContext, slot, null); view.set(icon); mStatusIcons.addView(view, viewIndex, new LinearLayout.LayoutParams(mIconSize, mIconSize)); mPowerWidget.updateWidget(); mPowerWidget.updateAllButtons(); } public void updateIcon(String slot, int index, int viewIndex, Loading
packages/SystemUI/src/com/android/systemui/statusbar/powerwidget/AirplaneButton.java +6 −7 Original line number Diff line number Diff line Loading @@ -21,8 +21,8 @@ public class AirplaneButton extends PowerButton { public AirplaneButton() { mType = BUTTON_AIRPLANE; } @Override protected void updateState() { if (getState(mView.getContext())) { protected void updateState(Context context) { if (getState(context)) { mIcon = R.drawable.stat_airplane_on; mState = STATE_ENABLED; } else { Loading @@ -32,8 +32,7 @@ public class AirplaneButton extends PowerButton { } @Override protected void toggleState() { Context context = mView.getContext(); protected void toggleState(Context context) { boolean state = getState(context); Settings.System.putInt(context.getContentResolver(), Settings.System.AIRPLANE_MODE_ON, state ? 0 : 1); Loading @@ -45,11 +44,11 @@ public class AirplaneButton extends PowerButton { } @Override protected boolean handleLongClick() { protected boolean handleLongClick(Context context) { Intent intent = new Intent("android.settings.AIRPLANE_MODE_SETTINGS"); intent.addCategory(Intent.CATEGORY_DEFAULT); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); mView.getContext().startActivity(intent); context.startActivity(intent); return true; } Loading @@ -58,7 +57,7 @@ public class AirplaneButton extends PowerButton { return OBSERVED_URIS; } private static boolean getState(Context context) { private boolean getState(Context context) { return Settings.System.getInt(context.getContentResolver(), Settings.System.AIRPLANE_MODE_ON,0) == 1; } Loading
packages/SystemUI/src/com/android/systemui/statusbar/powerwidget/AutoRotateButton.java +9 −9 Original line number Diff line number Diff line Loading @@ -28,8 +28,8 @@ public class AutoRotateButton extends PowerButton { public AutoRotateButton() { mType = BUTTON_AUTOROTATE; } @Override protected void updateState() { if (getAutoRotation()) { protected void updateState(Context context) { if (getAutoRotation(context)) { mIcon = R.drawable.stat_orientation_on; mState = STATE_ENABLED; } else { Loading @@ -39,16 +39,16 @@ public class AutoRotateButton extends PowerButton { } @Override protected void toggleState() { setAutoRotation(!getAutoRotation()); protected void toggleState(Context context) { setAutoRotation(!getAutoRotation(context)); } @Override protected boolean handleLongClick() { protected boolean handleLongClick(Context context) { Intent intent = new Intent("android.settings.DISPLAY_SETTINGS"); intent.addCategory(Intent.CATEGORY_DEFAULT); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); mView.getContext().startActivity(intent); context.startActivity(intent); return true; } Loading @@ -57,9 +57,9 @@ public class AutoRotateButton extends PowerButton { return OBSERVED_URIS; } private boolean getAutoRotation() { ContentResolver cr = mView.getContext().getContentResolver(); return 0 != Settings.System.getInt(cr, Settings.System.ACCELEROMETER_ROTATION, 0); private boolean getAutoRotation(Context context) { ContentResolver cr = context.getContentResolver(); return Settings.System.getInt(cr, Settings.System.ACCELEROMETER_ROTATION, 0) != 0; } private void setAutoRotation(final boolean autorotate) { Loading