/** Called when the activity is first created. */ public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ArrayList<EntityManager> cachedData = (ArrayList<EntityManager>) getLastNonConfigurationInstance(); if (cachedData != null) { Log.i( getClass().getSimpleName(), "onCreate: ... found a LastNonConfigurationInstance, attempting to load it..."); em = (EntityManager) cachedData.get(0); /** We loaded a cached copy of the ES, so have to manually do this auto-setup */ MetaEntity.defaultEntityManager = em; } Log.i("" + this.getClass(), "activity onCreate"); }