am cbb89e4f: Fix locked workspace in Home.

Merge commit 'cbb89e4fc253a5fc3f24162dfb4e29fc6a815c2b'

* commit 'cbb89e4fc253a5fc3f24162dfb4e29fc6a815c2b':
  Fix locked workspace in Home.
This commit is contained in:
Romain Guy 2009-06-08 23:52:45 -07:00 committed by The Android Open Source Project
commit 836fab2853
1 changed files with 102 additions and 97 deletions

View File

@ -1744,7 +1744,7 @@ public final class Launcher extends Activity implements View.OnClickListener, On
* appropriate activity. * appropriate activity.
*/ */
private class CreateShortcut implements DialogInterface.OnClickListener, private class CreateShortcut implements DialogInterface.OnClickListener,
DialogInterface.OnCancelListener { DialogInterface.OnCancelListener, DialogInterface.OnDismissListener {
private AddAdapter mAdapter; private AddAdapter mAdapter;
Dialog createDialog() { Dialog createDialog() {
@ -1760,6 +1760,7 @@ public final class Launcher extends Activity implements View.OnClickListener, On
AlertDialog dialog = builder.create(); AlertDialog dialog = builder.create();
dialog.setOnCancelListener(this); dialog.setOnCancelListener(this);
dialog.setOnDismissListener(this);
return dialog; return dialog;
} }
@ -1769,6 +1770,10 @@ public final class Launcher extends Activity implements View.OnClickListener, On
cleanup(); cleanup();
} }
public void onDismiss(DialogInterface dialog) {
mWorkspace.unlock();
}
private void cleanup() { private void cleanup() {
mWorkspace.unlock(); mWorkspace.unlock();
dismissDialog(DIALOG_CREATE_SHORTCUT); dismissDialog(DIALOG_CREATE_SHORTCUT);