**** BEGIN LOGGING AT Mon Nov 03 02:59:56 2008 Nov 03 03:56:00 good evening Nov 03 04:00:14 ggoodnight o/ Nov 03 04:00:57 elad: 'night Nov 03 05:17:07 Is there a way to control which Volume panel shows up? Ringer or Speaker volume. Nov 03 05:17:29 dmoffett: Yes. Nov 03 05:17:31 dmoffett: Pause your music. Nov 03 05:17:49 Sorry I meant programatically. Nov 03 05:18:11 Guess I will leave that one alone. :-) Nov 03 06:18:40 muthu to answer your question Nov 03 06:18:57 the G1 has problems with 3G Nov 03 06:19:03 Oh? Nov 03 06:19:06 in areas where EDGE/3G is wavy Nov 03 06:19:25 sometimes packet just wont work Nov 03 06:19:27 Ah. Nov 03 06:19:28 needs a reboot usually Nov 03 06:19:32 That's too bad. Nov 03 06:19:35 yeah Nov 03 06:19:38 andi know you're on your G1 now Nov 03 06:19:51 all lame phone clients capitalize the first letter of the word :) Nov 03 06:19:51 Me? Nov 03 06:19:57 yep Nov 03 06:20:24 No, I actually capitalize my letters on my computer. Nov 03 06:20:24 no way Nov 03 06:20:24 On my G1, I use IRC over SSH, so I actually don't capitalize things. Nov 03 06:20:24 How can I prove it to you? Nov 03 06:20:24 Look, I can type really fast. Nov 03 06:20:24 simple Nov 03 06:20:25 i'm waiting for it to be proved Nov 03 06:20:25 :D Nov 03 06:20:28 no copy and paste Nov 03 06:20:32 give me a line with all lowercase Nov 03 06:20:37 this is a line with all lowercase Nov 03 06:20:39 so is this Nov 03 06:20:47 [sic] Nov 03 06:21:16 backspace trick ;) Nov 03 06:21:35 ... Nov 03 06:25:23 haha Nov 03 06:26:24 f00f-: howdy Nov 03 06:32:16 getting a device yet muthu Nov 03 06:32:43 is there an app to transfer contacts from my S60 device to the G1? Nov 03 06:33:01 apart from OBEX'ing everyone individually Nov 03 06:36:15 f00f-: yeah, haven't got one yet Nov 03 07:23:55 it sure is cool to run the app on a real device Nov 03 07:26:16 don't tease me :P Nov 03 07:26:57 well just get a touchscreen display Nov 03 07:27:07 so you too can fling ListViews around Nov 03 07:27:18 that's basically the best part Nov 03 07:27:29 we actually used such a display at some point in the development :) Nov 03 07:27:36 we didn't have dev G1s yet Nov 03 07:27:45 oh nice Nov 03 07:27:46 so we just hooked up 15" touch screens to our macs Nov 03 07:27:50 it was annoying :) Nov 03 07:27:54 i still have the plastic protector on my G1 Nov 03 07:27:56 so we went back to emulator + mouse :) Nov 03 07:28:01 indend to keep it for 1-2 months if i can Nov 03 07:28:06 really? Nov 03 07:28:14 I never understand people who keep the plastic protection Nov 03 07:28:15 i NEVER take those off Nov 03 07:28:19 Oo Nov 03 07:28:21 you're weird Nov 03 07:28:23 i had one on my DSLR for like 4 months Nov 03 07:28:25 the screen is very sturdy Nov 03 07:28:35 it'll get clogged with my sweat Nov 03 07:28:43 I tried to scratch it with my keys several times :)) Nov 03 07:28:50 oh my Nov 03 07:28:53 i dare not try :D Nov 03 07:29:08 I also dropped it on concrete a dozen of times Nov 03 07:29:12 it got nothing :) Nov 03 07:29:18 We also used a 15" touchscreen here at some point to test how it would "feel" to use the app.. I guess it felt nothing like on the real device :P Nov 03 07:33:50 i hope some firmware updates come my way soon Nov 03 07:34:08 i still need to figure out a way to transfer my contacts over Nov 03 07:34:34 i can export VCards from my N95 Nov 03 07:34:46 i just need an android app to read them and insert into contacts Nov 03 07:35:57 & Nov 03 07:36:15 what's with you guys and this obsession with updates? :) Nov 03 07:39:58 there isn't an app that can import/export vcards? Nov 03 07:40:56 ..not bundled with the OS nor available at the market? Nov 03 10:39:20 Ouch, looks like there's a nasty bug here. Nov 03 10:39:44 I have a tiny test application displaying a notification Nov 03 10:40:12 But (impossibly) it's using a drawable from a different application Nov 03 10:40:42 The only two things that the drawables share is the same name. Nov 03 10:41:14 But I've tripple checked - the drawable being displayed is not in the test application I'm uploading to the device. Nov 03 13:07:17 has anyone had much luck with executing arbitrary code in the debugger? Nov 03 13:08:18 Ive tried both that and beanshell/network and havent had much luck with either. Nov 03 13:09:04 Both do Log.d(tag,"str"); no problem but I cant do anything more complex. Nov 03 14:48:20 f00f-: fyi i use shieldzone.com on all my kit. (and i've got an assoicate's link if you want to make me minor $$ when buying :) ..) works great. gonna redo the cladding on my mbp tho, its getting discolored (after a year and a half or more of hard use) got the g1 one, haven't put it on yet tho. Nov 03 15:40:30 yay i got my code injector working Nov 03 15:40:38 * gambler time 4 sleep Nov 03 15:41:19 what's your code injector for? Nov 03 15:42:01 hot code injection Nov 03 15:44:12 yeah this way i dont have to recompile/reload my app every time, i can just send code over the network Nov 03 15:44:51 It usually takes at least 1 min to load all of bouncy castle and thats infuriating to wait for Nov 03 15:45:45 hmmm, actually now that the source is available i could probably unhide that. Nov 03 15:47:00 ok...off 2 see the sandman Nov 03 15:47:31 night Nov 03 17:28:26 gah, framework just crashed. Nov 03 17:28:28 who wants a bugreport? Nov 03 17:28:42 the "framework" crashed? Nov 03 17:28:44 what does that mean? Nov 03 17:28:46 what crashed exactly? Nov 03 17:29:14 romainguy__: As in, I was listening to music, then the music stopped, and it showed teh android logo. Nov 03 17:29:28 * ttuttle can tell you exactly what crashed. Shift+Menu ftw Nov 03 17:29:30 file a bug Nov 03 17:29:42 Where? (/me's never filed a public bug.) Nov 03 17:30:00 on the public bug tracker Nov 03 17:30:24 romainguy__: But won't my bugreport leak data about an unreleased build? Nov 03 17:30:32 http://code.google.com/p/android/issues/list Nov 03 17:30:39 then email it Nov 03 17:30:49 romainguy__: To? Nov 03 17:30:54 I don't know Nov 03 17:30:56 someone at google Nov 03 17:31:08 I'm sure you know a few people there Nov 03 17:31:13 heh Nov 03 17:31:17 try admin@google.com :) Nov 03 17:31:33 that was a joke Nov 03 17:31:36 a bad one though Nov 03 17:31:37 i know Nov 03 17:31:46 :) Nov 03 17:33:54 ttuttle: unreleased build? Nov 03 17:34:15 by now, it should be in the source right? Nov 03 17:34:37 muthu__: Yes, I'm running a testing build. That's how I got a free device. I give them bugreports and stuff. Nov 03 17:34:48 ttuttle: what does shift+menu do? Nov 03 17:35:02 zhobbs: Oh. It saves a bugreport to the SD card. Nov 03 17:35:23 ttuttle: it should have directly filed it in the tracker ;) Nov 03 17:35:31 not that smart, huh Nov 03 17:35:42 j/k Nov 03 17:35:43 heh Nov 03 17:35:52 no it shouldn't Nov 03 17:36:03 as I'm running my own app that leaves my GPS location in the logs, and I'm going to filter those out ;-) Nov 03 17:36:18 haha Nov 03 17:36:57 ttuttle: doh, only on the eng builds I guess Nov 03 17:37:10 zhobbs: oh Nov 03 17:37:15 that's so weak...I wish it would do a bug report on the production phones Nov 03 17:37:18 zhobbs: that's too bad, it's a great feature Nov 03 17:37:24 * ttuttle wonders why it's turned off. Nov 03 17:38:31 yeah, I don't understand why /dev/log/main isn't readable Nov 03 17:39:02 I mean, you can plug in the production device to adb and pull the logcat, why can't you just read the logcat on the device Nov 03 17:39:41 that's very different Nov 03 17:39:50 you probably don't want any app to read your logs Nov 03 17:41:19 hmm, maybe a permission for it... Nov 03 17:41:29 romainguy__: Is there a reason shift-menu is disabled on prod devices? It seems like it'd be a great feature for developers. Nov 03 17:41:50 you also probably don't want apps to read the logs dumped on the sdcard Nov 03 17:42:00 but I'm not the one you should ask about it Nov 03 17:42:24 oh, good point Nov 03 17:43:28 I'm not really sure why it'd be so bad for an app to be able to see the log... Nov 03 17:44:06 zhobbs: Out of necessity logs sometimes include information that you wouldn't want other apps to know. Nov 03 17:44:38 I guess Nov 03 17:45:47 actually, I wouldn't care about the logs if there was a way to send automatically send a stacktrace to the publishing after a RuntimeException Nov 03 17:46:12 wow, I can't type Nov 03 17:46:58 automatically send a stacktrace to the publisher after a RuntimeException* Nov 03 17:47:52 well you know that in Java you can intercept uncaught Exceptions? Nov 03 17:48:03 and then do whatever you want with them? Nov 03 17:48:12 writing your own bug reporting code is very easy that way Nov 03 17:49:21 how do I catch any uncaught exception in an app? Nov 03 17:50:43 zhobbs: that's how I did this: http://www.curious-creature.org/2007/05/16/extreme-gui-makeover-2007-video-1/ Nov 03 17:52:05 neat, how do I do it? Nov 03 17:54:19 http://www.javaspecialists.co.za/archive/Issue089.html Nov 03 17:55:13 in short: Thread.setDefaultUncaughtExceptionHandler() Nov 03 17:55:37 you would have to check but I think it sets a handler for the current thread only Nov 03 18:03:16 romainguy__: thanks, that looks like it works! :) Nov 03 18:03:39 romainguy: thanks, that looks like it works! :) Nov 03 18:04:37 cool Nov 03 18:05:23 now getting the user's to actually send this info is the hard part Nov 03 18:05:36 why? Nov 03 18:05:48 you can have it send if you want without user interaction Nov 03 18:05:53 have them agree to it up front Nov 03 18:05:54 You can catch uncaught exceptions per-VM, per-thread-group, or per-thread. Nov 03 18:06:04 i just think its overall a bad idea Nov 03 18:06:27 michaelnovakjr: why? Nov 03 18:06:46 michaelnovakjr: agree, you can let them approve it before hand Nov 03 18:07:05 if the user wants to help with bugs, they can also just submit a bug on your tracker Nov 03 18:07:18 the data traffic isn't necessary Nov 03 18:07:23 may be an option in settings or something Nov 03 18:07:48 zhobbs: users are wary about anything getting send to server Nov 03 18:08:17 like my file manager requesting internet access :) Nov 03 18:08:24 not necessary Nov 03 18:16:13 michaelnovakjr: it's hard to submit a bug report if the bug isn't reproducable and the only information the user has is the android runtimeexception dialog Nov 03 18:16:55 i guess Nov 03 18:29:56 fadden: how do I catch the uncaught exceptions per thread group? Nov 03 18:30:38 zhobbs: Don't use thread groups? It's a pretty dead API, and doesn't do much. Nov 03 18:30:49 Yeah, ignore thread groups. Nov 03 18:30:55 ok Nov 03 18:31:08 Basically, ThreadGroup.uncaughtException() needs to be overridden. Nov 03 18:32:13 Or just put a catch(Throwable) at the top of your run() methods so you don't have to look up the API, which is what I do. :) Nov 03 18:33:09 andyross: debuggers can behave differently depending on whether an exception is caught or uncaught Nov 03 18:33:18 Sometimes it's convenient to just break on all uncaught exceptions. Nov 03 18:33:34 In practice this has some issues, e.g. if the app framework has a top-level "catch" in Looper. Nov 03 18:33:48 It also ges a little weird in Dalvik because of the way we deal with synchronized blocks. Nov 03 18:33:54 * andyross is tempted to follow this digression into a discussion about why he prefers debug-via-printf to automated tools, but decides that's only going to be a flame war. Nov 03 18:34:13 Both are useful; it depends on what you're debugging. Nov 03 18:34:43 No doubt. On occasion, I've been saved by gcc watchpoints and valgrind, which are hard to emulate in-source. Nov 03 18:35:11 There's a "lunch 2" target in the open-source stuff that has survived largely due to the desire to run valgrind. Nov 03 18:35:50 What's that, an x86 version of the emulator? Nov 03 18:35:58 (note: linux-only) Nov 03 18:36:53 A copy of most of the system built for x86 against glibc. Nov 03 18:37:07 Along with a wxWidgets front-end and some LD_PRELOAD device wrappers. Nov 03 18:37:24 Ah, OK. My hat is off to the folks who have to maintain that :) Nov 03 18:37:26 The stuff in the open-source release sort of boots. Nov 03 18:37:47 andyross: both of us are watching IRC. :-) Nov 03 18:37:51 Hello, any ideas why my layout with a videoview iis showing the activity beneath it? Nov 03 18:41:08 so what do I need to do in my UncaughtExceptionHandler.uncaughtException(...) when I'm done to do the "force close" that the default Android handler does? Nov 03 18:42:08 At a guess, rethrow the exception? Nov 03 18:44:48 "throw new RuntimeException(ex);" doesn't do anything... Nov 03 18:45:43 zhobbs: it ends up in a crash handler... let me see... Nov 03 18:46:24 base/core/java/com/android/internal/os/RuntimeInit.java Nov 03 18:46:29 ahh, thanks :0 Nov 03 18:46:42 calls RuntimeInit.crash(), which does seem to be public Nov 03 18:47:05 The uncaught handler is also in RuntimeInit Nov 03 18:48:20 damn, x crashed on me Nov 03 18:49:22 RuntimeInit isn't visible in SDK Nov 03 18:56:09 looks like System.exit(10) at least kills the app.... Nov 03 19:29:43 Oh, @hide annotation in RuntimeInit. Nov 03 19:30:01 So, yeah, don't use that. Nov 03 19:30:05 :) Nov 03 19:30:16 System.exit() is a reasonable choice. Nov 03 19:30:16 System.exit(10) seems to do the trick Nov 03 19:32:00 heh Nov 03 19:36:43 anyone know how to catch a window orientation change? Nov 03 19:36:59 e.g. going from portrait to landscape? Nov 03 19:37:43 iirc onLayout or something to that extent? Nov 03 19:38:02 vol: on the window object? Nov 03 19:38:04 mocsrox: onConfigurationChange or something like that Nov 03 19:38:12 ^^ Nov 03 19:38:55 yes Nov 03 19:39:15 Activity.onConfigurationChanged , but must setup a flag in the manifest for that to be called Nov 03 19:39:48 and it won't use your layout-land, drawable-land, etc Nov 03 19:39:49 zhobbs: ah awesome.. thx Nov 03 19:41:59 * andyross is discovering binder. Is there any syscall-level documentation on this thing? It looks pretty nifty. Nov 03 19:42:07 what keystore formats are supported? Nov 03 19:42:16 I tried, JKS. fail Nov 03 19:42:21 PKCS12, also fail Nov 03 20:05:13 andyross: oh boy Nov 03 20:06:37 http://web.archive.org/web/20061205015100/http://openbinder.org/ Nov 03 20:07:20 Of course, the driver was rewritten for Android. Nov 03 20:07:44 Cool, thanks. So it's not really android-specific? (OK, then it is in the sense that android is its only major customer?) Nov 03 20:08:26 It has a somewhat long heritage. I don't know if any other products use it. Nov 03 20:08:54 Most of the people who worked on it are part of Android. Nov 03 20:09:31 Never made it into the kernel though? Kind of a pity. Seems worth it for the sane fd passing API alone. Nov 03 20:11:18 Looks a lot like Solaris doors, actually. Nov 03 20:12:52 So anyway, is there a story about how it lost its domain? :) Nov 03 20:17:37 I believe it came out of a PalmSource project. They eventually decided to stop hosting the domain, and apparently gave it to the Russians. Nov 03 20:17:40 :-) Nov 03 20:22:01 Argh. I'm trying to use the JNI for some stuff, but I can't actually find a reference to the JNI API anywhere! Nov 03 20:22:07 All I find are half-assed tutorials from 1999 Nov 03 20:22:31 jni is just as half assed as it was in 1999. Nov 03 20:22:35 so what's the problem? Nov 03 20:22:35 :) Nov 03 20:22:36 is there an api or is it "go read the h file jackass" Nov 03 20:22:53 because you'd think someone would have documented some of this Nov 03 20:24:11 Let's see... Nov 03 20:24:23 Spec: http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/jniTOC.html Nov 03 20:24:28 if I just suck at google, I'll admit it Nov 03 20:24:38 Reference manual: http://java.sun.com/docs/books/jni/html/jniTOC.html Nov 03 20:24:53 wonderful Nov 03 20:24:58 My adds: [git] dalvik/docs/jni-tips.html Nov 03 20:25:31 :> Nov 03 20:25:35 You definitely want to exercise any JNI code on the emulator, which has extended JNI checks enabled. Nov 03 20:25:47 fadden: Oh yeah Nov 03 20:26:00 It's enabled with a system property, and on production devices you can't alter the "dalvik.*" properties. Nov 03 20:26:17 particularly the dalvik.makecodesuckless property Nov 03 20:26:17 (to be fixed) Nov 03 20:26:20 Nov 03 20:26:34 DannyB: that was supposed to be a secret! Nov 03 20:26:47 :< Nov 03 20:27:08 dalvik.kivlad=1 Nov 03 20:28:43 fadden: Bleh. I was hoping for a more javadoc style reference, but this is still acceptable. Nov 03 20:30:14 The first link hits all the high points. Nov 03 20:30:29 That plus the jni-tips.html should cover you. Nov 03 20:32:00 alright, thanks Nov 03 20:32:06 Oh, I almost forgot: JNI is not presently supported, so please don't use it to develop applications for Android. Nov 03 20:32:14 : ( Nov 03 20:32:23 we're living on the edge in my company Nov 03 20:32:32 but what do you mean "not supported" Nov 03 20:32:36 will it just mysteriously stop working? Nov 03 20:32:49 I know that it's something we shouldn't use if we can help it Nov 03 20:33:04 It might stop working. It might start working better. It might work differently. It might cause boils to appear over 78.2% of your body. Nov 03 20:33:07 but the alternative is spending a couple years to port something with marginal revinue at best. Nov 03 20:33:19 urgh. Nov 03 20:33:28 The JNI calls aren't going to change, since Sun defined those. Nov 03 20:33:45 JNI is used throughout the Android framework, so it's not going away. Nov 03 20:33:59 I thought that "official" JNI support was coming in a couple months, as well Nov 03 20:34:08 But it's not officially supported for Android development, so every time I help somebody used it I feel obliged to throw in the disclaimer. Nov 03 20:34:16 alright : ) Nov 03 20:34:34 I cannot comment on future directions, unreleased products, blah blah blah. Nov 03 20:35:21 right :) Nov 03 20:35:24 The part that is the least-well defined right now is how you would ship an application that includes native code. Nov 03 20:35:34 i.e. how does your APK get packaged up and distributed. Nov 03 20:35:57 and what happens when we get devices running x86, ppc, SH2, 6502, etc. Nov 03 20:35:57 fadden: would having a sim card with shared libs on it, and a seperate APK that references them be a distinctly bad way to go? Nov 03 20:36:17 er Nov 03 20:36:20 sd card rather Nov 03 20:36:36 I don't know offhand how the "noexec" flag affects shared libs. Nov 03 20:36:54 mmm Nov 03 20:37:02 well, it's something we can experiment with ourselves I'm sure Nov 03 20:37:07 However, System.load() and System.loadLibrary() both work; the former takes a full path. Nov 03 20:37:11 yeah Nov 03 20:37:18 we got a simple draw test of our app to work Nov 03 20:37:24 the problem at this point is that it takes a long time Nov 03 20:37:35 because we're doing getPixel and then setInt into a jIntArray Nov 03 20:37:44 when we should be more or less copying the whole thing at once Nov 03 20:37:44 Um. Nov 03 20:37:58 For a primitive array you can get a pointer to the full thing. Nov 03 20:38:06 yeah Nov 03 20:38:18 java is not our thing here, and we've only got this going for a couple days. Nov 03 20:38:29 that's kind of where I come in, since I have a background developing java Nov 03 20:38:38 (but 0 jni experience) Nov 03 20:40:10 so, I need to spend a day or two reading up on the jni and getting more familiar with it Nov 03 20:40:30 Anyway, thanks for your help so far :) Nov 03 20:40:51 Read the first few sections from that first URL, skim the available functions, then read the jni-tips.html. Nov 03 20:41:03 You'll be 85% ready to go in an hour or two. Nov 03 20:41:44 Few, if any, of the Android developers had experience with JNI. Nov 03 20:42:57 great :) Nov 03 20:43:11 s/of the Android// Nov 03 20:43:21 True dat. Nov 03 20:43:45 what i need for a fullscreen app? Nov 03 20:44:08 getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);+ Nov 03 20:44:43 s/\+// Nov 03 20:51:39 it's better to set this with a Theme Nov 03 20:51:46 that way your app doesn't start with a titlebar Nov 03 20:52:32 then you dont have to do the ...setFlags... stuff? Nov 03 20:53:42 nope Nov 03 20:53:51 you can use the theme Theme.NoTitleBar.FullScreen Nov 03 20:53:54 or something like that ;) Nov 03 20:57:05 oh no Nov 03 21:07:50 * andyross scribbles down the note about titlebar themes to look at later. Was wondering why it always flashed briefly before being overwritten. Nov 03 22:39:42 good evening Nov 03 23:13:39 '$TIMEOFDAY, #android-dev. - Hi I'm Jesse. K-9 is my fault Nov 03 23:13:55 obra: Hi. Nov 03 23:42:57 Hmm. I have an unsigned short array in some C code, which I want to blit to a bitmap. Am I going to have to pretty much convert it to 8888 ARGB for each byte, or is there a better way? Nov 03 23:43:34 what's the format of your short? Nov 03 23:43:37 565? Nov 03 23:44:04 yeah Nov 03 23:44:16 then create a Bitmap in 565 instead of 8888 Nov 03 23:44:20 Well, I have. Nov 03 23:44:44 Bitmap.createBitmap(320,480, Bitmap.Config.RGB_565) Nov 03 23:45:14 then why convert it to 8888? Nov 03 23:45:47 setPixels(int[] pixels...) Nov 03 23:46:00 it looks rather uggy if I just copy each ushort into the int Nov 03 23:46:21 hmm, actually, had a dumb though Nov 03 23:46:30 but in any event, I still have an int array Nov 03 23:46:45 unless jni handles copying a ushort array into an int array as some function Nov 03 23:47:04 a ushort array into a jintArray rather Nov 04 00:01:53 vol: I think the point was that Bitmap objects have depth. You can create one with RGB565 or ARGB. If you choose 565, then both objects have the same format and your blit is just a spanwise memory copy. If you don't, then someone somewhere needs to do a format conversion on each pixel. Nov 04 00:08:11 I assume the real question is, "how do I set a bunch of pixels quickly from JNI"? Nov 04 00:08:55 use a Canvas? Nov 04 00:09:00 look at Skia's code? Nov 04 00:09:53 Set up an OpenGL pbuffer (I see the extension is exposed, haven't tried it)? One presumes the Imageon hardware does accelerated pixel conversion. Nov 04 00:10:49 to go from a short array to a Bitmap object> Nov 04 00:10:50 ?? Nov 04 00:10:52 Has had a bitch of a time finding docs for the 3D hardware. Mostly it consists of just googling strings I find in the library (e.g. Q3Dimension) and following it to junk like powerpoints about 3D on Brew. Nov 04 00:11:53 To go from a 565 short array to a mapped 888 buffer, in that case Then you can blit to the Bitmap using whatever you want without blowing cycles on the format conversion. Nov 04 00:12:45 except you'll be blowing cycles going to and back from the GPU Nov 04 00:13:27 not mentioning that you have to pay the cost of initializing and dealing with OpenGL Nov 04 00:13:38 For a full screen bitmap, that's still probably a win if the pixel conversion is accelerated. And in any case a thread blocked on a GPU flush leaves the CPU available for other work you might need to do. Nov 04 00:14:00 I'm not saying it's the easiest method, just probably the fasted. Nov 04 00:14:02 er, fastest Nov 04 00:14:36 except you'll need to get the data back Nov 04 00:15:09 a fullscreen blit on a G1 is about 3ms and it's mostly bound by the bus speed Nov 04 00:15:17 that should give you an idea of how fast your solution will be Nov 04 00:15:28 Are you guys talking about the same thing? Nov 04 00:15:37 * andyross isn't sure any more. Nov 04 00:16:01 andyross == convert during blit, romainguy == convert a local buffer using blit engine ? Nov 04 00:16:19 my understanding was that the goal is to have a Bitmap object in the end :) Nov 04 00:16:50 (and btw, there's a 2D chip on the G1 :) Nov 04 00:16:51 romainguy: I think he has a Bitmap and he's trying to modify the contents thereof; then things went sideways because "set pixel" seems to take nothing but "int" Nov 04 00:17:03 (where "he" is vol) Nov 04 00:17:30 "I have an unsigned short array in some C code, which I want to blit to a bitmap" Nov 04 00:17:40 by Bitmap I mean the actual Skia Bitmap object Nov 04 00:17:46 but I might just be interpreting too much :) Nov 04 00:17:55 Wasn't aware of 2D acceleration, actually. Also good to know -- is skia the only exposed API? Nov 04 00:18:19 the 2D acceleration is handled by SurfaceFlinger Nov 04 00:18:24 and Skia is the only 2D API Nov 04 00:18:27 purely software Nov 04 00:18:28 vol: can clarify when he returns Nov 04 00:18:45 Ah, OK. So blit acceleration then, not vector stuff? Nov 04 00:18:53 eys Nov 04 00:18:54 yes Nov 04 00:57:05 anyone know how to force redraw of views in case of an event, e.g. window orientation change? Nov 04 00:59:37 Orientation changes cause a pause/resume by default, which will destroy and recreate your surfaces and force a redraw automatically. I discovered that when trying to prevent it. :) Nov 04 01:00:18 Rather, to get the terminology right: Configuration changes involving screen orientation cause the pause/resume. Nov 04 01:01:35 andyross: and this doesnt interrupt the activity? Nov 04 01:02:18 andyross: or more specifically, when the config change happens, how can i get flow control Nov 04 01:02:51 ah i think i see what you are saying Nov 04 01:03:05 expose public void onResume() ? Nov 04 01:03:58 There is an explicit onConfigurationChange() method you can override (I played with this, but didn't finish and forget the details). But the default behavior is to essentially destroy and recreate your interface when the keyboard is opened. Nov 04 01:05:31 which is what pretty much all core apps do Nov 04 01:05:35 (being destroyed and recreated) Nov 04 01:05:44 it allows you to pick alternate resources for different orientations Nov 04 01:05:48 and thus automatically Nov 04 01:07:03 romainguy: was that regarding onConfigurationChange or the pause/resume? Nov 04 01:07:28 core apps get destroyed/recreated when the orientation changes Nov 04 01:07:28 romainguy: i played around w/ the configurationchange config and that seems to leave the views intact Nov 04 01:07:34 it's the desired default behavior Nov 04 01:07:52 yes but unless you are writing a game or a very specific app (like the Browser), I recommend you use the default behavior Nov 04 01:08:12 i'd like to be able to interject tho Nov 04 01:08:12 e.g. Nov 04 01:08:20 say i have a some view component Nov 04 01:08:33 that i want to draw differently in portrait versus landscape Nov 04 01:09:07 is there a logical place for that to live in the default scenario? Nov 04 01:09:17 yes Nov 04 01:09:21 that's what the Home screen does for instance Nov 04 01:09:27 it simply uses two different XML layout Nov 04 01:09:38 one of them defining the horizontal orientation with an XML attribute Nov 04 01:09:49 you can also simply check against the width and height Nov 04 01:10:07 the problem with managing configuration change manually is that it will become un manageable when new devices will come out Nov 04 01:10:08 meaning oncreate is called again? Nov 04 01:10:11 yes Nov 04 01:10:13 ah Nov 04 01:10:14 okay cool Nov 04 01:10:21 what if you want to run on devices with high dpis? Nov 04 01:10:22 or low dpis? Nov 04 01:10:29 or with screens that can rotate in two different ways? Nov 04 01:10:30 etc. Nov 04 01:10:31 :) Nov 04 01:10:34 yeah totally Nov 04 01:10:42 i understand the reasoning Nov 04 01:10:47 that said, we know it's a bit of a burden Nov 04 01:10:56 and kinda weird the first time :) Nov 04 01:11:07 as long as i have flow control i think it should be fine Nov 04 01:11:53 e.g. understanding it gets destroyed/created -> oncreate called again Nov 04 01:13:03 also when your onDestroy() gets called Nov 04 01:13:22 you can call isFinishing() Nov 04 01:13:40 if it returns true, it means the activity is being destroyed on purpose (for instance by invoking finish()) Nov 04 01:13:55 but if it returns false, then the activity is destroyed by the system but is planned to be recreated Nov 04 01:14:02 so on orientation change, isFinishing() will be false Nov 04 01:14:44 ah cool Nov 04 01:34:58 romainguy: is the configuration object exposed in activities specific objects? Nov 04 02:26:40 so last night my R.java wasn't auto-generating for some reason that was my whole problem Nov 04 02:27:06 probably cause I fooled with it :/ Nov 04 02:29:48 eladdd: never a good idea :) Nov 04 02:30:26 ;) Nov 04 02:31:17 jeez man im at a cafe right now, the girl sitting next to me is mad beautiful Nov 04 02:32:03 eladdd, go chat her up Nov 04 02:32:07 elad, close this window first Nov 04 02:32:12 LOL Nov 04 02:32:23 im working on work though :< Nov 04 02:32:30 stuff needs to get done soon Nov 04 02:32:47 they guys.. out of curiously how expensive is reflection on the g1? Nov 04 02:32:47 which is why I must go now.. :o Nov 04 02:34:27 any takers? Nov 04 02:34:40 mocsrox, no diahreaa, but I can report it works. Nov 04 02:34:54 I doubt anyone has did any kind of perf testing. Nov 04 02:35:09 gambler: if its general enough what were you using it for? Nov 04 02:35:40 mocsrox, I just installed beanshell onto the emulator last night Nov 04 02:37:24 hm icic Nov 04 02:37:28 michael: her huge ass boyfriend just walked in.. Nov 04 02:38:45 Her huge ass-boyfriend? Eww. Nov 04 02:39:14 face it eladdd you never had a chance Nov 04 02:39:21 you are sitting in a public place on IRC... Nov 04 02:39:29 :P Nov 04 02:39:30 michael: basically... hahah Nov 04 02:39:36 haha Nov 04 02:40:12 don't be a meoblast Nov 04 02:41:09 oh jeeze Nov 04 02:41:18 he's banned for life right? Nov 04 02:41:40 dont be a who? Nov 04 02:49:37 http://thedailywtf.com/Articles/Raiding-the-RAID.aspx Nov 04 02:51:17 oh boy Nov 04 02:51:42 that's bad **** ENDING LOGGING AT Tue Nov 04 02:59:57 2008