{ "id": "173445", "key": "TIMOB-26966", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "20432", "name": "Release 8.0.1", "archived": false, "released": true, "releaseDate": "2019-05-15" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2019-04-29T14:30:52.000+0000", "created": "2019-04-06T05:05:18.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [ "android", "back", "engSchedule", "regression", "window" ], "versions": [ { "id": "20214", "description": "", "name": "Release 7.2.1", "archived": false, "released": true, "releaseDate": "2018-08-17" } ], "issuelinks": [], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2019-04-29T14:30:52.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "*Summary:*\r\nIf Android \"Developer Options\" setting \"Don't keep activities\" is enabled, then tapping the Android \"Back\" button on a child window exits the app instead of back navigating to the parent window.\r\n\r\nThis regression was introduced as of 7.2.1 due to our memory leak fixes.\r\n\r\n*Steps to reproduce:*\r\n# Go to the Android device's main \"Settings\" screen.\r\n# Tap on \"System\" under \"Settings.\r\n# Tap on \"Developer options\" under \"System\" settings.\r\n# Enable \"Don't keep activities\", which should be near the bottom of the list.\r\n# Build and run the below code on the above Android device.\r\n# Tap on the \"Open Child Window\" button.\r\n# Tap on the Android \"Back\" button.\r\n# Notice the app exits instead of showing the parent window.\r\n\r\n{code:javascript}\r\nfunction addActivityListenersTo(activity, name) {\r\n\tif (!activity) {\r\n\t\treturn;\r\n\t}\r\n\tif (!name) {\r\n\t\tname = \"Activity\";\r\n\t}\r\n\tactivity.onCreate = function() {\r\n\t\tTi.API.info(\"@@@ \" + name + \".onCreate() called.\");\r\n\t};\r\n\tactivity.onRestart = function() {\r\n\t\tTi.API.info(\"@@@ \" + name + \".onRestart() called.\");\r\n\t};\r\n\tactivity.onStart = function() {\r\n\t\tTi.API.info(\"@@@ \" + name + \".onStart() called.\");\r\n\t};\r\n\tactivity.onResume = function() {\r\n\t\tTi.API.info(\"@@@ \" + name + \".onResume() called.\");\r\n\t};\r\n\tactivity.onPause = function() {\r\n\t\tTi.API.info(\"@@@ \" + name + \".onPause() called.\");\r\n\t};\r\n\tactivity.onStop = function() {\r\n\t\tTi.API.info(\"@@@ \" + name + \".onStop() called.\");\r\n\t};\r\n\tactivity.onDestroy = function() {\r\n\t\tTi.API.info(\"@@@ \" + name + \".onDestroy() called.\");\r\n\t};\r\n}\r\n\r\naddActivityListenersTo(Ti.Android.currentActivity, \"SplashActivity\");\r\n\r\nvar window = Ti.UI.createWindow();\r\nwindow.add(Ti.UI.createLabel({ text: \"Activity Callback Test\" }));\r\nvar openButton = Ti.UI.createButton({\r\n\ttitle: \"Open Child\",\r\n\tbottom: \"20%\",\r\n});\r\nopenButton.addEventListener(\"click\", function() {\r\n\tvar childWindow = Ti.UI.createWindow();\r\n\tchildWindow.add(Ti.UI.createLabel({ text: \"Child Window\" }));\r\n\taddActivityListenersTo(childWindow.activity, \"ChildActivity\");\r\n\tchildWindow.addEventListener(\"open\", function() {\r\n\t\tTi.API.info(\"@@@ Child window 'open' event fired.\");\r\n\t});\r\n\tchildWindow.open();\r\n});\r\nwindow.add(openButton);\r\nwindow.addEventListener(\"open\", function(e) {\r\n\tTi.API.info(\"@@@ Window 'open' event fired.\");\r\n});\r\naddActivityListenersTo(window.activity, \"ParentActivity\");\r\nwindow.open();\r\n{code}\r\n\r\n", "attachment": [], "flagged": false, "summary": "Android: Back navigating from child window causes app to exit when \"Don't keep activities\" is enabled as of 7.2.1", "creator": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 1124, "state": "closed", "name": "2019 Sprint 8", "startDate": "2019-03-31T18:03:00.000Z", "endDate": "2019-04-12T18:03:00.000Z", "completeDate": "2019-04-12T19:04:50.175Z", "originBoardId": 114 }, { "id": 1128, "state": "closed", "name": "2019 Sprint 9", "startDate": "2019-04-14T19:05:00.000Z", "endDate": "2019-04-26T19:05:00.000Z", "completeDate": "2019-04-26T22:05:13.933Z", "originBoardId": 114 }, { "id": 1129, "state": "closed", "name": "2019 Sprint 10", "startDate": "2019-04-28T22:06:00.000Z", "endDate": "2019-05-17T22:06:00.000Z", "completeDate": "2019-05-20T16:48:42.522Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "447633", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (master): https://github.com/appcelerator/titanium_mobile/pull/10829", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-04-12T01:52:51.000+0000", "updated": "2019-04-12T01:52:51.000+0000" }, { "id": "447990", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed for master.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-04-26T21:11:55.000+0000", "updated": "2019-04-26T21:11:55.000+0000" }, { "id": "447991", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (8.0.x): https://github.com/appcelerator/titanium_mobile/pull/10868", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-04-26T22:31:08.000+0000", "updated": "2019-04-26T22:31:08.000+0000" }, { "id": "448001", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR passed PR merged.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-04-26T23:17:11.000+0000", "updated": "2019-04-26T23:17:11.000+0000" }, { "id": "448037", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "*Closing ticket*, fix verified in SDK version {{8.0.1.v20190426162041}} and SDK version {{8.1.0.v20190426222341}}\r\n\r\nTest and other information can be found at: \r\nMaster : https://github.com/appcelerator/titanium_mobile/pull/10829\r\n8_0_X: https://github.com/appcelerator/titanium_mobile/pull/10868", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-04-29T14:30:38.000+0000", "updated": "2019-04-29T14:30:38.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }