projects
/
debian
/
openrocket
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update to ActionBarSherlock 4.1.0.
[debian/openrocket]
/
android-libraries
/
ActionBarSherlock
/
src
/
com
/
actionbarsherlock
/
internal
/
ActionBarSherlockCompat.java
diff --git
a/android-libraries/ActionBarSherlock/src/com/actionbarsherlock/internal/ActionBarSherlockCompat.java
b/android-libraries/ActionBarSherlock/src/com/actionbarsherlock/internal/ActionBarSherlockCompat.java
index f080bfe95f9b038e48c206e57fda54d812c61adf..05353d28ca80fdf91cb91a01baf458911cd84a3f 100644
(file)
--- a/
android-libraries/ActionBarSherlock/src/com/actionbarsherlock/internal/ActionBarSherlockCompat.java
+++ b/
android-libraries/ActionBarSherlock/src/com/actionbarsherlock/internal/ActionBarSherlockCompat.java
@@
-81,6
+81,8
@@
public class ActionBarSherlockCompat extends ActionBarSherlock implements MenuBu
/** Whether or not the title is stable and can be displayed. */
private boolean mIsTitleReady = false;
/** Whether or not the title is stable and can be displayed. */
private boolean mIsTitleReady = false;
+ /** Whether or not the parent activity has been destroyed. */
+ private boolean mIsDestroyed = false;
/* Emulate PanelFeatureState */
private boolean mClosingActionMenu;
/* Emulate PanelFeatureState */
private boolean mClosingActionMenu;
@@
-413,7
+415,7
@@
public class ActionBarSherlockCompat extends ActionBarSherlock implements MenuBu
}
// Next collapse any expanded action views.
}
// Next collapse any expanded action views.
- if (
a
ActionBar != null && wActionBar.hasExpandedActionView()) {
+ if (
w
ActionBar != null && wActionBar.hasExpandedActionView()) {
if (action == KeyEvent.ACTION_UP) {
wActionBar.collapseActionView();
}
if (action == KeyEvent.ACTION_UP) {
wActionBar.collapseActionView();
}
@@
-428,7
+430,7
@@
public class ActionBarSherlockCompat extends ActionBarSherlock implements MenuBu
mMenuKeyIsLongPress = true;
} else if (event.getAction() == KeyEvent.ACTION_UP) {
if (!mMenuKeyIsLongPress) {
mMenuKeyIsLongPress = true;
} else if (event.getAction() == KeyEvent.ACTION_UP) {
if (!mMenuKeyIsLongPress) {
- if (mActionMode == null) {
+ if (mActionMode == null
&& wActionBar != null
) {
if (wActionBar.isOverflowMenuShowing()) {
wActionBar.hideOverflowMenu();
} else {
if (wActionBar.isOverflowMenuShowing()) {
wActionBar.hideOverflowMenu();
} else {
@@
-445,6
+447,11
@@
public class ActionBarSherlockCompat extends ActionBarSherlock implements MenuBu
return result;
}
return result;
}
+ @Override
+ public void dispatchDestroy() {
+ mIsDestroyed = true;
+ }
+
///////////////////////////////////////////////////////////////////////////
// Menu callback lifecycle and creation
///////////////////////////////////////////////////////////////////////////
// Menu callback lifecycle and creation
@@
-977,7
+984,7
@@
public class ActionBarSherlockCompat extends ActionBarSherlock implements MenuBu
@Override
public void run() {
//Invalidate if the panel menu hasn't been created before this.
@Override
public void run() {
//Invalidate if the panel menu hasn't been created before this.
- if (!mActivity.isFinishing() && mMenu == null) {
+ if (!m
IsDestroyed && !m
Activity.isFinishing() && mMenu == null) {
dispatchInvalidateOptionsMenu();
}
}
dispatchInvalidateOptionsMenu();
}
}