Well what is the stack crawl when it crashes?

On Fri, Jan 22, 2010 at 3:27 PM, Jun Sun <[email protected]> wrote:

> My goal is to launch web browser when I press the HOME key *when* phone is
> already at home page.
>
> Since this is hard (for me anyway), my first shot is to modify the HOME key
> long-press behavior so that it will launch the web browser.
>
> Thanks to Fei Zhang, who has correctly pointed me to the
> PhoneWindowManager.java file, I am able to locate the right place and inject
> the code to launch browser. See the code snippet below.
>
> Unfortunately, it does not work. If I do long-press twice, the whole UI
> interface resets (re-starting from flickering "ANDROID" logo). Does anybody
> have any ideas? I'd really appreciate.
>
> My device is ADP1. My tree is donut branch. My build host is FC11.
>
> Cheers.
>
> Jun
>
> --------------------
> PhoneWindowManager.java:
>
> ...
>
>    Runnable mHomeLongPress = new Runnable() {
>        public void run() {
>            /*
>             * Eat the longpress so it won't dismiss the recent apps dialog
> when
>             * the user lets go of the home key
>             */
>            mHomePressed = false;
>            performHapticFeedbackLw(null,
> HapticFeedbackConstants.LONG_PRESS, false);
>            sendCloseSystemWindows(SYSTEM_DIALOG_REASON_RECENT_APPS);
>            showRecentAppsDialog();
>        }
>    };
>
>    void showRecentAppsDialog() {
>        /* [jsun] */
>        mContext.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("
> http://m.google.com/";)));
>        /*
>        if (mRecentAppsDialog == null) {
>            mRecentAppsDialog = new RecentApplicationsDialog(mContext);
>        }
>        mRecentAppsDialog.show();
>        */
>    }
>
> --
> unsubscribe: 
> [email protected]<android-porting%[email protected]>
> website: http://groups.google.com/group/android-porting
>



-- 
Dianne Hackborn
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting

Reply via email to