Loading services/people/java/com/android/server/people/data/MmsQueryHelper.java +29 −23 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.annotation.WorkerThread; import android.content.Context; import android.database.Cursor; import android.net.Uri; import android.os.Binder; import android.provider.Telephony.BaseMmsColumns; import android.provider.Telephony.Mms; import android.telephony.PhoneNumberUtils; Loading Loading @@ -71,6 +72,8 @@ class MmsQueryHelper { // NOTE: The field Mms.DATE is stored in seconds, not milliseconds. String[] selectionArgs = new String[] { Long.toString(sinceTime / MILLIS_PER_SECONDS) }; boolean hasResults = false; Binder.allowBlockingForCurrentThread(); try { try (Cursor cursor = mContext.getContentResolver().query( Mms.CONTENT_URI, projection, selection, selectionArgs, null)) { if (cursor == null) { Loading @@ -97,6 +100,9 @@ class MmsQueryHelper { } } } } finally { Binder.defaultBlockingForCurrentThread(); } return hasResults; } Loading services/people/java/com/android/server/people/data/SmsQueryHelper.java +33 −27 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.server.people.data; import android.annotation.WorkerThread; import android.content.Context; import android.database.Cursor; import android.os.Binder; import android.provider.Telephony.Sms; import android.provider.Telephony.TextBasedSmsColumns; import android.telephony.PhoneNumberUtils; Loading Loading @@ -65,6 +66,8 @@ class SmsQueryHelper { String selection = Sms.DATE + " > ?"; String[] selectionArgs = new String[] { Long.toString(sinceTime) }; boolean hasResults = false; Binder.allowBlockingForCurrentThread(); try { try (Cursor cursor = mContext.getContentResolver().query( Sms.CONTENT_URI, projection, selection, selectionArgs, null)) { if (cursor == null) { Loading Loading @@ -95,6 +98,9 @@ class SmsQueryHelper { } } } } finally { Binder.defaultBlockingForCurrentThread(); } return hasResults; } Loading Loading
services/people/java/com/android/server/people/data/MmsQueryHelper.java +29 −23 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.annotation.WorkerThread; import android.content.Context; import android.database.Cursor; import android.net.Uri; import android.os.Binder; import android.provider.Telephony.BaseMmsColumns; import android.provider.Telephony.Mms; import android.telephony.PhoneNumberUtils; Loading Loading @@ -71,6 +72,8 @@ class MmsQueryHelper { // NOTE: The field Mms.DATE is stored in seconds, not milliseconds. String[] selectionArgs = new String[] { Long.toString(sinceTime / MILLIS_PER_SECONDS) }; boolean hasResults = false; Binder.allowBlockingForCurrentThread(); try { try (Cursor cursor = mContext.getContentResolver().query( Mms.CONTENT_URI, projection, selection, selectionArgs, null)) { if (cursor == null) { Loading @@ -97,6 +100,9 @@ class MmsQueryHelper { } } } } finally { Binder.defaultBlockingForCurrentThread(); } return hasResults; } Loading
services/people/java/com/android/server/people/data/SmsQueryHelper.java +33 −27 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.server.people.data; import android.annotation.WorkerThread; import android.content.Context; import android.database.Cursor; import android.os.Binder; import android.provider.Telephony.Sms; import android.provider.Telephony.TextBasedSmsColumns; import android.telephony.PhoneNumberUtils; Loading Loading @@ -65,6 +66,8 @@ class SmsQueryHelper { String selection = Sms.DATE + " > ?"; String[] selectionArgs = new String[] { Long.toString(sinceTime) }; boolean hasResults = false; Binder.allowBlockingForCurrentThread(); try { try (Cursor cursor = mContext.getContentResolver().query( Sms.CONTENT_URI, projection, selection, selectionArgs, null)) { if (cursor == null) { Loading Loading @@ -95,6 +98,9 @@ class SmsQueryHelper { } } } } finally { Binder.defaultBlockingForCurrentThread(); } return hasResults; } Loading