+ android-porting list On Wednesday, September 26, 2012 10:55:08 AM UTC+5:30, Umakanta Patro wrote: > > Please note, this patch has to be applied to > "packages/providers/MediaProvider" directory. > > On Tuesday, 25 September 2012 17:13:52 UTC+5:30, Umakanta Patro wrote: >> >> Dear All, >> >> Inline is the patch to fix the the delayed suspend issue caused by the >> "PARTIAL_WAKE_LOCK held by MediaScannerService" on Jellybean. >> >> For the system without RTC, in some scenarios the timestamp for >> each entry in the SQL database is not unique. So, Android throws an >> exception: >> "android.database.sqlite.SQLiteConstraintException: column time is >> not unique" >> >> So, the device waits for around 10 minutes on the fresh boot to go to >> suspend. >> >> This patch removes the check for uniqueness of each table entry. And thus >> allowing the device to go to suspend instantly on display time-out. >> >> Please review this patch. And provide us your valuable suggestions. >> >> Signed-off-by: satish <satish...@ti.com <javascript:>> >> Signed-off-by: Umakanta Patro <umakant...@ti.com <javascript:>> >> --- >> src/com/android/providers/media/MediaProvider.java | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/src/com/android/providers/media/MediaProvider.java >> b/src/com/android/providers/media/MediaProvider.java >> index bb21e80..b594970 100644 >> --- a/src/com/android/providers/media/MediaProvider.java >> +++ b/src/com/android/providers/media/MediaProvider.java >> @@ -1721,7 +1721,7 @@ public class MediaProvider extends ContentProvider { >> } >> >> if (fromVersion < 509) { >> - db.execSQL("CREATE TABLE IF NOT EXISTS log (time DATETIME >> PRIMARY KEY, message TEXT);"); >> + db.execSQL("CREATE TABLE IF NOT EXISTS log (time DATETIME, >> message TEXT);"); >> } >> sanityCheck(db, fromVersion); >> long elapsedSeconds = (SystemClock.currentTimeMicro() - >> startTime) / 1000000; >> -- >> 1.7.9.5 >> >>
-- unsubscribe: android-porting+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-porting