I'm working with USB mass storage on an omapzoom target with android 1.5. The
android-developers list suggested that android-porting would be a more suitable
place for my question. So here it is: When I plug in the USB, press the MENU
button, and select "Notifications," the "USB connected" option appears. But
when I click it, nothing happens. I've concluded that the UsbStorageActivity
is getting launched and creating it's view. But for some reason, it does not
appear on the screen as expected. Details follow. I hope you can suggest
where I should look next.
== DETAILS ==
logcat reports the following as I perform the steps described above
(augmented with some D/B log messages that I added):
W/InputManagerService( 833): Window already focused, ignoring focus
gain of: com.android.internal.view.IInputMethodClient$Stub
$pr...@43694d18
I/ActivityManager( 833): Starting activity: Intent { comp={android/
com.android.internal.app.UsbStorageActivity} }
W/ActivityManager( 833): startActivity called from non-Activity
context; forcing Intent.FLAG_ACTIVITY_NEW_TASK for: Intent
{ flags=0x800000 comp={android/
com.android.internal.app.UsbStorageActivity} }
D/B ( 833): onCreate called.
D/B ( 833): Setting up view.
D/B ( 833): Done Setting up view.
D/B ( 833): onCreate Done.
W/InputManagerService( 833): Window already focused, ignoring focus
gain of: com.android.internal.view.IInputMethodClient$Stub
$pr...@43675e68
I took the InputManagerService warning message as benign because it
happens when any of the main screen context menu apps return.
I tried to launch the UsbStorageActivity using am, but it fails. Is there
something wrong with my command line, or should this work?:
$ adb shell am start -n android/com.android.internal.app.UsbStorageActivity
Starting: Intent { comp={android/
com.android.internal.app.UsbStorageActivity} }
[1] Killed am start -n andr...
...and logcat says:
D/AndroidRuntime( 1467): >>>>>>>>>>>>>> AndroidRuntime START
<<<<<<<<<<<<<<
D/AndroidRuntime( 1467): CheckJNI is ON
D/AndroidRuntime( 1467): --- registering native functions ---
I/ActivityManager( 833): Starting activity: Intent { flags=0x10000000
comp={android/com.android.internal.app.UsbStorageActivity} }
W/ActivityManager( 833): Permission Denial: starting Intent
{ flags=0x10000000 comp={android/
com.android.internal.app.UsbStorageActivity} } from null (pid=-1,
uid=-1) requires null
D/AndroidRuntime( 1467): Shutting down VM
W/dalvikvm( 1467): threadid=3: thread exiting with uncaught exception
(group=0x4000fe70)
E/AndroidRuntime( 1467): Uncaught handler: thread main exiting due to
uncaught exception
E/AndroidRuntime( 1467): *** EXCEPTION IN SYSTEM PROCESS. System will
crash.
E/AndroidRuntime( 1467): java.lang.SecurityException: Permission
Denial: starting Intent { flags=0x10000000 comp={android/
com.android.internal.app.UsbStorageActivity} } from null (pid=-1,
uid=-1) requires null
E/AndroidRuntime( 1467): at android.os.Parcel.readException
(Parcel.java:1234)
E/AndroidRuntime( 1467): at android.os.Parcel.readException
(Parcel.java:1222)
E/AndroidRuntime( 1467): at
android.app.ActivityManagerProxy.startActivity
(ActivityManagerNative.java:1046)
E/AndroidRuntime( 1467): at com.android.commands.am.Am.runStart
(Am.java:199)
E/AndroidRuntime( 1467): at com.android.commands.am.Am.run(Am.java:
73)
E/AndroidRuntime( 1467): at com.android.commands.am.Am.main(Am.java:
51)
E/AndroidRuntime( 1467): at
com.android.internal.os.RuntimeInit.finishInit(Native Method)
E/AndroidRuntime( 1467): at com.android.internal.os.RuntimeInit.main
(RuntimeInit.java:186)
E/AndroidRuntime( 1467): at dalvik.system.NativeStart.main(Native
Method)
E/JavaBinder( 1467): Unknown binder error code. 0xfffffff7
E/AndroidRuntime( 1467): Crash logging skipped, no checkin service
I/Process ( 1467): Sending signal. PID: 1467 SIG: 9
--~--~---------~--~----~------------~-------~--~----~
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting
-~----------~----~----~----~------~----~------~--~---