Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 242599a0 authored by Dianne Hackborn's avatar Dianne Hackborn
Browse files

Execute back key on key up.

Change-Id: Ic878e145f68f3a2b4e8167d4df0685c9d63462f2
parent 5aaa36a1
Loading
Loading
Loading
Loading
+10 −8
Original line number Diff line number Diff line
@@ -1012,16 +1012,18 @@ public final class ContactsListActivity extends ListActivity implements
    }

    @Override
    public boolean onKeyDown(int keyCode, KeyEvent event) {
        switch (keyCode) {
            case KeyEvent.KEYCODE_BACK: {
    public void onBackPressed() {
        if (mFastTrack.isShowing()) {
            // Back key dismisses fast-track when its visible
            mFastTrack.dismiss();
                    return true;
        } else {
            super.onBackPressed();
        }
                break;
    }

    @Override
    public boolean onKeyDown(int keyCode, KeyEvent event) {
        switch (keyCode) {
            case KeyEvent.KEYCODE_CALL: {
                if (callSelection()) {
                    return true;
+4 −6
Original line number Diff line number Diff line
@@ -316,18 +316,16 @@ public class DialtactsActivity extends TabActivity implements TabHost.OnTabChang
    }

    @Override
    public boolean onKeyDown(int keyCode, KeyEvent event) {
        // Handle BACK
        if (keyCode == KeyEvent.KEYCODE_BACK && isTaskRoot()) {
    public void onBackPressed() {
        if (isTaskRoot()) {
            // Instead of stopping, simply push this to the back of the stack.
            // This is only done when running at the top of the stack;
            // otherwise, we have been launched by someone else so need to
            // allow the user to go back to the caller.
            moveTaskToBack(false);
            return true;
        } else {
            super.onBackPressed();
        }
        
        return super.onKeyDown(keyCode, event);
    }

    /** {@inheritDoc} */
+5 −7
Original line number Diff line number Diff line
@@ -153,16 +153,14 @@ public class SocialStreamActivity extends ListActivity implements OnClickListene
        mFastTrack.show(aggUri, mRect, Intents.MODE_MEDIUM, null);
    }

    /** {@inheritDoc} */
    @Override
    public boolean onKeyDown(int keyCode, KeyEvent event) {
    public void onBackPressed() {
        if (mFastTrack.isShowing()) {
            // Back key dismisses fast-track when its visible
        if (keyCode == KeyEvent.KEYCODE_BACK && mFastTrack.isShowing()) {
            mFastTrack.dismiss();
            return true;
        } else {
            super.onBackPressed();
        }

        return super.onKeyDown(keyCode, event);
    }

    @Override