Skip to content
Permalink
Browse files

front: Hopefully fixed crash when editing active video plugin.

  • Loading branch information
fzurita committed Feb 14, 2016
1 parent 0be7228 commit 9f15159eb315fe50644dd86c1faf3fe5b044555e
@@ -274,7 +274,6 @@ public void deserialize( String s )
if( s != null )
{
int psuedoId = -100;
Log.v("PlayerMap", "Deserializing: " + s);

// Read the input mappings
String[] pairs = s.split( "," );
@@ -154,21 +154,23 @@ protected void refreshViews()

String openGlVersion = AppData.getOpenGlEsVersion(this);

if(openGlVersion.equals("2.0"))
{
mScreenRoot.removePreference(mPreferenceVideoSubPlugin);
}
else if(openGlVersion.equals("3.0"))
if(mPreferenceVideoSubPlugin != null)
{
mPreferenceVideoSubPlugin.setEntries(new String[]{
getString(R.string.videoSubPlugin_entryGles20),
getString(R.string.videoSubPlugin_entryGles30)
});
mPreferenceVideoSubPlugin.setEntryValues(new String[]{
"-gles20",
"-gles30"});
if(openGlVersion.equals("2.0"))
{
mScreenRoot.removePreference(mPreferenceVideoSubPlugin);
}
else if(openGlVersion.equals("3.0"))
{
mPreferenceVideoSubPlugin.setEntries(new String[]{
getString(R.string.videoSubPlugin_entryGles20),
getString(R.string.videoSubPlugin_entryGles30)
});
mPreferenceVideoSubPlugin.setEntryValues(new String[]{
"-gles20",
"-gles30"});
}
}


// Get the current values
String videoPlugin = mPrefs.getString( VIDEO_PLUGIN, null );
@@ -257,7 +259,7 @@ else if(openGlVersion.equals("3.0"))
}
}

if(mPreferenceVideoSubPlugin != null)
if(mPreferenceVideoSubPlugin != null && !openGlVersion.equals("2.0"))
{
if( videoPlugin.contains( "%1$s" ) )
mScreenRoot.addPreference( mPreferenceVideoSubPlugin );
@@ -45,7 +45,6 @@
import android.support.v4.app.FragmentManager;
import android.support.v7.preference.PreferenceManager;
import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
@@ -509,6 +508,6 @@ public View getView( int position, View convertView, ViewGroup parent )
protected void RemoveProfile(String profileName)
{
Profile profile = new Profile(true, profileName, null);
boolean test = mProfileList.remove(profile);
mProfileList.remove(profile);
}
}

0 comments on commit 9f15159

Please sign in to comment.
You can’t perform that action at this time.