Merge changes I61331a6e,I5728222b

* changes:
  new battery assets
  Use new nav button assets.
This commit is contained in:
Joe Onorato
2010-11-21 19:23:36 -08:00
committed by Android (Google) Code Review
53 changed files with 61 additions and 101 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 392 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 738 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 738 B

After

Width:  |  Height:  |  Size: 241 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 252 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 746 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 769 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 261 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 254 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 762 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 253 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 724 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 248 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 854 B

After

Width:  |  Height:  |  Size: 443 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 864 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 429 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 443 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 875 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 450 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 888 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 879 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 452 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 868 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 450 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 444 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 430 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 895 B

After

Width:  |  Height:  |  Size: 449 B

View File

@@ -20,11 +20,12 @@
<level-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:maxLevel="4" android:drawable="@android:drawable/stat_sys_battery_0" />
<item android:maxLevel="14" android:drawable="@android:drawable/stat_sys_battery_10" />
<item android:maxLevel="29" android:drawable="@android:drawable/stat_sys_battery_20" />
<item android:maxLevel="49" android:drawable="@android:drawable/stat_sys_battery_40" />
<item android:maxLevel="69" android:drawable="@android:drawable/stat_sys_battery_60" />
<item android:maxLevel="89" android:drawable="@android:drawable/stat_sys_battery_80" />
<item android:maxLevel="15" android:drawable="@android:drawable/stat_sys_battery_15" />
<item android:maxLevel="35" android:drawable="@android:drawable/stat_sys_battery_28" />
<item android:maxLevel="49" android:drawable="@android:drawable/stat_sys_battery_43" />
<item android:maxLevel="60" android:drawable="@android:drawable/stat_sys_battery_57" />
<item android:maxLevel="75" android:drawable="@android:drawable/stat_sys_battery_71" />
<item android:maxLevel="90" android:drawable="@android:drawable/stat_sys_battery_85" />
<item android:maxLevel="100" android:drawable="@android:drawable/stat_sys_battery_100" />
</level-list>

View File

@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/* //device/apps/common/res/drawable/stat_sys_battery.xml
**
** Copyright 2007, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
@@ -19,56 +17,14 @@
-->
<level-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:maxLevel="14">
<animation-list
xmlns:android="http://schemas.android.com/apk/res/android"
android:oneshot="false">
<item android:drawable="@drawable/stat_sys_battery_charge_anim0" android:duration="2000" />
<item android:drawable="@drawable/stat_sys_battery_charge_anim1" android:duration="1000" />
<item android:drawable="@drawable/stat_sys_battery_charge_anim2" android:duration="1000" />
<item android:drawable="@drawable/stat_sys_battery_charge_anim3" android:duration="1000" />
<item android:drawable="@drawable/stat_sys_battery_charge_anim4" android:duration="1000" />
<item android:drawable="@drawable/stat_sys_battery_charge_anim5" android:duration="1000" />
</animation-list>
</item>
<item android:maxLevel="29">
<animation-list
xmlns:android="http://schemas.android.com/apk/res/android"
android:oneshot="false">
<item android:drawable="@drawable/stat_sys_battery_charge_anim1" android:duration="2000" />
<item android:drawable="@drawable/stat_sys_battery_charge_anim2" android:duration="1000" />
<item android:drawable="@drawable/stat_sys_battery_charge_anim3" android:duration="1000" />
<item android:drawable="@drawable/stat_sys_battery_charge_anim4" android:duration="1000" />
<item android:drawable="@drawable/stat_sys_battery_charge_anim5" android:duration="1000" />
</animation-list>
</item>
<item android:maxLevel="49">
<animation-list
xmlns:android="http://schemas.android.com/apk/res/android"
android:oneshot="false">
<item android:drawable="@drawable/stat_sys_battery_charge_anim2" android:duration="2000" />
<item android:drawable="@drawable/stat_sys_battery_charge_anim3" android:duration="1000" />
<item android:drawable="@drawable/stat_sys_battery_charge_anim4" android:duration="1000" />
<item android:drawable="@drawable/stat_sys_battery_charge_anim5" android:duration="1000" />
</animation-list>
</item>
<item android:maxLevel="69">
<animation-list
xmlns:android="http://schemas.android.com/apk/res/android"
android:oneshot="false">
<item android:drawable="@drawable/stat_sys_battery_charge_anim3" android:duration="2000" />
<item android:drawable="@drawable/stat_sys_battery_charge_anim4" android:duration="1000" />
<item android:drawable="@drawable/stat_sys_battery_charge_anim5" android:duration="1000" />
</animation-list>
</item>
<item android:maxLevel="89">
<animation-list
xmlns:android="http://schemas.android.com/apk/res/android"
android:oneshot="false">
<item android:drawable="@drawable/stat_sys_battery_charge_anim4" android:duration="2000" />
<item android:drawable="@drawable/stat_sys_battery_charge_anim5" android:duration="1000" />
</animation-list>
</item>
<item android:maxLevel="101" android:drawable="@drawable/stat_sys_battery_charge_anim5" />
<item android:maxLevel="4" android:drawable="@android:drawable/stat_sys_battery_charge_anim0" />
<item android:maxLevel="15" android:drawable="@android:drawable/stat_sys_battery_charge_anim15" />
<item android:maxLevel="35" android:drawable="@android:drawable/stat_sys_battery_charge_anim28" />
<item android:maxLevel="49" android:drawable="@android:drawable/stat_sys_battery_charge_anim43" />
<item android:maxLevel="60" android:drawable="@android:drawable/stat_sys_battery_charge_anim57" />
<item android:maxLevel="75" android:drawable="@android:drawable/stat_sys_battery_charge_anim71" />
<item android:maxLevel="90" android:drawable="@android:drawable/stat_sys_battery_charge_anim85" />
<item android:maxLevel="100" android:drawable="@android:drawable/stat_sys_battery_charge_anim100" />
</level-list>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 979 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 738 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 953 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 958 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 384 B

After

Width:  |  Height:  |  Size: 633 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 301 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 456 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 477 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 416 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -15,7 +15,7 @@
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:drawable="@drawable/status_bar_menu_pressed" />
<item android:drawable="@drawable/status_bar_menu_default" />
<item android:state_pressed="true" android:drawable="@drawable/ic_sysbar_back_pressed" />
<item android:drawable="@drawable/ic_sysbar_back_default" />
</selector>

View File

@@ -15,7 +15,7 @@
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:drawable="@drawable/status_bar_home_pressed" />
<item android:drawable="@drawable/status_bar_home_default" />
<item android:state_pressed="true" android:drawable="@drawable/ic_sysbar_home_pressed" />
<item android:drawable="@drawable/ic_sysbar_home_default" />
</selector>

View File

@@ -1,21 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2010 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:drawable="@drawable/ic_sysbar_press_bg" />
<item android:drawable="@drawable/ic_sysbar_default_bg" />
</selector>

View File

@@ -15,7 +15,7 @@
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:drawable="@drawable/status_bar_back_pressed" />
<item android:drawable="@drawable/status_bar_back_default" />
<item android:state_pressed="true" android:drawable="@drawable/ic_sysbar_ime_pressed" />
<item android:drawable="@drawable/ic_sysbar_ime_default" />
</selector>

View File

@@ -15,7 +15,7 @@
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:drawable="@drawable/status_bar_recent_pressed" />
<item android:drawable="@drawable/status_bar_recent_default" />
<item android:state_pressed="true" android:drawable="@drawable/ic_sysbar_menu_pressed" />
<item android:drawable="@drawable/ic_sysbar_menu_default" />
</selector>

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2008 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:drawable="@drawable/ic_sysbar_recent_pressed" />
<item android:drawable="@drawable/ic_sysbar_recent_default" />
</selector>

View File

@@ -39,7 +39,6 @@
android:id="@+id/notificationIcons"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:orientation="horizontal"
>
<view
@@ -47,7 +46,9 @@
android:id="@+id/icons"
android:layout_width="wrap_content"
android:layout_height="@*android:dimen/status_bar_icon_size"
android:layout_marginLeft="8dip"
android:layout_gravity="top"
android:layout_marginTop="5dp"
android:layout_marginLeft="8dp"
/>
</com.android.systemui.statusbar.tablet.NotificationIconArea>
@@ -84,13 +85,15 @@
android:id="@+id/battery"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_gravity="center_vertical"
android:layout_gravity="top"
android:layout_marginTop="18dp"
/>
<ImageView
android:id="@+id/network"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_gravity="center_vertical"
android:layout_gravity="top"
android:layout_marginTop="14dp"
android:src="@drawable/ic_sysbar_wifi_mini"
/>
</LinearLayout>
@@ -112,7 +115,6 @@
android:paddingLeft="18dip"
android:paddingRight="18dip"
android:src="@drawable/ic_sysbar_back"
android:background="@drawable/ic_sysbar_icon_bg"
systemui:keyCode="4"
/>
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/home"
@@ -121,14 +123,13 @@
android:paddingLeft="18dip"
android:paddingRight="18dip"
android:src="@drawable/ic_sysbar_home"
android:background="@drawable/ic_sysbar_icon_bg"
systemui:keyCode="3"
/>
<ImageButton android:id="@+id/recent_apps"
android:layout_width="96dip"
android:layout_height="match_parent"
android:src="@drawable/ic_sysbar_recent"
android:background="@drawable/ic_sysbar_icon_bg"
android:background="@null"
android:paddingLeft="18dip"
android:clickable="true"
android:paddingRight="18dip"
@@ -139,7 +140,6 @@
android:paddingLeft="18dip"
android:paddingRight="18dip"
android:src="@drawable/ic_sysbar_menu"
android:background="@drawable/ic_sysbar_icon_bg"
systemui:keyCode="82"
android:visibility="invisible"
/>
@@ -147,7 +147,6 @@
android:id="@+id/pocket"
android:layout_width="96dip"
android:layout_height="match_parent"
android:background="@drawable/ic_sysbar_icon_bg"
android:paddingLeft="18dip"
android:paddingRight="18dip"
android:animateLayoutChanges="true"
@@ -169,8 +168,7 @@
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginLeft="8dip"
android:src="@drawable/ic_sysbar_ime_default"
android:background="@drawable/ic_sysbar_icon_bg"
android:src="@drawable/ic_sysbar_ime"
android:visibility="invisible"
/>
</LinearLayout>

View File

@@ -473,10 +473,15 @@ class BatteryService extends Binder {
private final int getIcon(int level) {
if (mBatteryStatus == BatteryManager.BATTERY_STATUS_CHARGING) {
return com.android.internal.R.drawable.stat_sys_battery_charge;
} else if (mBatteryStatus == BatteryManager.BATTERY_STATUS_DISCHARGING ||
mBatteryStatus == BatteryManager.BATTERY_STATUS_NOT_CHARGING ||
mBatteryStatus == BatteryManager.BATTERY_STATUS_FULL) {
} else if (mBatteryStatus == BatteryManager.BATTERY_STATUS_DISCHARGING) {
return com.android.internal.R.drawable.stat_sys_battery;
} else if (mBatteryStatus == BatteryManager.BATTERY_STATUS_NOT_CHARGING
|| mBatteryStatus == BatteryManager.BATTERY_STATUS_FULL) {
if (isPowered() && mBatteryLevel >= 100) {
return com.android.internal.R.drawable.stat_sys_battery_charge;
} else {
return com.android.internal.R.drawable.stat_sys_battery;
}
} else {
return com.android.internal.R.drawable.stat_sys_battery_unknown;
}