Java 是否可以同时执行onDestroy和fullSensor

Java 是否可以同时执行onDestroy和fullSensor,java,android,xml,android-manifest,Java,Android,Xml,Android Manifest,有可能在同一个应用程序中使用这两种方法吗 Use for :rotation with backhome(onDestroy) public void onDestroy(){ super.onDestroy(); webview.destroy(); finish(); System.gc(); //webview = null; } 及 我想在单击手机撤消按钮

有可能在同一个应用程序中使用这两种方法吗

Use for :rotation with backhome(onDestroy)

  public void onDestroy(){
            super.onDestroy();
           webview.destroy();
            finish();
           System.gc();
           //webview = null;
      }


我想在单击手机撤消按钮时旋转兼容并退出应用程序。我的应用程序也使用javascript

如果你尝试一下会发生什么?它会给出一个错误吗?错误是什么?不那么有什么不符合预期的呢?OnDestry()在正常工作的同时android:screenOrientation=“fullSensor”不工作。
    setRequestedOrientation (ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR); //in java file
or
    android:screenOrientation="fullSensor"//manifest