If an app exits soon(<~5s) after making localStorage
modification, changes aren't committed. So, extend
TV's flush mechanisms on exit for wearable profiles
to commit storage changes. Fixes P200728-01131.
Change-Id: Icedbf7d90be6a4e2b461cdf9f78e7de2e357ef71
Signed-off-by: Surya Kumar <surya.kumar7@samsung.com>
}
flushData() {
console.log('WebApplication : FlushData');
- if (wrt.tv) {
+ if (wrt.tv)
wrt.tv.flushCookie();
+ if (wrt.tv ||
+ // P200728-01131: Unless flushStorageData is called StorageAreaImpl::CommitChanges()
+ // takes a lot of time leading to uncommited changes on exit on wearable
+ wrt.getPlatformType() === 'product_wearable' ||
+ wrt.getPlatformType() === 'wearable') {
this.windowList.forEach((window) => window.webContents.session.flushStorageData());
}
}