On Fri, May 25, 2012 at 8:30 PM, Yan <yinor...@gmail.com> wrote: > I agree it may be dirty and icky, but its presumptuous to state that "You > should "absolutely *should not* be doing this." There are many real-world > situations where a program must be exited imediately or this call would not > have been made available in the Android API. Perhaps you all don't remember > the programmer that got sued for a bug that killed a patient with too much > radiation because he didn't stop the program. There are many other non > life-threatening cases where the right thing to do is to just halt the > program. What would you do if you had zombie-game that users start running > on some really slow devices and the frame-rate grinds down to 2 fps and your > zombies look, well too dead, and then your app starts getting really bad > ratings??? >
No. This is universally a hack, and you should not be doing this ever. There is always a better way, and your arguments are fundamentally flawed for a number of reasons: -- If you are running a radiation emitting device from an android app, then you are using the system from something beyond its means anyway, you should be modifying the firmware and using something like a real time system, as the scheduler could be equally untrusted, all you're doing it is pushing it further. -- Your second example doesn't make any sense either, in this case you could easily check hardware, and simply call a finish() on the view, there's no need to use System.exit(). So no, this is universally a sign that the programmer took the cheap, unprofessional way out. kris -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en