@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Thread ct = Thread.currentThread(); // ct.setPriority(Thread.MAX_PRIORITY); uiThreadId = ct.getId(); getWindow().setFlags(RhodesService.WINDOW_FLAGS, RhodesService.WINDOW_MASK); requestWindowFeature(Window.FEATURE_PROGRESS); getWindow().setFeatureInt(Window.FEATURE_PROGRESS, 10000); mSplashScreen = new SplashScreen(this); setMainView(mSplashScreen); Intent intent = new Intent(this, RhodesService.class); bindService(intent, this, Context.BIND_AUTO_CREATE); mBoundToService = true; mHandler = new Handler(); mHandler.post(mSetup); sInstance = this; }
@Override public void onDestroy() { sInstance = null; if (mBoundToService) { unbindService(this); mBoundToService = false; } super.onDestroy(); }
@Override public void onStart() { super.onStart(); // sInstance = this; }
@Override public boolean onPrepareOptionsMenu(Menu menu) { super.onPrepareOptionsMenu(menu); mAppMenu = new RhoMenu(menu); return true; }
@Override public void onStop() { // sInstance = null; super.onStop(); }