{ "id": "171980", "key": "TIMOB-26246", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "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": "20238", "description": "", "name": "Release 7.5.0", "archived": false, "released": true, "releaseDate": "2018-11-15" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-10-25T14:05:07.000+0000", "created": "2018-07-27T23:11:35.000+0000", "epic": { "id": 172002, "key": "TIMOB-26258", "name": "Android P: Implement Support", "summary": "Android P: Implement Support", "color": { "key": "color_8" }, "done": false }, "priority": { "name": "High", "id": "2" }, "labels": [ "android", "inset" ], "versions": [], "issuelinks": [ { "id": "56700", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "169804", "key": "TIMOB-25301", "fields": { "summary": "iPhone X: Need to be able to control the Insets / Layout Margins", "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": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "56901", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "172382", "key": "TIMOB-26427", "fields": { "summary": "Android: Add \"safeAreaPadding\" property to Ti.UI.Window", "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": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } }, { "id": "56917", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "172453", "key": "TIMOB-26459", "fields": { "summary": "Android: Add support for translucent status bar and navigation bar", "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": "Medium", "id": "3" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2018-12-10T23:20:35.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\nAndroid 9.0 (aka: Android P) will support devices with \"iPhone X\" style frame insetting where the top frame cuts into the top status bar.\r\n !AndroidP_Inset.png|thumbnail! \r\n\r\nWe'll need to provide APIs to better support this device feature. Preferably re-use the existing APIs used by iPhone X such as our {{Window.extendSafeArea}} property.\r\n\r\n*Note 1:*\r\nAndroid 9.0 (API Level 28) provides new APIs to help with us. They're listed here...\r\nhttps://developer.android.com/preview/features#cutout\r\n\r\nQuick reference...\r\nhttps://developer.android.com/reference/android/view/DisplayCutout\r\nhttps://developer.android.com/reference/android/view/WindowManager.LayoutParams#LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES\r\n\r\nAlso, the window won't render into the cutout unless we set additional window flags such as the following...\r\n{code:java}\r\nWindowManager.LayoutParams attributes = getWindow().getAttributes();\r\nattributes.layoutInDisplayCutoutMode = WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES;\r\ngetWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);\r\ngetWindow().setAttributes(attributes);\r\n{code}\r\n\r\n*Note 2:*\r\nHuawei has their own custom notch support on Android 8 which they document in the link below. Note that these are not official Google Android APIs.\r\nhttps://developer.huawei.com/consumer/en/devservice/doc/30210", "attachment": [ { "id": "65397", "filename": "AndroidP_Inset.png", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-07-27T23:05:48.000+0000", "size": 215944, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: Handle Android P insetting/display-cutout", "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": 1073, "state": "closed", "name": "2018 Sprint 19 SDK", "startDate": "2018-09-09T21:02:56.422Z", "endDate": "2018-09-23T21:02:00.000Z", "completeDate": "2018-09-23T22:28:10.932Z", "originBoardId": 114 }, { "id": 1078, "state": "closed", "name": "2018 Sprint 20 SDK", "startDate": "2018-09-23T16:57:58.349Z", "endDate": "2018-10-07T16:57:00.000Z", "completeDate": "2018-10-07T23:31:40.476Z", "originBoardId": 114 }, { "id": 1084, "state": "closed", "name": "2018 Sprint 21", "startDate": "2018-10-07T23:32:40.560Z", "endDate": "2018-10-21T23:32:00.000Z", "completeDate": "2018-10-21T23:19:05.460Z", "originBoardId": 114 }, { "id": 1088, "state": "closed", "name": "2018 Sprint 22", "startDate": "2018-10-21T23:20:52.653Z", "endDate": "2018-11-04T23:20:00.000Z", "completeDate": "2018-11-04T23:29:59.423Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "439581", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~jquick] Quick PoC of the Android safe-area [here|https://github.com/hansemannn/titanium_mobile/commit/0d73f7b7ebc6ddbb1a798e536bd2902e934babe8]. It currently does not build due to missing symbols, although 28 is installed. Not sure how to fix that so far!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-07-28T19:32:13.000+0000", "updated": "2018-07-28T19:32:13.000+0000" }, { "id": "440530", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~hknoechel], we need to update all of the \"build.properties\" files to build with API Level 28 and link to the newest libraries. But before we do that, we've got to install API Level 28 on the Jenkins nodes first. I'll talk to the team here about it.\r\n\r\nI've already written up a ticket to build with API Level 28 here: [TIMOB-26261]\r\nWe'll handle this part on our end. Once done/merged, you can update your branch and be able to build it.\r\nThanks for digging into it anyways. We'll get there.\r\n\r\n_*Edit:* Also, we shouldn't modify the Jenkins nodes until after the 7.3.0 GA release. We don't want to risk breaking Jenkins right now._", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-08-07T01:47:19.000+0000", "updated": "2018-08-07T02:17:06.000+0000" }, { "id": "442043", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I'm now thinking that on Android P, we should always set up the window layout to render under the notch (like iOS) and instead tie our {{Ti.UI.Window.extendSafeArea}} property to Android's Java {{View.setFitSystemWindows()}} method since this controls whether or not Titanium's views will be rendered within the safe area.\r\nhttps://developer.android.com/reference/android/view/View.html#setFitsSystemWindows(boolean)\r\n\r\nThe reason is because before Android P, you already had the ability to set up a translucent top status bar and bottom navigation bar via a \"theme\", but Titanium has never offered the ability to render content under those bars before. We can use the new {{Ti.UI.Window.extendSafeArea}} on older Android OS versions to support this as well.\r\n\r\nNote that we currently support extending a toolbar's background under the top status bar in a similar fashion. The idea is we would leverage the same feature, but apply it to the root content view of the activity.\r\nhttps://github.com/appcelerator/titanium_mobile/pull/9524\r\n", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-09-26T03:08:12.000+0000", "updated": "2018-09-26T03:10:00.000+0000" }, { "id": "442738", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (master): https://github.com/appcelerator/titanium_mobile/pull/10383", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-10-18T03:32:10.000+0000", "updated": "2018-10-18T03:32:10.000+0000" }, { "id": "442940", "author": { "name": "jlongton", "key": "jlongton", "displayName": "Josh Longton", "active": true, "timeZone": "Europe/London" }, "body": "*FR Passed*\r\n\r\nWaiting on Jenkins to merge", "updateAuthor": { "name": "jlongton", "key": "jlongton", "displayName": "Josh Longton", "active": true, "timeZone": "Europe/London" }, "created": "2018-10-25T14:05:00.000+0000", "updated": "2018-10-25T14:05:00.000+0000" }, { "id": "442969", "author": { "name": "kmahalingam", "key": "kmahalingam", "displayName": "Keerthi Mahalingam", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix on SDK 7.5.0.v20181025085349. Closing\r\n{code}\r\nOperating System\r\n Name = Mac OS X\r\n Version = 10.13.6\r\n Architecture = 64bit\r\nNode.js\r\n Node.js Version = 8.12.0\r\n npm Version = 6.4.1\r\nTitanium CLI\r\n CLI Version = 5.1.1\r\nStudio\t\t\t =5.1.2.201810080801\r\nTitanium SDK\r\n SDK Version = 7.5.0.v20181025085349\r\nDevice = Samsung s5 Android 6,pixel android 9 \r\nEmulator\t\t = Samsung galaxy s6 \r\n{code}", "updateAuthor": { "name": "kmahalingam", "key": "kmahalingam", "displayName": "Keerthi Mahalingam", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2018-10-25T22:51:45.000+0000", "updated": "2018-10-25T22:51:45.000+0000" }, { "id": "443799", "author": { "name": "fahad86", "key": "fahad86", "displayName": "Muhammad Ahmed Fahad", "active": true, "timeZone": "Asia/Shanghai" }, "body": "This change is causing a lot of crashes in Production: \r\n\r\n\r\n{code:java}\r\nName\t\r\njava.lang.NullPointerException\r\n\r\nReason\t\r\nUnable to destroy activity {xxxx.xxxx/xxxx.xxxxActivity}: java.lang.NullPointerException: Attempt to invoke virtual meth...\r\n\r\n\r\nCrashed Thread\r\n\r\n0\tjava.lang.RuntimeException: Unable to destroy activity {xxxx.xxxx/xxxx.xxxx.XxxxxActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void org.appcelerator.titanium.view.TiActivitySafeAreaMonitor.stop()' on a null object reference\r\n1\tat android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3835)\r\n2\tat android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3853)\r\n3\tat android.app.ActivityThread.-wrap5(ActivityThread.java)\r\n4\tat android.app.ActivityThread$H.handleMessage(ActivityThread.java:1398)\r\n5\tat android.os.Handler.dispatchMessage(Handler.java:102)\r\n6\tat android.os.Looper.loop(Looper.java:148)\r\n7\tat android.app.ActivityThread.main(ActivityThread.java:5421)\r\n8\tat java.lang.reflect.Method.invoke(Native Method)\r\n9\tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)\r\n10\tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)\r\n11\tCaused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void org.appcelerator.titanium.view.TiActivitySafeAreaMonitor.stop()' on a null object reference\r\n12\tat org.appcelerator.titanium.TiBaseActivity.onDestroy(TiBaseActivity.java:1682)\r\n13\tat org.appcelerator.titanium.TiLaunchActivity.onDestroy(TiLaunchActivity.java:472)\r\n14\tat org.appcelerator.titanium.TiRootActivity.onDestroy(TiRootActivity.java:217)\r\n15\tat android.app.Activity.performDestroy(Activity.java:6422)\r\n16\tat android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1142)\r\n17\tat android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3822)\r\n18\t... 9 more\r\n19\tjava.lang.NullPointerException: Attempt to invoke virtual method 'void org.appcelerator.titanium.view.TiActivitySafeAreaMonitor.stop()' on a null object reference\r\n20\tat org.appcelerator.titanium.TiBaseActivity.onDestroy(TiBaseActivity.java:1682)\r\n21\tat org.appcelerator.titanium.TiLaunchActivity.onDestroy(TiLaunchActivity.java:472)\r\n22\tat org.appcelerator.titanium.TiRootActivity.onDestroy(TiRootActivity.java:217)\r\n23\tat android.app.Activity.performDestroy(Activity.java:6422)\r\n24\tat android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1142)\r\n25\tat android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3822)\r\n26\tat android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3853)\r\n27\tat android.app.ActivityThread.-wrap5(ActivityThread.java)\r\n28\tat android.app.ActivityThread$H.handleMessage(ActivityThread.java:1398)\r\n29\tat android.os.Handler.dispatchMessage(Handler.java:102)\r\n30\tat android.os.Looper.loop(Looper.java:148)\r\n31\tat android.app.ActivityThread.main(ActivityThread.java:5421)\r\n32\tat java.lang.reflect.Method.invoke(Native Method)\r\n33\tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)\r\n34\tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)\r\n{code}\r\n", "updateAuthor": { "name": "fahad86", "key": "fahad86", "displayName": "Muhammad Ahmed Fahad", "active": true, "timeZone": "Asia/Shanghai" }, "created": "2018-11-21T03:09:26.000+0000", "updated": "2018-11-21T03:09:26.000+0000" }, { "id": "444366", "author": { "name": "fahad86", "key": "fahad86", "displayName": "Muhammad Ahmed Fahad", "active": true, "timeZone": "Asia/Shanghai" }, "body": "@Joshua Quick, can you please let me know if the issue mentioned in the above comment has been fixed?\r\n\r\nThis made me downgrade my SDK from 7.5.0 to 7.4.2 which made my our much more stable. The above issue is causing excessive crashes in 7.5.0.GA", "updateAuthor": { "name": "fahad86", "key": "fahad86", "displayName": "Muhammad Ahmed Fahad", "active": true, "timeZone": "Asia/Shanghai" }, "created": "2018-12-10T02:59:08.000+0000", "updated": "2018-12-10T02:59:08.000+0000" }, { "id": "444445", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~fahad86], this issue is being fixed in Titanium 7.5.1. Please see: [TIMOB-26632]\r\n\r\nWe've confirmed that this crash will happen if the app UI is backgrounded and you attempted to launch it via an intent such as URL scheme or notification.", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-12-10T23:20:35.000+0000", "updated": "2018-12-10T23:20:35.000+0000" } ], "maxResults": 14, "total": 14, "startAt": 0 } } }