mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-06 20:45:54 +01:00
fix crash downloading updates: requestWindowFeature() must be called
earlier, from activity's onCreate
This commit is contained in:
parent
9e763b4049
commit
007b390c42
6 changed files with 13 additions and 15 deletions
|
@ -25,6 +25,9 @@ import android.content.Intent;
|
|||
import android.content.pm.ActivityInfo;
|
||||
import android.os.Bundle;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.Window;
|
||||
|
||||
import org.eehouse.android.xw4.jni.CommonPrefs;
|
||||
|
||||
public class BoardActivity extends XWActivity {
|
||||
|
||||
|
@ -33,6 +36,11 @@ public class BoardActivity extends XWActivity {
|
|||
@Override
|
||||
protected void onCreate( Bundle savedInstanceState )
|
||||
{
|
||||
if ( CommonPrefs.getHideTitleBar( this )
|
||||
&& ABUtils.haveMenuKey( this ) ) {
|
||||
requestWindowFeature( Window.FEATURE_NO_TITLE );
|
||||
}
|
||||
|
||||
m_dlgt = new BoardDelegate( this, savedInstanceState );
|
||||
super.onCreate( savedInstanceState, m_dlgt );
|
||||
|
||||
|
|
|
@ -504,11 +504,6 @@ public class BoardDelegate extends DelegateBase
|
|||
{
|
||||
getBundledData( savedInstanceState );
|
||||
|
||||
if ( CommonPrefs.getHideTitleBar( m_activity )
|
||||
&& ABUtils.haveMenuKey( m_activity ) ) {
|
||||
requestWindowFeature( Window.FEATURE_NO_TITLE );
|
||||
}
|
||||
|
||||
if ( BuildConstants.CHAT_SUPPORTED ) {
|
||||
m_pendingChats = new ArrayList<String>();
|
||||
}
|
||||
|
|
|
@ -208,11 +208,6 @@ public class DelegateBase implements DlgDelegate.DlgClickNotify,
|
|||
Utils.showToast( m_activity, msg );
|
||||
}
|
||||
|
||||
public boolean requestWindowFeature( int feature )
|
||||
{
|
||||
return m_activity.requestWindowFeature( feature );
|
||||
}
|
||||
|
||||
public Object getSystemService( String name )
|
||||
{
|
||||
return m_activity.getSystemService( name );
|
||||
|
|
|
@ -22,14 +22,18 @@ package org.eehouse.android.xw4;
|
|||
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
import android.view.Window;
|
||||
|
||||
public class DwnldActivity extends XWListActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate( Bundle savedInstanceState )
|
||||
{
|
||||
requestWindowFeature( Window.FEATURE_NO_TITLE );
|
||||
|
||||
DwnldDelegate dlgt =
|
||||
new DwnldDelegate( this, savedInstanceState );
|
||||
|
||||
super.onCreate( savedInstanceState, dlgt );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -243,10 +243,6 @@ public class DwnldDelegate extends ListDelegateBase {
|
|||
String[] urls = null;
|
||||
LinearLayout item = null;
|
||||
|
||||
requestWindowFeature( Window.FEATURE_LEFT_ICON );
|
||||
m_activity.getWindow().setFeatureDrawableResource( Window.FEATURE_LEFT_ICON,
|
||||
R.drawable.icon48x48 );
|
||||
|
||||
Intent intent = getIntent();
|
||||
Uri uri = intent.getData(); // launched from Manifest case
|
||||
if ( null == uri ) {
|
||||
|
|
|
@ -24,7 +24,7 @@ import android.app.ListActivity;
|
|||
import android.os.Bundle;
|
||||
import android.view.Window;
|
||||
|
||||
public class InviteActivity extends XWListActivity {
|
||||
public abstract class InviteActivity extends XWListActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate( Bundle savedInstanceState )
|
||||
|
|
Loading…
Add table
Reference in a new issue