示例#1
0
  @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;
  }
示例#2
0
 @Override
 public void onDestroy() {
   sInstance = null;
   if (mBoundToService) {
     unbindService(this);
     mBoundToService = false;
   }
   super.onDestroy();
 }
示例#3
0
 @Override
 public void onStart() {
   super.onStart();
   // sInstance = this;
 }
示例#4
0
 @Override
 public boolean onPrepareOptionsMenu(Menu menu) {
   super.onPrepareOptionsMenu(menu);
   mAppMenu = new RhoMenu(menu);
   return true;
 }
示例#5
0
 @Override
 public void onStop() {
   // sInstance = null;
   super.onStop();
 }