{ "id": "84912", "key": "TIMOB-7201", "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": [], "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2012-01-16T15:37:51.000+0000", "created": "2012-01-16T04:55:37.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "regression" ], "versions": [ { "id": "12580", "description": "Dual Runtime 1.8.0", "name": "Release 1.8.0.1", "archived": true, "released": true, "releaseDate": "2011-12-22" } ], "issuelinks": [ { "id": "14584", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "84139", "key": "TIMOB-6816", "fields": { "summary": "Android: UI - heavyweight window open event fired twice", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "14563", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "62459", "key": "TIMOB-1827", "fields": { "summary": "Android: window close event firing multiple times", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "14566", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "84105", "key": "TIDOC-74", "fields": { "summary": "APIDOC: UI view size property should be documented as the rendered view size and as read-only", "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" } }, "priority": { "name": "Low", "id": "4" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-22T21:27:01.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": "h2. Problem\r\n\r\nWindow open and focus events fire more than once (twice, in my tests).\r\n\r\nNote that open and focus is not currently fired at all for lightweight windows. See linked ticket for more info.\r\n\r\nWorks as expected in 1.7.5, hence this is a regression.\r\n\r\nh2. Test case\r\n\r\n{code:lang=javascript|title=app.js}\r\nvar win = Ti.UI.createWindow({\r\n fullscreen:false,\r\n backgroundColor:'red'\r\n});\r\n\r\nwin.open();\r\n\r\nwin.addEventListener('open', function() {\r\n Ti.API.info(\"------- Window event fired: open --------\");\r\n});\r\n\r\nwin.addEventListener('focus', function() {\r\n Ti.API.info(\"------- Window event fired: focus --------\");\r\n});\r\n{code}\r\n\r\nh2. Logs\r\n\r\n{code:lang=none}\r\n 914 AndroidRuntime D >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<\r\n 914 AndroidRuntime D CheckJNI is ON\r\n 915 TiApplication I (main) [305,305] Titanium 1.8.0.1 (2011/12/22 13:09 fbdc96f)\r\n 914 AndroidRuntime D --- registering native functions ---\r\n 915 TiFastDev D (main) [311,616] Enabling Fastdev on port 60494\r\n 915 TiFastDev D (main) [21,637] sent tokens successfully\r\n 915 TiFastDev D (main) [2,639] Fastdev session handshake succesful.\r\n 915 TiApplication I (main) [24,663] Titanium Javascript runtime: v8\r\n 915 TiApplication W (main) [60,723] activity stack is emtpy, unable to get current activity\r\n 915 TiRootActivity I (main) [0,0] checkpoint, on root activity create, savedInstanceState: Bundle[mParcelledData.dataSize=204]\r\n 915 TiApplication W (main) [200,200] activity stack is emtpy, unable to get current activity\r\n 915 TiApplication W (main) [0,200] activity stack is emtpy, unable to get current activity\r\n 915 TiApplication W (main) [2,202] activity stack is emtpy, unable to get current activity\r\n 60 ActivityManager I Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.appcelerator.testing10/.Testing10Activity }\r\n 914 AndroidRuntime D Shutting down VM\r\n 914 AndroidRuntime I NOTE: attach of thread 'Binder Thread #3' failed\r\n 915 TiApplication E (KrollRuntimeThread) [1226,1428] APP PROXY: ti.modules.titanium.app.AppModule@44eda810\r\n 915 TiAssetHelper D Fetching \"app.js\" with Fastdev...\r\n 60 ActivityManager I Starting activity: Intent { cmp=com.appcelerator.testing10/org.appcelerator.titanium.TiActivity (has extras) }\r\n 915 TiRootActivity I (main) [0,0] checkpoint, on root activity resume. activity = com.appcelerator.testing10.Testing10Activity@44f2d590\r\n 915 TiAPI I ------- Window event fired: open --------\r\n 915 TiAPI I ------- Window event fired: focus --------\r\n 915 TiAPI I ------- Window event fired: focus --------\r\n 60 InputManagerService W Got RemoteException sending setActive(false) notification to pid 893 uid 10044\r\n 60 NotificationService W Object died trying to hide notification android.app.ITransientNotification$Stub$Proxy@44f86088 in package com.appcelerator.testing10\r\n 60 ActivityManager W setProcessForeground called on unknown pid: 893\r\n 60 ActivityManager I Displayed activity com.appcelerator.testing10/.Testing10Activity: 56285 ms (total 3528 ms)\r\n 915 TiAPI I ------- Window event fired: open --------\r\n 60 ActivityManager I Displayed activity com.appcelerator.testing10/org.appcelerator.titanium.TiActivity: 850 ms (total 850 ms)\r\n{code}\r\n\r\nh2. Workaround\r\n\r\nUse a boolean variable to determine whether the event has already been fired.", "attachment": [], "flagged": false, "summary": "Android: UI.window - open and focus events fire more than once", "creator": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "environment": "* Titanium Mobile 1.8.0.1\r\n* Rhino & v8\r\n* Google APIs Android 2.2\r\n* emulator\r\n* Ubuntu 10.04\r\n* Studio 1.0.8.201201091758", "comment": { "comments": [ { "id": "415000", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing as duplicate with regards to the information provided elsewhere in this ticket.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-22T21:27:01.000+0000", "updated": "2017-03-22T21:27:01.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }