Fixed
Status Update
Comments
ma...@mark43.com <ma...@mark43.com> #2
Comment has been deleted.
el...@google.com <el...@google.com> #3
1) Thank you for reporting this issue.We were not able to reproduce the issue with the information provided here.
Logs after follow mentioned steps in comment #1
===============================================
V/TAG: ViewModelFirst Created
2) Can you please provide the below requested information to better understand the issue:
Android build
Which Android build are you using? (e.g. KVT49L)
Device used
Which device did you use to reproduce this issue?
Please provide sample project or apk to reproduce the issue. Also mention the steps to be followed for reproducing the issue with the given sample project or apk.
Logs after follow mentioned steps in
===============================================
V/TAG: ViewModelFirst Created
2) Can you please provide the below requested information to better understand the issue:
Android build
Which Android build are you using? (e.g. KVT49L)
Device used
Which device did you use to reproduce this issue?
Please provide sample project or apk to reproduce the issue. Also mention the steps to be followed for reproducing the issue with the given sample project or apk.
el...@google.com <el...@google.com>
ap...@google.com <ap...@google.com> #4
pr...@google.com <pr...@google.com> #5
@3
I have this problem on all my devices. Here are some of them:
1. Samsung Galaxy S9 (SM-G960F)
Android: 8.0.0 build: R16NW.G960FXXU1BRE5
2. Pixel2
Android: 9 build: PPP3.180510.008
3. Galaxy A3 (SM-A320FL)
Android: 7.0 build: NRD90M.A320FLXXS2BRAA
The three attachments included are: The built apk, the source code and a video displaying the issue.
The video showcases the app running on Galaxy S9 (Phone 1) with the following order:
1. Set "Don't keep activities" to enabled.
2. Happy case when everything is correct and onCleared() is called.
3. Fault case when the home button is pushed and onCleared() __is not called__.
I have this problem on all my devices. Here are some of them:
1. Samsung Galaxy S9 (SM-G960F)
Android: 8.0.0 build: R16NW.G960FXXU1BRE5
2. Pixel2
Android: 9 build: PPP3.180510.008
3. Galaxy A3 (SM-A320FL)
Android: 7.0 build: NRD90M.A320FLXXS2BRAA
The three attachments included are: The built apk, the source code and a video displaying the issue.
The video showcases the app running on Galaxy S9 (Phone 1) with the following order:
1. Set "Don't keep activities" to enabled.
2. Happy case when everything is correct and onCleared() is called.
3. Fault case when the home button is pushed and onCleared() __is not called__.
Description
Version used:"2.6.0-rc01"
Devices/Android versions reproduced on: Not related
Kotlin implementation of DAO for @RawQuery function implementation with return type Double is initailised with 0 instead of 0.0 on null check.
@Entity
class Test(@PrimaryKey val d: Double, val l: Long) {
@Dao
interface TestDao {
@RawQuery
fun getLocation(query: SupportSQLiteQuery): Test
}
}
For this setup Room generates the following implementation:
private fun __entityCursorConverter_comTest(cursor: Cursor): Test {
val _entity: Test
val _cursorIndexOfD: Int = getColumnIndex(cursor, "d")
val _cursorIndexOfL: Int = getColumnIndex(cursor, "l")
val _tmpD: Double
if (_cursorIndexOfD == -1) {
_tmpD = 0 //Error: The integer literal does not conform to the expected type Double
} else {
_tmpD = cursor.getDouble(_cursorIndexOfD)
}
val _tmpL: Long
if (_cursorIndexOfL == -1) {
_tmpL = 0
} else {
_tmpL = cursor.getLong(_cursorIndexOfL)
}
_entity = Test(_tmpD,_tmpL)
return _entity
}