mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-07 05:24:46 +01:00
fix NPEs by using existing mechanism for finding the right DlgDelegate
instance.
This commit is contained in:
parent
a2b7c71fc1
commit
91c561f6aa
2 changed files with 13 additions and 3 deletions
|
@ -208,9 +208,7 @@ public class DlgDelegate {
|
||||||
protected void showDialog( DlgID dlgID )
|
protected void showDialog( DlgID dlgID )
|
||||||
{
|
{
|
||||||
int id = dlgID.ordinal();
|
int id = dlgID.ordinal();
|
||||||
if ( m_activity instanceof FragActivity ) {
|
s_pendings.put( id, new WeakReference<DelegateBase>(m_dlgt) );
|
||||||
s_pendings.put( id, new WeakReference<DelegateBase>(m_dlgt) );
|
|
||||||
}
|
|
||||||
if ( !m_activity.isFinishing() ) {
|
if ( !m_activity.isFinishing() ) {
|
||||||
m_activity.showDialog( id );
|
m_activity.showDialog( id );
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,4 +33,16 @@ public class DualpaneDelegate extends DelegateBase {
|
||||||
protected void init( Bundle savedInstanceState )
|
protected void init( Bundle savedInstanceState )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Dialog onCreateDialog( int id )
|
||||||
|
{
|
||||||
|
return DlgDelegate.onCreateDialog( id );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void prepareDialog( DlgID dlgId, Dialog dialog )
|
||||||
|
{
|
||||||
|
DlgDelegate.onPrepareDialog( dlgId.ordinal(), dialog );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue