@Override
 public void onAttachedToWindow() {
   super.onAttachedToWindow();
   Window window = getWindow();
   // Eliminates color banding
   window.setFormat(PixelFormat.RGBA_8888);
 }
Пример #2
0
  public void onAttachedToWindow() {
    int sysVersion = Integer.parseInt(android.os.Build.VERSION.SDK);
    if (sysVersion <= 8) { // 只对2.2以下的版本有效
      this.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD);
    }

    super.onAttachedToWindow();
  }
Пример #3
0
 @Override
 public void onAttachedToWindow() {
   // Log.e("Accompany-GUI-activity","on attached to window");
   // this.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD);
   // Log.e("Accompany-GUI-activity","on attached to window 2");
   super.onAttachedToWindow();
   // Log.e("Accompany-GUI-activity","on attached to window 3");
 }
 @Override
 public void onAttachedToWindow() {
   super.onAttachedToWindow();
   if (!mFromLiveCardVoice) {
     // When not activated by voice, we are activated by TAP from a live card.
     // Open the options menu as soon as window attaches.
     openOptionsMenu();
   }
 }
  @Override
  public void onAttachedToWindow() {

    super.onAttachedToWindow();
    if (remotePlugin == null) {
      return;
    }
    remotePlugin.getCurrentPluginActivity().onAttachedToWindow();
  }
Пример #6
0
 @Override
 public void onAttachedToWindow() {
   Log.d(TAG, "onAttachedToWindow");
   Log.d(
       TAG,
       "____________________________ ____________ onAttachedToWindow type: "
           + getWindow().getAttributes().type);
   //		getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD);
   ////		getWindow().addFlags(FLAG_FULLSCREEN | FLAG_KEEP_SCREEN_ON);
   //		getWindow().addFlags(FLAG_KEEP_SCREEN_ON);
   super.onAttachedToWindow();
 }
  @Override
  public void onAttachedToWindow() {
    super.onAttachedToWindow();

    mAbstractConsole = ConsoleManager.getMainConsole();
    if (mAbstractConsole == null) {
      mDeviceDialog = new DeviceDialog(this, mHandler.obtainMessage(ACTION_DEVICE_SELECTED));
      mDeviceDialog.show(getDecorView());
    } else if (mAbstractConsole.getState() == AbstractConsole.State.STOPPED) {
      new Thread(mAbstractConsole).start();
    } else {
      mAbstractConsole.setOnConsoleStateChangedListener(this);
    }
  }
 @Override
 public void onAttachedToWindow() {
   super.onAttachedToWindow();
   if (mGesture != null) {
     final GestureOverlayView overlay = (GestureOverlayView) findViewById(R.id.gestures_overlay);
     overlay.post(
         new Runnable() {
           @Override
           public void run() {
             overlay.setGesture(mGesture);
             mDoneButton.setEnabled(true);
           }
         });
   }
 }
 @Override
 public void onAttachedToWindow() {
   super.onAttachedToWindow();
   Window window = getWindow();
   window.setFormat(PixelFormat.RGBA_8888);
 }
Пример #10
0
 @Override
 public void onAttachedToWindow() {
   super.onAttachedToWindow();
   openOptionsMenu();
 }
Пример #11
0
 /** Called when the view is attached to a window. */
 @Override
 public void onAttachedToWindow() {
   // disables the home button so logging will continue
   this.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD);
   super.onAttachedToWindow();
 }
  /**
   * create any associated state and call init methods on an activity
   *
   * <p>call any life cycle events for the activity
   *
   * @param activity
   */
  @DSVerified
  @DSBan(DSCat.DROIDSAFE_INTERNAL)
  public static void modelActivity(android.app.Activity activity) {
    if (mApplication != null) activity.setApplication(mApplication);

    Bundle b = new Bundle();
    activity.performCreate(b, context);

    activity.onAttachedToWindow();
    activity.onWindowFocusChanged(true);

    // Call all public methods with no params
    activity.onBackPressed();
    activity.onContentChanged();
    activity.onCreateDescription();
    activity.onLowMemory();
    activity.onRetainNonConfigurationInstance();
    // do not call this automatically because it leads to a crazy long path of crap
    // activity.onSearchRequested();
    activity.onUserInteraction();

    // TODO: DOES THIS MAKE SENSE?
    // We should not change method's visiblity
    /*
    activity.onCreateDialog(0);
    activity.onCreateDialog(0, new Bundle());
    activity.onPrepareDialog(0, new Dialog(context));
    */

    /*
    //TODO: WHAT ABOUT A REAL MENU?  We moved to Activity's droidsafeOnOtherHook
    activity.onCreateOptionsMenu(null);
    activity.onPrepareOptionsMenu(null);
    activity.onCreateContextMenu(null, null, null);
    activity.onOptionsItemSelected(null);
    activity.onContextItemSelected(null);
    activity.dispatchTouchEvent(new MotionEvent());

    //activity.droidsafeOnKeyEvents();
    */
    activity.onConfigurationChanged(new Configuration());
    activity.droidsafeOnSavedInstanceState(b);

    activity.droidsafeOnResume();
    activity.droidsafeOnPause();

    ////////////////
    // Callback hooks specific for SubActivity classes
    // All subclass of Activity should implment this in the model
    // so that their callback will be called
    // Map, listview, expandblelist, etc...
    activity.droidsafeSubActivityCallbackHook();

    activity.droidsafeOnStop();

    activity.droidsafeOnRestart();

    activity.droidsafeOnDestroy();

    activity.droidsafePerformRestoreInstanceState(b);

    activity.onDetachedFromWindow();
    // Calls for MapActivity from mapping library
  }
Пример #13
0
 @Override
 public void onAttachedToWindow() {
   super.onAttachedToWindow();
   mFullScreenScale = getMeasureScale();
 }
Пример #14
0
 @Override
 public void onAttachedToWindow() {
   super.onAttachedToWindow();
   //        getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD);
 }
Пример #15
0
 // 使home物理键失效
 @Override
 public void onAttachedToWindow() {
   // this.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG);
   super.onAttachedToWindow();
 }