Potential NPE in SQLiteConnection

Change-Id: I4d768bda5ea2fccb4a7c6ce7a5f074bf41563eac
Signed-off-by: Sylvain Becuwe <sylvain.becuwe@gmail.com>
Fix bugs regarding IllegalStateException during moving position in cursorwindow.

"startPos + addedRows < requiredPos" could miss a row in boundary position.
Because of the fluctuating row size, "startPos + addedRows < requiredPos" expression could miss a row in boundary position.
For example, simply speaking,
if window capacity = 120 and requiredPos = 120,
"fillWindow" needs to be newly called and "starPos" is 80 for the window.
Unfortunately 120th row is bigger than the rest size of the window,
the row for requiredPos is not in the window.
Then, startPos has to be newly set and the 120th row has to be included in the window.
But by the expression above "startPos + addedRows < requiredPos",
the row for requiredPos is regarded as included in the window.
In that case, by "mCurrentRowID = Long.valueOf(getLong(mRowIdColumnIndex));" statment in AbstractCursor,
IllegalStateException is thrown.

This patch contains modification of the expression as "startPos + addedRows <= requiredPos".

Change-Id: Iaee75241e495949b0a624b836843da18d0bcb98d
Function uri.getAuthority is called twice. Minor doc corrections.

Function uri.getAuthority was called twice in methods acquireProvider
and acquireExistingProvider was called twice although a parameter
representing the value had existed. The second call to the function is
changed to the parameter. The parameter's modifier changed to final.
Minor corrections in function descriptions in the file.

Signed-off-by: Yury Zhauniarovich <y.zhalnerovich@gmail.com>
Change-Id: Id003aa38c17d644357873c41a8f5ec455e46a4b7
Change default intent

Older JB releases have a bug handling persistence invocation. One work
around right now is to have the newer release (with persistence)
use  a lower intent value to allow older release to operate in group
owner mode.

Change-Id: I7ffb66081a352929a6f421e5d6141f592be7d472
Fix unexpected rotation change when re-enabling auto-rotate

getProposedRotation() method returns old value when re-enabling
auto-rotate option. So you can see unexpected rotation change
with the following steps.

settings -> display -> enable auto-rotate
-> rotate device to landscape -> disable auto-rotate
-> rotate device to portrait -> enable auto-rotate

This patch makes mSensorEventListener reset before it is registered again.

Bug: 7964531

Change-Id: I6a8d287bbd9809ef31de67c54efb885e9a4fd76f
Signed-off-by: Sangkyu Lee <sk82.lee@lge.com>