Closed Bug 1204557 Opened 9 years ago Closed 9 years ago

Stop using base64 for native app icons in the application registry

Categories

(B2GDroid Graveyard :: General, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: fabrice, Assigned: fabrice)

References

Details

Attachments

(1 file, 2 obsolete files)

Also, we need to evaluate if we can support multiple icon sizes.
Blocks: 1200445
Attached patch wip (obsolete) — Splinter Review
That's based on code from blassey at https://bug1013588.bmoattachments.org/attachment.cgi?id=8433542

However this is crashing when trying to load any android://icon/ resource:

F/art     ( 3609): art/runtime/check_jni.cc:65] JNI DETECTED ERROR IN APPLICATION: can't call static java.nio.channels.ReadableByteChannel java.nio.channels.Channels.newChannel(java.io.InputStream) on class java.lang.Class<java.nio.channels.ReadableByteChannel>
F/art     ( 3609): art/runtime/check_jni.cc:65]     in call to CallStaticObjectMethodV
F/art     ( 3609): art/runtime/check_jni.cc:65]     from void org.mozilla.gecko.mozglue.GeckoLoader.nativeRun(java.lang.String)
F/art     ( 3609): art/runtime/check_jni.cc:65] "Gecko" prio=5 tid=15 Runnable
F/art     ( 3609): art/runtime/check_jni.cc:65]   | group="main" sCount=0 dsCount=0 obj=0x12d87cf0 self=0xb81097d0
F/art     ( 3609): art/runtime/check_jni.cc:65]   | sysTid=3631 nice=0 cgrp=default sched=0/0 handle=0xb8109ba8
F/art     ( 3609): art/runtime/check_jni.cc:65]   | state=R schedstat=( 0 0 0 ) utm=2378 stm=215 core=2 HZ=100
F/art     ( 3609): art/runtime/check_jni.cc:65]   | stack=0xa3535000-0xa3537000 stackSize=1036KB
F/art     ( 3609): art/runtime/check_jni.cc:65]   | held mutexes= "mutator lock"(shared held)
F/art     ( 3609): art/runtime/check_jni.cc:65]   native: #00 pc 0000484c  /system/lib/libbacktrace_libc++.so (UnwindCurrent::Unwind(unsigned int, ucontext*)+23)
F/art     ( 3609): art/runtime/check_jni.cc:65]   native: #01 pc 00003031  /system/lib/libbacktrace_libc++.so (Backtrace::Unwind(unsigned int, ucontext*)+8)
F/art     ( 3609): art/runtime/check_jni.cc:65]   native: #02 pc 00243129  /system/lib/libart.so (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, int, char const*, art::mirror::ArtMethod*)+68)
F/art     ( 3609): art/runtime/check_jni.cc:65]   native: #03 pc 002274d1  /system/lib/libart.so (art::Thread::Dump(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const+144)
F/art     ( 3609): art/runtime/check_jni.cc:65]   native: #04 pc 000aff6b  /system/lib/libart.so (art::JniAbort(char const*, char const*)+582)
F/art     ( 3609): art/runtime/check_jni.cc:65]   native: #05 pc 000b06b1  /system/lib/libart.so (art::JniAbortF(char const*, char const*, ...)+60)
F/art     ( 3609): art/runtime/check_jni.cc:65]   native: #06 pc 000b1483  /system/lib/libart.so (art::ScopedCheck::CheckStaticMethod(_jclass*, _jmethodID*)+278)
F/art     ( 3609): art/runtime/check_jni.cc:65]   native: #07 pc 000b831f  /system/lib/libart.so (art::CheckJNI::CallStaticObjectMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)+70)
F/art     ( 3609): art/runtime/check_jni.cc:65]   native: #08 pc 010ad983  /dev/ashmem/libxul.so (deleted) (???)
F/art     ( 3609): art/runtime/check_jni.cc:65]   at org.mozilla.gecko.mozglue.GeckoLoader.nativeRun(Native method)
F/art     ( 3609): art/runtime/check_jni.cc:65]   at org.mozilla.gecko.GeckoThread.run(GeckoThread.java:424)
F/art     ( 3609): art/runtime/check_jni.cc:65] 
F/art     ( 3609): art/runtime/runtime.cc:289] Runtime aborting...
F/art     ( 3609): art/runtime/runtime.cc:289] Aborting thread:
F/art     ( 3609): art/runtime/runtime.cc:289] "Gecko" prio=5 tid=15 Native
F/art     ( 3609): art/runtime/runtime.cc:289]   | group="" sCount=0 dsCount=0 obj=0x12d87cf0 self=0xb81097d0
F/art     ( 3609): art/runtime/runtime.cc:289]   | sysTid=3631 nice=0 cgrp=default sched=0/0 handle=0xb8109ba8
F/art     ( 3609): art/runtime/runtime.cc:289]   | state=R schedstat=( 0 0 0 ) utm=2380 stm=215 core=2 HZ=100
F/art     ( 3609): art/runtime/runtime.cc:289]   | stack=0xa3535000-0xa3537000 stackSize=1036KB
F/art     ( 3609): art/runtime/runtime.cc:289]   | held mutexes= "abort lock" "mutator lock"(shared held)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #00 pc 0000484c  /system/lib/libbacktrace_libc++.so (UnwindCurrent::Unwind(unsigned int, ucontext*)+23)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #01 pc 00003031  /system/lib/libbacktrace_libc++.so (Backtrace::Unwind(unsigned int, ucontext*)+8)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #02 pc 00243129  /system/lib/libart.so (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, int, char const*, art::mirror::ArtMethod*)+68)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #03 pc 002274d1  /system/lib/libart.so (art::Thread::Dump(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const+144)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #04 pc 00217647  /system/lib/libart.so (art::AbortState::DumpThread(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, art::Thread*)+22)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #05 pc 002178ad  /system/lib/libart.so (art::AbortState::Dump(std::__1::basic_ostream<char, std::__1::char_traits<char> >&)+364)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #06 pc 00217a79  /system/lib/libart.so (art::Runtime::Abort()+72)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #07 pc 000a644b  /system/lib/libart.so (art::LogMessage::~LogMessage()+1322)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #08 pc 000b0159  /system/lib/libart.so (art::JniAbort(char const*, char const*)+1076)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #09 pc 000b06b1  /system/lib/libart.so (art::JniAbortF(char const*, char const*, ...)+60)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #10 pc 000b1483  /system/lib/libart.so (art::ScopedCheck::CheckStaticMethod(_jclass*, _jmethodID*)+278)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #11 pc 000b831f  /system/lib/libart.so (art::CheckJNI::CallStaticObjectMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)+70)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #12 pc 010ad983  /dev/ashmem/libxul.so (deleted) (???)
F/art     ( 3609): art/runtime/runtime.cc:289]   at org.mozilla.gecko.mozglue.GeckoLoader.nativeRun(Native method)
F/art     ( 3609): art/runtime/runtime.cc:289]   at org.mozilla.gecko.GeckoThread.run(GeckoThread.java:424)
F/art     ( 3609): art/runtime/runtime.cc:289] Dumping all threads without appropriate locks held: thread list lock mutator lock
F/art     ( 3609): art/runtime/runtime.cc:289] All threads:
F/art     ( 3609): art/runtime/runtime.cc:289] DALVIK THREADS (19):
F/art     ( 3609): art/runtime/runtime.cc:289] "main" prio=5 tid=1 Native
F/art     ( 3609): art/runtime/runtime.cc:289]   | group="" sCount=0 dsCount=0 obj=0x746a9000 self=0xb7f29440
F/art     ( 3609): art/runtime/runtime.cc:289]   | sysTid=3609 nice=0 cgrp=default sched=0/0 handle=0xb6f56bec
F/art     ( 3609): art/runtime/runtime.cc:289]   | state=S schedstat=( 0 0 0 ) utm=47 stm=43 core=1 HZ=100
F/art     ( 3609): art/runtime/runtime.cc:289]   | stack=0xbe7e7000-0xbe7e9000 stackSize=8MB
F/art     ( 3609): art/runtime/runtime.cc:289]   | held mutexes=
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #00 pc 0003931c  /system/lib/libc.so (__epoll_pwait+20)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #01 pc 000118ab  /system/lib/libc.so (epoll_pwait+26)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #02 pc 000118b9  /system/lib/libc.so (epoll_wait+6)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #03 pc 00010def  /system/lib/libutils.so (android::Looper::pollInner(int)+98)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #04 pc 00011019  /system/lib/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+92)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #05 pc 0007d9a9  /system/lib/libandroid_runtime.so (android::NativeMessageQueue::pollOnce(_JNIEnv*, int)+22)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #06 pc 000b3853  /data/dalvik-cache/arm/system@framework@boot.oat (Java_android_os_MessageQueue_nativePollOnce__JI+102)
F/art     ( 3609): art/runtime/runtime.cc:289]   at android.os.MessageQueue.nativePollOnce(Native method)
F/art     ( 3609): art/runtime/runtime.cc:289]   at android.os.MessageQueue.next(MessageQueue.java:143)
F/art     ( 3609): art/runtime/runtime.cc:289]   at android.os.Looper.loop(Looper.java:122)
F/art     ( 3609): art/runtime/runtime.cc:289]   at android.app.ActivityThread.main(ActivityThread.java:5291)
F/art     ( 3609): art/runtime/runtime.cc:289]   at java.lang.reflect.Method.invoke!(Native method)
F/art     ( 3609): art/runtime/runtime.cc:289]   at java.lang.reflect.Method.invoke(Method.java:372)
F/art     ( 3609): art/runtime/runtime.cc:289]   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
F/art     ( 3609): art/runtime/runtime.cc:289]   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)
F/art     ( 3609): art/runtime/runtime.cc:289] 
F/art     ( 3609): art/runtime/runtime.cc:289] "Heap thread pool worker thread 2" prio=5 tid=2 Native (still starting up)
F/art     ( 3609): art/runtime/runtime.cc:289]   | group="" sCount=0 dsCount=0 obj=0x0 self=0xb80c0648
F/art     ( 3609): art/runtime/runtime.cc:289]   | sysTid=3619 nice=0 cgrp=default sched=0/0 handle=0xb80c0400
F/art     ( 3609): art/runtime/runtime.cc:289]   | state=S schedstat=( 0 0 0 ) utm=0 stm=0 core=3 HZ=100
F/art     ( 3609): art/runtime/runtime.cc:289]   | stack=0xb4927000-0xb4929000 stackSize=1020KB
F/art     ( 3609): art/runtime/runtime.cc:289]   | held mutexes=
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #00 pc 0000fac0  /system/lib/libc.so (syscall+28)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #01 pc 000a8e0f  /system/lib/libart.so (art::ConditionVariable::Wait(art::Thread*)+82)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #02 pc 002317a7  /system/lib/libart.so (art::ThreadPool::GetTask(art::Thread*)+50)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #03 pc 0023174d  /system/lib/libart.so (art::ThreadPoolWorker::Run()+52)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #04 pc 00231f89  /system/lib/libart.so (art::ThreadPoolWorker::Callback(void*)+52)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #05 pc 000136e3  /system/lib/libc.so (__pthread_start(void*)+30)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #06 pc 0001160f  /system/lib/libc.so (__start_thread+6)
F/art     ( 3609): art/runtime/runtime.cc:289]   (no managed stack frames)
F/art     ( 3609): art/runtime/runtime.cc:289] 
F/art     ( 3609): art/runtime/runtime.cc:289] "Heap thread pool worker thread 1" prio=5 tid=3 Native (still starting up)
F/art     ( 3609): art/runtime/runtime.cc:289]   | group="" sCount=0 dsCount=0 obj=0x0 self=0xb80c3918
F/art     ( 3609): art/runtime/runtime.cc:289]   | sysTid=3618 nice=0 cgrp=default sched=0/0 handle=0xb7f1fc70
F/art     ( 3609): art/runtime/runtime.cc:289]   | state=S schedstat=( 0 0 0 ) utm=0 stm=0 core=3 HZ=100
F/art     ( 3609): art/runtime/runtime.cc:289]   | stack=0xb4a27000-0xb4a29000 stackSize=1020KB
F/art     ( 3609): art/runtime/runtime.cc:289]   | held mutexes=
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #00 pc 0000fac0  /system/lib/libc.so (syscall+28)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #01 pc 000a8e0f  /system/lib/libart.so (art::ConditionVariable::Wait(art::Thread*)+82)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #02 pc 002317a7  /system/lib/libart.so (art::ThreadPool::GetTask(art::Thread*)+50)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #03 pc 0023174d  /system/lib/libart.so (art::ThreadPoolWorker::Run()+52)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #04 pc 00231f89  /system/lib/libart.so (art::ThreadPoolWorker::Callback(void*)+52)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #05 pc 000136e3  /system/lib/libc.so (__pthread_start(void*)+30)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #06 pc 0001160f  /system/lib/libc.so (__start_thread+6)
F/art     ( 3609): art/runtime/runtime.cc:289]   (no managed stack frames)
F/art     ( 3609): art/runtime/runtime.cc:289] 
F/art     ( 3609): art/runtime/runtime.cc:289] "Heap thread pool worker thread 0" prio=5 tid=4 Native (still starting up)
F/art     ( 3609): art/runtime/runtime.cc:289]   | group="" sCount=0 dsCount=0 obj=0x0 self=0xb80c9fa8
F/art     ( 3609): art/runtime/runtime.cc:289]   | sysTid=3617 nice=0 cgrp=default sched=0/0 handle=0xb80a6c78
F/art     ( 3609): art/runtime/runtime.cc:289]   | state=S schedstat=( 0 0 0 ) utm=0 stm=0 core=3 HZ=100
F/art     ( 3609): art/runtime/runtime.cc:289]   | stack=0xb4b27000-0xb4b29000 stackSize=1020KB
F/art     ( 3609): art/runtime/runtime.cc:289]   | held mutexes=
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #00 pc 0000fac0  /system/lib/libc.so (syscall+28)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #01 pc 000a8e0f  /system/lib/libart.so (art::ConditionVariable::Wait(art::Thread*)+82)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #02 pc 002317a7  /system/lib/libart.so (art::ThreadPool::GetTask(art::Thread*)+50)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #03 pc 0023174d  /system/lib/libart.so (art::ThreadPoolWorker::Run()+52)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #04 pc 00231f89  /system/lib/libart.so (art::ThreadPoolWorker::Callback(void*)+52)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #05 pc 000136e3  /system/lib/libc.so (__pthread_start(void*)+30)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #06 pc 0001160f  /system/lib/libc.so (__start_thread+6)
F/art     ( 3609): art/runtime/runtime.cc:289]   (no managed stack frames)
F/art     ( 3609): art/runtime/runtime.cc:289] 
F/art     ( 3609): art/runtime/runtime.cc:289] "Signal Catcher" prio=5 tid=5 WaitingInMainSignalCatcherLoop
F/art     ( 3609): art/runtime/runtime.cc:289]   | group="" sCount=0 dsCount=0 obj=0x12c000a0 self=0xb80ca380
F/art     ( 3609): art/runtime/runtime.cc:289]   | sysTid=3620 nice=0 cgrp=default sched=0/0 handle=0xb80c3cf0
F/art     ( 3609): art/runtime/runtime.cc:289]   | state=S schedstat=( 0 0 0 ) utm=0 stm=0 core=0 HZ=100
F/art     ( 3609): art/runtime/runtime.cc:289]   | stack=0xb481d000-0xb481f000 stackSize=1012KB
F/art     ( 3609): art/runtime/runtime.cc:289]   | held mutexes=
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #00 pc 00039bc4  /system/lib/libc.so (__rt_sigtimedwait+12)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #01 pc 00014fc5  /system/lib/libc.so (sigwait+24)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #02 pc 0021aec3  /system/lib/libart.so (art::SignalCatcher::WaitForSignal(art::Thread*, art::SignalSet&)+66)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #03 pc 0021c9c5  /system/lib/libart.so (art::SignalCatcher::Run(void*)+196)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #04 pc 000136e3  /system/lib/libc.so (__pthread_start(void*)+30)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #05 pc 0001160f  /system/lib/libc.so (__start_thread+6)
F/art     ( 3609): art/runtime/runtime.cc:289]   (no managed stack frames)
F/art     ( 3609): art/runtime/runtime.cc:289] 
F/art     ( 3609): art/runtime/runtime.cc:289] "JDWP" prio=5 tid=6 WaitingInMainDebuggerLoop
F/art     ( 3609): art/runtime/runtime.cc:289]   | group="" sCount=0 dsCount=0 obj=0x12c0c0a0 self=0xb80c8a98
F/art     ( 3609): art/runtime/runtime.cc:289]   | sysTid=3621 nice=0 cgrp=default sched=0/0 handle=0xb80ca758
F/art     ( 3609): art/runtime/runtime.cc:289]   | state=S schedstat=( 0 0 0 ) utm=0 stm=0 core=0 HZ=100
F/art     ( 3609): art/runtime/runtime.cc:289]   | stack=0xb471b000-0xb471d000 stackSize=1012KB
F/art     ( 3609): art/runtime/runtime.cc:289]   | held mutexes=
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #00 pc 0003ac38  /system/lib/libc.so (recvmsg+8)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #01 pc 0028238b  /system/lib/libart.so (art::JDWP::JdwpAdbState::ReceiveClientFd()+86)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #02 pc 0028247d  /system/lib/libart.so (art::JDWP::JdwpAdbState::Accept()+100)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #03 pc 0018fa29  /system/lib/libart.so (art::JDWP::JdwpState::Run()+292)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #04 pc 00190f8b  /system/lib/libart.so (art::JDWP::StartJdwpThread(void*)+10)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #05 pc 000136e3  /system/lib/libc.so (__pthread_start(void*)+30)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #06 pc 0001160f  /system/lib/libc.so (__start_thread+6)
F/art     ( 3609): art/runtime/runtime.cc:289]   (no managed stack frames)
F/art     ( 3609): art/runtime/runtime.cc:289] 
F/art     ( 3609): art/runtime/runtime.cc:289] "ReferenceQueueDaemon" prio=5 tid=7 Waiting
F/art     ( 3609): art/runtime/runtime.cc:289]   | group="" sCount=0 dsCount=0 obj=0x12c0d0a0 self=0xb80c8e70
F/art     ( 3609): art/runtime/runtime.cc:289]   | sysTid=3622 nice=0 cgrp=default sched=0/0 handle=0xb80c9248
F/art     ( 3609): art/runtime/runtime.cc:289]   | state=S schedstat=( 0 0 0 ) utm=0 stm=0 core=0 HZ=100
F/art     ( 3609): art/runtime/runtime.cc:289]   | stack=0xb4613000-0xb4615000 stackSize=1036KB
F/art     ( 3609): art/runtime/runtime.cc:289]   | held mutexes=
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #00 pc 0000fac0  /system/lib/libc.so (syscall+28)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #01 pc 000a8e0f  /system/lib/libart.so (art::ConditionVariable::Wait(art::Thread*)+82)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #02 pc 001e99a3  /system/lib/libart.so (art::Monitor::Wait(art::Thread*, long long, int, bool, art::ThreadState)+998)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #03 pc 001eadc1  /system/lib/libart.so (art::Monitor::Wait(art::Thread*, art::mirror::Object*, long long, int, bool, art::ThreadState)+120)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #04 pc 001f7a51  /system/lib/libart.so (art::Object_wait(_JNIEnv*, _jobject*)+32)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #05 pc 000003df  /data/dalvik-cache/arm/system@framework@boot.oat (Java_java_lang_Object_wait__+82)
F/art     ( 3609): art/runtime/runtime.cc:289]   at java.lang.Object.wait!(Native method)
F/art     ( 3609): art/runtime/runtime.cc:289]   - waiting on <0x0c8a2036> (a java.lang.Class<java.lang.ref.ReferenceQueue>)
F/art     ( 3609): art/runtime/runtime.cc:289]   at java.lang.Daemons$ReferenceQueueDaemon.run(Daemons.java:134)
F/art     ( 3609): art/runtime/runtime.cc:289]   - locked <0x0c8a2036> (a java.lang.Class<java.lang.ref.ReferenceQueue>)
F/art     ( 3609): art/runtime/runtime.cc:289]   at java.lang.Thread.run(Thread.java:818)
F/art     ( 3609): art/runtime/runtime.cc:289] 
F/art     ( 3609): art/runtime/runtime.cc:289] "FinalizerDaemon" prio=5 tid=8 Waiting
F/art     ( 3609): art/runtime/runtime.cc:289]   | group="" sCount=0 dsCount=0 obj=0x12c0d100 self=0xb80c9518
F/art     ( 3609): art/runtime/runtime.cc:289]   | sysTid=3623 nice=0 cgrp=default sched=0/0 handle=0xb80ce3f0
F/art     ( 3609): art/runtime/runtime.cc:289]   | state=S schedstat=( 0 0 0 ) utm=0 stm=0 core=3 HZ=100
F/art     ( 3609): art/runtime/runtime.cc:289]   | stack=0xb450b000-0xb450d000 stackSize=1036KB
F/art     ( 3609): art/runtime/runtime.cc:289]   | held mutexes=
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #00 pc 0000fac0  /system/lib/libc.so (syscall+28)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #01 pc 000a8e0f  /system/lib/libart.so (art::ConditionVariable::Wait(art::Thread*)+82)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #02 pc 001e99a3  /system/lib/libart.so (art::Monitor::Wait(art::Thread*, long long, int, bool, art::ThreadState)+998)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #03 pc 001eadc1  /system/lib/libart.so (art::Monitor::Wait(art::Thread*, art::mirror::Object*, long long, int, bool, art::ThreadState)+120)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #04 pc 001f7a29  /system/lib/libart.so (art::Object_waitJI(_JNIEnv*, _jobject*, long long, int)+36)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #05 pc 0000060b  /data/dalvik-cache/arm/system@framework@boot.oat (Java_java_lang_Object_wait__JI+102)
F/art     ( 3609): art/runtime/runtime.cc:289]   at java.lang.Object.wait!(Native method)
F/art     ( 3609): art/runtime/runtime.cc:289]   - waiting on <0x0c645b37> (a java.lang.ref.ReferenceQueue)
F/art     ( 3609): art/runtime/runtime.cc:289]   at java.lang.Object.wait(Object.java:422)
F/art     ( 3609): art/runtime/runtime.cc:289]   at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:101)
F/art     ( 3609): art/runtime/runtime.cc:289]   - locked <0x0c645b37> (a java.lang.ref.ReferenceQueue)
F/art     ( 3609): art/runtime/runtime.cc:289]   at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:72)
F/art     ( 3609): art/runtime/runtime.cc:289]   at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:174)
F/art     ( 3609): art/runtime/runtime.cc:289]   at java.lang.Thread.run(Thread.java:818)
F/art     ( 3609): art/runtime/runtime.cc:289] 
F/art     ( 3609): art/runtime/runtime.cc:289] "HeapTrimmerDaemon" prio=5 tid=9 Waiting
F/art     ( 3609): art/runtime/runtime.cc:289]   | group="" sCount=0 dsCount=0 obj=0x12c0d1c0 self=0xb80cee68
F/art     ( 3609): art/runtime/runtime.cc:289]   | sysTid=3625 nice=0 cgrp=default sched=0/0 handle=0xb80cf400
F/art     ( 3609): art/runtime/runtime.cc:289]   | state=S schedstat=( 0 0 0 ) utm=0 stm=0 core=0 HZ=100
F/art     ( 3609): art/runtime/runtime.cc:289]   | stack=0xb42ff000-0xb4301000 stackSize=1036KB
F/art     ( 3609): art/runtime/runtime.cc:289]   | held mutexes=
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #00 pc 0000fac0  /system/lib/libc.so (syscall+28)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #01 pc 000a8e0f  /system/lib/libart.so (art::ConditionVariable::Wait(art::Thread*)+82)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #02 pc 001e99a3  /system/lib/libart.so (art::Monitor::Wait(art::Thread*, long long, int, bool, art::ThreadState)+998)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #03 pc 001eadc1  /system/lib/libart.so (art::Monitor::Wait(art::Thread*, art::mirror::Object*, long long, int, bool, art::ThreadState)+120)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #04 pc 001f7a51  /system/lib/libart.so (art::Object_wait(_JNIEnv*, _jobject*)+32)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #05 pc 000003df  /data/dalvik-cache/arm/system@framework@boot.oat (Java_java_lang_Object_wait__+82)
F/art     ( 3609): art/runtime/runtime.cc:289]   at java.lang.Object.wait!(Native method)
F/art     ( 3609): art/runtime/runtime.cc:289]   - waiting on <0x1e0fc8a4> (a java.lang.Daemons$HeapTrimmerDaemon)
F/art     ( 3609): art/runtime/runtime.cc:289]   at java.lang.Daemons$HeapTrimmerDaemon.run(Daemons.java:311)
F/art     ( 3609): art/runtime/runtime.cc:289]   - locked <0x1e0fc8a4> (a java.lang.Daemons$HeapTrimmerDaemon)
F/art     ( 3609): art/runtime/runtime.cc:289]   at java.lang.Thread.run(Thread.java:818)
F/art     ( 3609): art/runtime/runtime.cc:289] 
F/art     ( 3609): art/runtime/runtime.cc:289] "GCDaemon" prio=5 tid=10 Waiting
F/art     ( 3609): art/runtime/runtime.cc:289]   | group="" sCount=0 dsCount=0 obj=0x12c0d220 self=0xb80cf648
F/art     ( 3609): art/runtime/runtime.cc:289]   | sysTid=3626 nice=0 cgrp=default sched=0/0 handle=0xb80cfc18
F/art     ( 3609): art/runtime/runtime.cc:289]   | state=S schedstat=( 0 0 0 ) utm=0 stm=0 core=2 HZ=100
F/art     ( 3609): art/runtime/runtime.cc:289]   | stack=0xb41fb000-0xb41fd000 stackSize=1036KB
F/art     ( 3609): art/runtime/runtime.cc:289]   | held mutexes=
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #00 pc 0000fac0  /system/lib/libc.so (syscall+28)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #01 pc 000a8e0f  /system/lib/libart.so (art::ConditionVariable::Wait(art::Thread*)+82)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #02 pc 001e99a3  /system/lib/libart.so (art::Monitor::Wait(art::Thread*, long long, int, bool, art::ThreadState)+998)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #03 pc 001eadc1  /system/lib/libart.so (art::Monitor::Wait(art::Thread*, art::mirror::Object*, long long, int, bool, art::ThreadState)+120)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #04 pc 001f7a51  /system/lib/libart.so (art::Object_wait(_JNIEnv*, _jobject*)+32)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #05 pc 000003df  /data/dalvik-cache/arm/system@framework@boot.oat (Java_java_lang_Object_wait__+82)
F/art     ( 3609): art/runtime/runtime.cc:289]   at java.lang.Object.wait!(Native method)
F/art     ( 3609): art/runtime/runtime.cc:289]   - waiting on <0x2eb2960d> (a java.lang.Daemons$GCDaemon)
F/art     ( 3609): art/runtime/runtime.cc:289]   at java.lang.Daemons$GCDaemon.run(Daemons.java:344)
F/art     ( 3609): art/runtime/runtime.cc:289]   - locked <0x2eb2960d> (a java.lang.Daemons$GCDaemon)
F/art     ( 3609): art/runtime/runtime.cc:289]   at java.lang.Thread.run(Thread.java:818)
F/art     ( 3609): art/runtime/runtime.cc:289] 
F/art     ( 3609): art/runtime/runtime.cc:289] "FinalizerWatchdogDaemon" prio=5 tid=11 Waiting
F/art     ( 3609): art/runtime/runtime.cc:289]   | group="" sCount=0 dsCount=0 obj=0x12c0d160 self=0xb80ce6c0
F/art     ( 3609): art/runtime/runtime.cc:289]   | sysTid=3624 nice=0 cgrp=default sched=0/0 handle=0xb80cec20
F/art     ( 3609): art/runtime/runtime.cc:289]   | state=S schedstat=( 0 0 0 ) utm=0 stm=0 core=3 HZ=100
F/art     ( 3609): art/runtime/runtime.cc:289]   | stack=0xb4403000-0xb4405000 stackSize=1036KB
F/art     ( 3609): art/runtime/runtime.cc:289]   | held mutexes=
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #00 pc 0000fac0  /system/lib/libc.so (syscall+28)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #01 pc 000a8e0f  /system/lib/libart.so (art::ConditionVariable::Wait(art::Thread*)+82)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #02 pc 001e99a3  /system/lib/libart.so (art::Monitor::Wait(art::Thread*, long long, int, bool, art::ThreadState)+998)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #03 pc 001eadc1  /system/lib/libart.so (art::Monitor::Wait(art::Thread*, art::mirror::Object*, long long, int, bool, art::ThreadState)+120)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #04 pc 001f7a51  /system/lib/libart.so (art::Object_wait(_JNIEnv*, _jobject*)+32)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #05 pc 000003df  /data/dalvik-cache/arm/system@framework@boot.oat (Java_java_lang_Object_wait__+82)
F/art     ( 3609): art/runtime/runtime.cc:289]   at java.lang.Object.wait!(Native method)
F/art     ( 3609): art/runtime/runtime.cc:289]   - waiting on <0x26d009c2> (a java.lang.Daemons$FinalizerWatchdogDaemon)
F/art     ( 3609): art/runtime/runtime.cc:289]   at java.lang.Daemons$FinalizerWatchdogDaemon.waitForObject(Daemons.java:240)
F/art     ( 3609): art/runtime/runtime.cc:289]   - locked <0x26d009c2> (a java.lang.Daemons$FinalizerWatchdogDaemon)
F/art     ( 3609): art/runtime/runtime.cc:289]   at java.lang.Daemons$FinalizerWatchdogDaemon.run(Daemons.java:212)
F/art     ( 3609): art/runtime/runtime.cc:289]   at java.lang.Thread.run(Thread.java:818)
F/art     ( 3609): art/runtime/runtime.cc:289] 
F/art     ( 3609): art/runtime/runtime.cc:289] "Binder_1" prio=5 tid=12 Native
F/art     ( 3609): art/runtime/runtime.cc:289]   | group="" sCount=0 dsCount=0 obj=0x12c590a0 self=0xb80d1610
F/art     ( 3609): art/runtime/runtime.cc:289]   | sysTid=3627 nice=0 cgrp=default sched=0/0 handle=0xb80d0018
F/art     ( 3609): art/runtime/runtime.cc:289]   | state=S schedstat=( 0 0 0 ) utm=0 stm=3 core=0 HZ=100
F/art     ( 3609): art/runtime/runtime.cc:289]   | stack=0xb3ff9000-0xb3ffb000 stackSize=1012KB
F/art     ( 3609): art/runtime/runtime.cc:289]   | held mutexes=
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #00 pc 0003a0f4  /system/lib/libc.so (__ioctl+8)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #01 pc 0003fd15  /system/lib/libc.so (ioctl+14)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #02 pc 0001cb83  /system/lib/libbinder.so (android::IPCThreadState::talkWithDriver(bool)+138)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #03 pc 0001d073  /system/lib/libbinder.so (android::IPCThreadState::getAndExecuteCommand()+6)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #04 pc 0001d0d5  /system/lib/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+48)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #05 pc 0002124f  /system/lib/libbinder.so (???)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #06 pc 0000ef11  /system/lib/libutils.so (android::Thread::_threadLoop(void*)+112)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #07 pc 0005bab1  /system/lib/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+72)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #08 pc 0000ea81  /system/lib/libutils.so (???)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #09 pc 000136e3  /system/lib/libc.so (__pthread_start(void*)+30)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #10 pc 0001160f  /system/lib/libc.so (__start_thread+6)
F/art     ( 3609): art/runtime/runtime.cc:289]   (no managed stack frames)
F/art     ( 3609): art/runtime/runtime.cc:289] 
F/art     ( 3609): art/runtime/runtime.cc:289] "Binder_2" prio=5 tid=13 Native
F/art     ( 3609): art/runtime/runtime.cc:289]   | group="" sCount=0 dsCount=0 obj=0x12c5d0a0 self=0xb80d22d0
F/art     ( 3609): art/runtime/runtime.cc:289]   | sysTid=3628 nice=0 cgrp=default sched=0/0 handle=0xb80d2088
F/art     ( 3609): art/runtime/runtime.cc:289]   | state=S schedstat=( 0 0 0 ) utm=0 stm=3 core=1 HZ=100
F/art     ( 3609): art/runtime/runtime.cc:289]   | stack=0xb3ef1000-0xb3ef3000 stackSize=1012KB
F/art     ( 3609): art/runtime/runtime.cc:289]   | held mutexes=
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #00 pc 0003a0f4  /system/lib/libc.so (__ioctl+8)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #01 pc 0003fd15  /system/lib/libc.so (ioctl+14)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #02 pc 0001cb83  /system/lib/libbinder.so (android::IPCThreadState::talkWithDriver(bool)+138)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #03 pc 0001d073  /system/lib/libbinder.so (android::IPCThreadState::getAndExecuteCommand()+6)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #04 pc 0001d0d5  /system/lib/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+48)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #05 pc 0002124f  /system/lib/libbinder.so (???)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #06 pc 0000ef11  /system/lib/libutils.so (android::Thread::_threadLoop(void*)+112)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #07 pc 0005bab1  /system/lib/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+72)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #08 pc 0000ea81  /system/lib/libutils.so (???)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #09 pc 000136e3  /system/lib/libc.so (__pthread_start(void*)+30)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #10 pc 0001160f  /system/lib/libc.so (__start_thread+6)
F/art     ( 3609): art/runtime/runtime.cc:289]   (no managed stack frames)
F/art     ( 3609): art/runtime/runtime.cc:289] 
F/art     ( 3609): art/runtime/runtime.cc:289] "GeckoBackgroundThread" prio=5 tid=14 Native
F/art     ( 3609): art/runtime/runtime.cc:289]   | group="" sCount=0 dsCount=0 obj=0x12d883a0 self=0xb80f9e38
F/art     ( 3609): art/runtime/runtime.cc:289]   | sysTid=3630 nice=0 cgrp=default sched=0/0 handle=0xb80faae0
F/art     ( 3609): art/runtime/runtime.cc:289]   | state=S schedstat=( 0 0 0 ) utm=1 stm=0 core=0 HZ=100
F/art     ( 3609): art/runtime/runtime.cc:289]   | stack=0xa363d000-0xa363f000 stackSize=1036KB
F/art     ( 3609): art/runtime/runtime.cc:289]   | held mutexes=
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #00 pc 0003931c  /system/lib/libc.so (__epoll_pwait+20)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #01 pc 000118ab  /system/lib/libc.so (epoll_pwait+26)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #02 pc 000118b9  /system/lib/libc.so (epoll_wait+6)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #03 pc 00010def  /system/lib/libutils.so (android::Looper::pollInner(int)+98)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #04 pc 00011019  /system/lib/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+92)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #05 pc 0007d9a9  /system/lib/libandroid_runtime.so (android::NativeMessageQueue::pollOnce(_JNIEnv*, int)+22)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #06 pc 000b3853  /data/dalvik-cache/arm/system@framework@boot.oat (Java_android_os_MessageQueue_nativePollOnce__JI+102)
F/art     ( 3609): art/runtime/runtime.cc:289]   at android.os.MessageQueue.nativePollOnce(Native method)
F/art     ( 3609): art/runtime/runtime.cc:289]   at android.os.MessageQueue.next(MessageQueue.java:143)
F/art     ( 3609): art/runtime/runtime.cc:289]   at android.os.Looper.loop(Looper.java:122)
F/art     ( 3609): art/runtime/runtime.cc:289]   at org.mozilla.gecko.util.GeckoBackgroundThread.run(GeckoBackgroundThread.java:43)
F/art     ( 3609): art/runtime/runtime.cc:289] 
F/art     ( 3609): art/runtime/runtime.cc:289] "Gecko" prio=5 tid=15 Native
F/art     ( 3609): art/runtime/runtime.cc:289]   | group="" sCount=0 dsCount=0 obj=0x12d87cf0 self=0xb81097d0
F/art     ( 3609): art/runtime/runtime.cc:289]   | sysTid=3631 nice=0 cgrp=default sched=0/0 handle=0xb8109ba8
F/art     ( 3609): art/runtime/runtime.cc:289]   | state=R schedstat=( 0 0 0 ) utm=2398 stm=229 core=2 HZ=100
F/art     ( 3609): art/runtime/runtime.cc:289]   | stack=0xa3535000-0xa3537000 stackSize=1036KB
F/art     ( 3609): art/runtime/runtime.cc:289]   | held mutexes= "abort lock"
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #00 pc 0000484c  /system/lib/libbacktrace_libc++.so (UnwindCurrent::Unwind(unsigned int, ucontext*)+23)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #01 pc 00003031  /system/lib/libbacktrace_libc++.so (Backtrace::Unwind(unsigned int, ucontext*)+8)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #02 pc 00243129  /system/lib/libart.so (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, int, char const*, art::mirror::ArtMethod*)+68)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #03 pc 002274d1  /system/lib/libart.so (art::Thread::Dump(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const+144)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #04 pc 002305b9  /system/lib/libart.so (art::ThreadList::DumpLocked(std::__1::basic_ostream<char, std::__1::char_traits<char> >&)+104)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #05 pc 0021782d  /system/lib/libart.so (art::AbortState::Dump(std::__1::basic_ostream<char, std::__1::char_traits<char> >&)+236)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #06 pc 00217a79  /system/lib/libart.so (art::Runtime::Abort()+72)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #07 pc 000a644b  /system/lib/libart.so (art::LogMessage::~LogMessage()+1322)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #08 pc 000b0159  /system/lib/libart.so (art::JniAbort(char const*, char const*)+1076)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #09 pc 000b06b1  /system/lib/libart.so (art::JniAbortF(char const*, char const*, ...)+60)
F/art     ( 3609): art/runtime/runtime.cc:289]   native: #10 pc 000b1483  /system/lib/libart.so (art::ScopedCheck::CheckStaticMethod(_jclass*, _jmethodID*)+278)
Jim, any idea what's going wrong there?
Flags: needinfo?(nchen)
The line at [1] should say | sBridge->jChannels | instead of | sBridge->jReadableByteChannel |. I think this code has always been broken... :/

[1] http://mxr.mozilla.org/mozilla-central/source/widget/android/AndroidBridge.cpp?rev=001942e4617b#2090
Flags: needinfo?(nchen)
Attached patch android-icons.patch (obsolete) — Splinter Review
Jim, that was it! Do you mind reviewing?
Attachment #8665161 - Attachment is obsolete: true
Attachment #8665480 - Flags: review?(nchen)
Comment on attachment 8665480 [details] [diff] [review]
android-icons.patch

Review of attachment 8665480 [details] [diff] [review]:
-----------------------------------------------------------------

Mostly nits; looks okay otherwise.

::: mobile/android/base/GeckoAppShell.java
@@ +2594,5 @@
>      static InputStream createInputStream(URLConnection connection) throws IOException {
>          return connection.getInputStream();
>      }
>  
> +    static class BitmapConnection extends URLConnection {

nit: private static final class

@@ +2595,5 @@
>          return connection.getInputStream();
>      }
>  
> +    static class BitmapConnection extends URLConnection {
> +        private Bitmap bitmap;

nit: add empty line here

@@ +2601,5 @@
> +            super(null);
> +            bitmap = b;
> +        }
> +
> +        public void connect() {}

nit: add "@Override" above this line

@@ +2603,5 @@
> +        }
> +
> +        public void connect() {}
> +
> +        public InputStream getInputStream() throws IOException {

nit: @Override

@@ +2604,5 @@
> +
> +        public void connect() {}
> +
> +        public InputStream getInputStream() throws IOException {
> +            return  new BitmapInputStream();

nit: single space after return

@@ +2607,5 @@
> +        public InputStream getInputStream() throws IOException {
> +            return  new BitmapInputStream();
> +        }
> +
> +        public String getContentType() {

nit: @Override

@@ +2611,5 @@
> +        public String getContentType() {
> +            return "image/png";
> +        }
> +
> +        class BitmapInputStream extends PipedInputStream {

nit: private final class

@@ +2612,5 @@
> +            return "image/png";
> +        }
> +
> +        class BitmapInputStream extends PipedInputStream {
> +            private boolean mHaveConnected = false;

nit: add empty line

@@ +2613,5 @@
> +        }
> +
> +        class BitmapInputStream extends PipedInputStream {
> +            private boolean mHaveConnected = false;
> +            public int read(byte[] buffer, int byteOffset, int byteCount) throws IOException {

nit: @Override

@@ +2614,5 @@
> +
> +        class BitmapInputStream extends PipedInputStream {
> +            private boolean mHaveConnected = false;
> +            public int read(byte[] buffer, int byteOffset, int byteCount) throws IOException {
> +                synchronized(this) {

nit: make this method synchronized instead of using synchronized(this) block

@@ +2615,5 @@
> +        class BitmapInputStream extends PipedInputStream {
> +            private boolean mHaveConnected = false;
> +            public int read(byte[] buffer, int byteOffset, int byteCount) throws IOException {
> +                synchronized(this) {
> +                    if (!mHaveConnected) {

if (mHaveConnected) {
    return super.read(buffer, byteOffset, byteCount);
}

@@ +2618,5 @@
> +                synchronized(this) {
> +                    if (!mHaveConnected) {
> +                        final PipedOutputStream output = new PipedOutputStream();
> +                        connect(output);
> +                        Log.i(LOGTAG, "about to compress");

remove this or add a DEBUG constant, and put this around a check for DEBUG.

@@ +2619,5 @@
> +                    if (!mHaveConnected) {
> +                        final PipedOutputStream output = new PipedOutputStream();
> +                        connect(output);
> +                        Log.i(LOGTAG, "about to compress");
> +                        new Thread(new Runnable() {

Instead of creating a thread every time, post the runnable to the background thread (ThreadUtils.postToBackgroundThread)

@@ +2620,5 @@
> +                        final PipedOutputStream output = new PipedOutputStream();
> +                        connect(output);
> +                        Log.i(LOGTAG, "about to compress");
> +                        new Thread(new Runnable() {
> +                                public void run() {

nit: @Override

@@ +2627,5 @@
> +                                        output.close();
> +                                    } catch (IOException ioe) {}
> +                                }
> +                            }).start();
> +                        Log.i(LOGTAG, "returning input");

remove or put around DEBUG check.

@@ +2648,5 @@
>              }
>  
> +            // Check if we are loading a package icon.
> +            try {
> +                if (spec.startsWith("icon")) { // ignore trailing slash

Is this what we want? Seems like "android://icon-foo" will (incorrectly?) fall into this branch.

@@ +2656,5 @@
> +                    }
> +                    String pkg = splits[1];
> +                    PackageManager pm = getContext().getPackageManager();
> +                    Drawable d = pm.getApplicationIcon(pkg);
> +                    Bitmap bitmap = BitmapUtils.getBitmapFromDrawable(d);

nit: make all of these variables final.
Attachment #8665480 - Flags: review?(nchen) → feedback+
Addressed comments.
Attachment #8665480 - Attachment is obsolete: true
Attachment #8665530 - Flags: review?(nchen)
Comment on attachment 8665530 [details] [diff] [review]
android-icons.patch v2

Review of attachment 8665530 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks! :)
Attachment #8665530 - Flags: review?(nchen) → review+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: