@@ -1317,9 +1317,39 @@ public void addOnPrepareOptionsMenuEventListener(OnPrepareOptionsMenuEvent liste
1317
1317
onPrepareOptionsMenuListeners .add (new WeakReference <>(listener ));
1318
1318
}
1319
1319
1320
- public void removeOnLifecycleEventListener (OnLifecycleEvent listener )
1320
+ public boolean removeOnLifecycleEventListener (OnLifecycleEvent listener )
1321
1321
{
1322
- // TODO stub
1322
+ return lifecycleListeners .remove (listener );
1323
+ }
1324
+
1325
+ public boolean removeOnInstanceStateEventListener (OnInstanceStateEvent listener )
1326
+ {
1327
+ return instanceStateListeners .remove (listener );
1328
+ }
1329
+
1330
+ public boolean removeOnWindowFocusChangedEventListener (OnWindowFocusChangedEvent listener )
1331
+ {
1332
+ return windowFocusChangedListeners .remove (listener );
1333
+ }
1334
+
1335
+ public boolean removeInterceptOnBackPressedEventListener (interceptOnBackPressedEvent listener )
1336
+ {
1337
+ return interceptOnBackPressedListeners .remove (listener );
1338
+ }
1339
+
1340
+ public boolean removeOnActivityResultListener (OnActivityResultEvent listener )
1341
+ {
1342
+ return onActivityResultListeners .remove (listener );
1343
+ }
1344
+
1345
+ public boolean removeOnCreateOptionsMenuEventListener (OnCreateOptionsMenuEvent listener )
1346
+ {
1347
+ return onCreateOptionsMenuListeners .remove (listener );
1348
+ }
1349
+
1350
+ public boolean removeOnPrepareOptionsMenuEventListener (OnPrepareOptionsMenuEvent listener )
1351
+ {
1352
+ return onPrepareOptionsMenuListeners .remove (listener );
1323
1353
}
1324
1354
1325
1355
private void dispatchCallback (String propertyName , KrollDict data )
@@ -1670,8 +1700,6 @@ protected void onDestroy()
1670
1700
@ Override
1671
1701
protected void onSaveInstanceState (Bundle outState )
1672
1702
{
1673
- super .onSaveInstanceState (outState );
1674
-
1675
1703
// If activity is being temporarily destroyed, then save settings to be restored when activity is recreated.
1676
1704
if (!isFinishing ()) {
1677
1705
if (supportHelper != null ) {
@@ -1692,6 +1720,8 @@ protected void onSaveInstanceState(Bundle outState)
1692
1720
}
1693
1721
}
1694
1722
}
1723
+
1724
+ super .onSaveInstanceState (outState );
1695
1725
}
1696
1726
1697
1727
@ Override
0 commit comments