Commit 416fa180 authored by Max Lv's avatar Max Lv

try to fix OOM in system ui. #24

parent 7b67e270
......@@ -2,7 +2,7 @@
<level-list
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/ic_stat_kb000" android:maxLevel="0"/>
<item android:drawable="@drawable/ic_stat_shadowsocks" android:maxLevel="0"/>
<item android:drawable="@drawable/ic_stat_kb001" android:maxLevel="1"/>
<item android:drawable="@drawable/ic_stat_kb002" android:maxLevel="2"/>
<item android:drawable="@drawable/ic_stat_kb003" android:maxLevel="3"/>
......
......@@ -335,9 +335,7 @@ class ShadowsocksService extends Service {
bitmap.getHeight - (bitmap.getHeight - bounds.height()) / 2, paint)
builder.setLargeIcon(bitmap)
if (rate == 0) {
builder.setSmallIcon(R.drawable.ic_stat_shadowsocks)
} else if (rate < 1000) {
if (rate < 1000) {
builder.setSmallIcon(R.drawable.ic_stat_speed, rate)
} else if (rate <= 10000) {
val mb = rate / 100 - 10 + 1000
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment