소스 검색

Launch app and fire event after the onStart() [fixes #1505]

Sebastián Katzer 7 년 전
부모
커밋
b1a6e7d588
1개의 변경된 파일2개의 추가작업 그리고 13개의 파일을 삭제
  1. 2 13
      src/android/notification/receiver/AbstractClickReceiver.java

+ 2 - 13
src/android/notification/receiver/AbstractClickReceiver.java

@@ -42,12 +42,10 @@ abstract public class AbstractClickReceiver extends Activity {
 
     /**
      * Called when local notification was clicked to launch the main intent.
-     *
-     * @param state Saved instance state
      */
     @Override
-    public void onCreate (Bundle state) {
-        super.onCreate(state);
+    protected void onResume() {
+        super.onResume();
 
         Intent intent      = getIntent();
         Bundle bundle      = intent.getExtras();
@@ -63,15 +61,6 @@ abstract public class AbstractClickReceiver extends Activity {
             return;
 
         onClick(toast, bundle);
-    }
-
-    /**
-     * Fixes "Unable to resume activity" error.
-     * Theme_NoDisplay: Activities finish themselves before being resumed.
-     */
-    @Override
-    protected void onResume() {
-        super.onResume();
         finish();
     }