Fixing wronk rowID check.

Since screenId is changed to primary key, the rowId can now be 0 (earlier
it was auto-increment and never 0)

Bug: 19566734
Change-Id: Icf0e4294a581039101df1ad1756fdb6e581c4cba
This commit is contained in:
Sunny Goyal
2015-03-02 14:24:21 -08:00
parent 633325c4c2
commit e72f3d53f8

View File

@@ -153,7 +153,7 @@ public class LauncherProvider extends ContentProvider {
SQLiteDatabase db = mOpenHelper.getWritableDatabase();
addModifiedTime(initialValues);
final long rowId = dbInsertAndCheck(mOpenHelper, db, args.table, null, initialValues);
if (rowId <= 0) return null;
if (rowId < 0) return null;
uri = ContentUris.withAppendedId(uri, rowId);
sendNotify(uri);