An earlier refactoring to write a test led to the same
file being used for incoming notifications, which meant
the older notifications were lost.
Also fixes some mostly innocuous errors seen in the log when
looking for the root cause of this problem
-USER_ALL notifications weren't being written
-AtomicFile should be closed
-Files cleaned up because device has remained on beyond
timeout should be removed from tracking list
-Don't try to recreate a folder that exists
Test: atest, and monitor created files and notis in history
over an hour or two
Fixes: 158300639
Change-Id: I3eb0e26863d1ab816a67cf509147674b90e2b6f4
We previously used the getPackage(packageName) API, which doesn't take
the userId into account; this could result in passing in the wrong uid
into fixupAppDir(), because fixupAppDir() validates the passed in uid
matches with the path.
Instead, use PackageManager.getPackageUidAsUser() to match the userId
that was passed in through the path.
Note that we don't care about paths which don't have a userId embedded,
since those are public volumes, for which we don't need this API anyway
(since public volumes don't have UID/GID etc.)
Bug: 157271022
Test: pm create-user aap ; log in to user, try selecting ringtones
Change-Id: Id8731cb18c16c4742d232048f9093fbd57323159
Add an option to go to standby when <Active Source> received from other device
For better configurability, a "ro.hdmi.cec.source.power_state_change_on_active_source_lost" system property is introduced which controls the new behaviour.
Bug: 156367087
Test: manually tested on a device
Change-Id: I7a068064bb5e867fd364d2b84c7066db06baec3e
Merged-In: I7a068064bb5e867fd364d2b84c7066db06baec3e
- The current state key was updated to the new state key after the diff
calculations and base setting. There are a few cases where we exit the
current loop which results in the current state key not getting updated.
- When we reset the base, we should not reset the current state. All
instances where hasCurrentState was set to false have been removed.
- I added a unit test for a value metric that is sliced by state and has
a condition.
Bug: 157661456
Test: m statsd_test && adb sync data && adb shell
data/nativetest/statsd_test/statsd_test32
Change-Id: Ib75bd9d08e6785f9e03b4b5984dbdaf86a7e1749
When tapping on a resize handle (but not actually have any movement), we
should not do any resize operation.
This also fixes an issue that used to check againt the relative x,y
coordinate fot hit test. It should be using the raw-x,y pointers
instead.
Bug: 158300205
Test: Tap on the corner, nothing happens
Change-Id: Ib01428664125734cd6e253c29902b0f5b080a72f
BubbleDataRepository tried to read the xml file before a write,
and the xml file is only created on write if it didn't exist,
which caused the FileNotFound exception.
Bug: 158231089
Test: BubblePersistentRepositoryTest
Change-Id: I7cd75b1d74be277df49f433338ad814ce50c87c1