Home
last modified time | relevance | path

Searched refs:mCursor (Results 1 – 25 of 58) sorted by relevance

123

/packages/apps/Browser/src/com/android/browser/
DSuggestionsAdapter.java394 Cursor mCursor; field in SuggestionsAdapter.CursorSource
397 return mCursor.moveToNext(); in moveToNext()
405 return (mCursor != null) ? mCursor.getCount() : 0; in getCount()
409 if (mCursor != null) { in close()
410 mCursor.close(); in close()
422 if ((mCursor != null) && (!mCursor.isAfterLast())) { in getItem()
423 String title = mCursor.getString(1); in getItem()
424 String url = mCursor.getString(2); in getItem()
425 boolean isBookmark = (mCursor.getInt(3) == 1); in getItem()
435 if (mCursor != null) { in runQuery()
[all …]
DDateSortedExpandableListAdapter.java41 private Cursor mCursor; field in DateSortedExpandableListAdapter
84 if (mCursor.moveToFirst() && mCursor.getCount() > 0) { in buildMap()
85 while (!mCursor.isAfterLast()) { in buildMap()
93 array[index] = mCursor.getCount() in buildMap()
94 - mCursor.getPosition(); in buildMap()
100 mCursor.moveToNext(); in buildMap()
116 return mCursor.getBlob(cursorIndex); in getBlob()
133 return mCursor.getInt(cursorIndex); in getInt()
142 return mCursor.getLong(cursorIndex); in getLong()
155 return mCursor.getString(cursorIndex); in getString()
[all …]
DDownloadTouchIcon.java42 private Cursor mCursor; field in DownloadTouchIcon
95 mCursor = Bookmarks.queryCombinedForUrl(mContentResolver, in doInBackground()
99 boolean inDatabase = mCursor != null && mCursor.getCount() > 0; in doInBackground()
138 if (mCursor != null) { in doInBackground()
139 mCursor.close(); in doInBackground()
151 if (mCursor != null) { in onCancelled()
152 mCursor.close(); in onCancelled()
163 if (icon == null || mCursor == null || isCancelled()) { in storeIcon()
167 if (mCursor.moveToFirst()) { in storeIcon()
175 values.put(Images.URL, mCursor.getString(0)); in storeIcon()
[all …]
/packages/apps/Bluetooth/src/com/android/bluetooth/pbap/
DBluetoothPbapCallLogComposer.java80 private Cursor mCursor; field in BluetoothPbapCallLogComposer
101 mCursor = mContentResolver.query( in init()
104 if (mCursor == null) { in init()
109 if (mCursor.getCount() == 0 || !mCursor.moveToFirst()) { in init()
111 mCursor.close(); in init()
116 mCursor = null; in init()
125 if (mCursor == null || mCursor.isAfterLast()) { in createOneEntry()
132 mCursor.moveToNext(); in createOneEntry()
141 String name = mCursor.getString(CALLER_NAME_COLUMN_INDEX); in createOneCallLogEntryInternal()
142 String number = mCursor.getString(NUMBER_COLUMN_INDEX); in createOneCallLogEntryInternal()
[all …]
/packages/inputmethods/OpenWnn/src/jp/co/omronsoft/openwnn/
DComposingText.java63 protected int[] mCursor; field in ComposingText
70 mCursor = new int[MAX_LAYER]; in ComposingText()
73 mCursor[i] = 0; in ComposingText()
83 Log.d("OpenWnn", " cur = " + mCursor[i]); in debugout()
266 int cursor = mCursor[layer]; in insertStrSegment()
280 mStringLayer[layer1].add(mCursor[layer1], str); in insertStrSegment()
281 mCursor[layer1]++; in insertStrSegment()
284 int pos = mCursor[i-1] - 1; in insertStrSegment()
287 strLayer.add(mCursor[i], tmp); in insertStrSegment()
288 mCursor[i]++; in insertStrSegment()
[all …]
/packages/apps/Music/src/com/android/music/
DMediaPlaybackService.java121 private Cursor mCursor; field in MediaPlaybackService
202 if (mCursor != null) {
203 mCursor.close();
204 mCursor = null;
207 mCursor = getCursorForId(mPlayList[mPlayPos]);
390 if (mCursor != null) { in onDestroy()
391 mCursor.close(); in onDestroy()
392 mCursor = null; in onDestroy()
869 mCursor.close(); in addToPlayList()
870 mCursor = null; in addToPlayList()
[all …]
DSortCursor.java31 private Cursor mCursor; // updated in onMove field in SortCursor
72 mCursor = null; in SortCursor()
78 if (mCursor == null || current.compareToIgnoreCase(smallest) < 0) { in SortCursor()
80 mCursor = mCursors[j]; in SortCursor()
121 mCursor = mCursors[which]; in onMove()
122 if (mCursor == null) { in onMove()
126 mCursor.moveToPosition(mCurRowNumCache[cache_entry][which]); in onMove()
131 mCursor = null; in onMove()
172 mCursor = mCursors[smallestIdx]; in onMove()
187 return mCursor.getString(column); in getString()
[all …]
DMediaPickerActivity.java71 if (mCursor != null) { in onDestroy()
72 mCursor.close(); in onDestroy()
81 if (null == mCursor || 0 == mCursor.getCount()) { in init()
88 mCursor, in init()
98 mCursor.moveToPosition(position); in onListItemClick()
99 String type = mCursor.getString(mCursor.getColumnIndexOrThrow( in onListItemClick()
109 mediaId = mCursor.getLong(mCursor.getColumnIndexOrThrow( in onListItemClick()
113 mediaId = mCursor.getLong(mCursor.getColumnIndexOrThrow( in onListItemClick()
168 mCursor = null; in MakeCursor()
210 mCursor = null; in MakeCursor()
[all …]
/packages/apps/Contacts/src/com/android/contacts/group/
DGroupBrowseListAdapter.java45 private Cursor mCursor; field in GroupBrowseListAdapter
57 mCursor = cursor; in setCursor()
71 if (mSelectedGroupUri == null || mCursor == null || mCursor.getCount() == 0) { in getSelectedGroupPosition()
76 mCursor.moveToPosition(-1); in getSelectedGroupPosition()
77 while (mCursor.moveToNext()) { in getSelectedGroupPosition()
78 long groupId = mCursor.getLong(GroupListLoader.GROUP_ID); in getSelectedGroupPosition()
106 return (mCursor == null || mCursor.isClosed()) ? 0 : mCursor.getCount(); in getCount()
116 if (mCursor == null || mCursor.isClosed() || !mCursor.moveToPosition(position)) { in getItem()
119 String accountName = mCursor.getString(GroupListLoader.ACCOUNT_NAME); in getItem()
120 String accountType = mCursor.getString(GroupListLoader.ACCOUNT_TYPE); in getItem()
[all …]
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/
DSuggestionCursorWrapper.java28 private final SuggestionCursor mCursor; field in SuggestionCursorWrapper
32 mCursor = cursor; in SuggestionCursorWrapper()
36 if (mCursor != null) { in close()
37 mCursor.close(); in close()
42 return mCursor == null ? 0 : mCursor.getCount(); in getCount()
46 return mCursor == null ? 0 : mCursor.getPosition(); in getPosition()
50 if (mCursor != null) { in moveTo()
51 mCursor.moveTo(pos); in moveTo()
56 if (mCursor != null) { in moveToNext()
57 return mCursor.moveToNext(); in moveToNext()
[all …]
DCursorBackedSuggestionCursor.java37 protected final Cursor mCursor; field in CursorBackedSuggestionCursor
67 mCursor = cursor; in CursorBackedSuggestionCursor()
93 if (mCursor != null) { in close()
95 mCursor.close(); in close()
114 if (mCursor == null) return 0; in getCount()
116 return mCursor.getCount(); in getCount()
129 if (!mCursor.moveToPosition(pos)) { in moveTo()
143 return mCursor.moveToNext(); in moveToNext()
156 return mCursor.getPosition(); in getPosition()
247 if (mCursor == null) return -1; in getColumnIndex()
[all …]
/packages/apps/Messaging/src/com/android/messaging/ui/
DCursorRecyclerAdapter.java51 protected Cursor mCursor; field in CursorRecyclerAdapter
121 mCursor = c; in init()
148 return mCursor; in getCursor()
153 if (mDataValid && mCursor != null) { in getItemCount()
154 return mCursor.getCount(); in getItemCount()
164 if (mDataValid && mCursor != null) { in getItem()
165 mCursor.moveToPosition(position); in getItem()
166 return mCursor; in getItem()
177 if (mDataValid && mCursor != null) { in getItemId()
178 if (mCursor.moveToPosition(position)) { in getItemId()
[all …]
/packages/apps/Settings/src/com/android/settings/dashboard/
DSearchResultsSummary.java181 final Cursor cursor = mResultsAdapter.mCursor; in onCreateView()
234 final Cursor cursor = mSuggestionsAdapter.mCursor; in onCreateView()
415 private Cursor mCursor; field in SearchResultsSummary.SuggestionsAdapter
426 if (newCursor == mCursor) { in swapCursor()
429 Cursor oldCursor = mCursor; in swapCursor()
430 mCursor = newCursor; in swapCursor()
443 if (!mDataValid || mCursor == null || mCursor.isClosed()) return 0; in getCount()
444 return mCursor.getCount(); in getCount()
449 if (mDataValid && mCursor.moveToPosition(position)) { in getItem()
450 final String query = mCursor.getString(COLUMN_SUGGESTION_QUERY); in getItem()
[all …]
/packages/apps/Dialer/tests/src/com/android/dialer/calllog/
DCallLogFragmentTest.java90 private MatrixCursor mCursor; field in CallLogFragmentTest
131 mCursor = new MatrixCursor(CallLogQuery._PROJECTION); in setUp()
136 mAdapter.changeCursor(mCursor); in setUp()
154 mCursor.moveToFirst(); in testCallViewIsNotVisibleForPrivateAndUnknownNumbers()
156 int startOfSecondBatch = mCursor.getPosition(); in testCallViewIsNotVisibleForPrivateAndUnknownNumbers()
166 mCursor.move(startOfSecondBatch); in testCallViewIsNotVisibleForPrivateAndUnknownNumbers()
175 mCursor.moveToFirst(); in testCallAndGroupviewHolder_GroupView()
186 mCursor.moveToFirst(); in testCallAndGroupviewHolder_StandAloneView()
195 mCursor.moveToFirst(); in testCallAndGroupviewHolder_ChildView()
204 mCursor.moveToFirst(); in testBindView_NumberOnlyNoCache()
[all …]
DCallLogGroupBuilderTest.java43 private MatrixCursor mCursor; field in CallLogGroupBuilderTest
55 mCursor = null; in tearDown()
62 mBuilder.addGroups(mCursor); in testAddGroups_NoCalls()
68 mBuilder.addGroups(mCursor); in testAddGroups_OneCall()
75 mBuilder.addGroups(mCursor); in testAddGroups_TwoCallsNotMatching()
83 mBuilder.addGroups(mCursor); in testAddGroups_ThreeCallsMatching()
92 mBuilder.addGroups(mCursor); in testAddGroups_MatchingIncomingAndOutgoing()
151 mBuilder.addGroups(mCursor); in testAddGroups_Mixed()
216 mCursor = new MatrixCursor(CallLogQuery._PROJECTION); in createCursor()
229 mBuilder.addGroups(mCursor); in assertCallsAreGrouped()
[all …]
DGroupingListAdapterTests.java49 private MatrixCursor mCursor; field in GroupingListAdapterTests
97 mCursor = new MatrixCursor(PROJECTION); in buildCursor()
100 mCursor.addRow(new Object[]{mNextId, number}); in buildCursor()
107 mAdapter.changeCursor(mCursor); in testGroupingWithoutGroups()
117 mAdapter.changeCursor(mCursor); in testGroupingWithCollapsedGroupAtTheBeginning()
126 mAdapter.changeCursor(mCursor); in testGroupingWithExpandedGroupAtTheBeginning()
138 mAdapter.changeCursor(mCursor); in testGroupingWithExpandCollapseCycleAtTheBeginning()
149 mAdapter.changeCursor(mCursor); in testGroupingWithCollapsedGroupInTheMiddle()
159 mAdapter.changeCursor(mCursor); in testGroupingWithExpandedGroupInTheMiddle()
173 mAdapter.changeCursor(mCursor); in testGroupingWithCollapsedGroupAtTheEnd()
[all …]
DCallLogAdapterTest.java47 private MatrixCursor mCursor; field in CallLogAdapterTest
73 mCursor = new MatrixCursor(CallLogQuery._PROJECTION); in setUp()
74 mCursor.moveToFirst(); in setUp()
84 mCursor = null; in tearDown()
90 mCursor.addRow(createCallLogEntry()); in testBindView_NoCallLogCacheNorMemoryCache_EnqueueRequest()
93 mAdapter.changeCursor(mCursor); in testBindView_NoCallLogCacheNorMemoryCache_EnqueueRequest()
109 mCursor.addRow(createCallLogEntryWithCachedValues()); in testBindView_CallLogCacheButNoMemoryCache_EnqueueRequest()
112 mAdapter.changeCursor(mCursor); in testBindView_CallLogCacheButNoMemoryCache_EnqueueRequest()
127 mCursor.addRow(createCallLogEntry()); in testBindView_NoCallLogButMemoryCache_EnqueueRequest()
131 mAdapter.changeCursor(mCursor); in testBindView_NoCallLogButMemoryCache_EnqueueRequest()
[all …]
/packages/apps/Calendar/src/com/android/calendar/alerts/
DAlertActivity.java91 private Cursor mCursor; field in AlertActivity
103 if (mCursor == null) { in dismissFiredAlarms()
107 if (mCursor.isClosed()) { in dismissFiredAlarms()
111 if (!mCursor.moveToFirst()) { in dismissFiredAlarms()
118 long eventId = mCursor.getLong(INDEX_EVENT_ID); in dismissFiredAlarms()
119 long eventStart = mCursor.getLong(INDEX_BEGIN); in dismissFiredAlarms()
121 } while (mCursor.moveToNext()); in dismissFiredAlarms()
157 mCursor = cursor; in onQueryComplete()
234 if (mCursor == null) { in onResume()
239 if (!mCursor.requery()) { in onResume()
[all …]
/packages/apps/Messaging/tests/src/com/android/messaging/ui/conversationlist/
DConversationListItemViewTest.java46 private FakeCursor mCursor; field in ConversationListItemViewTest
55 mCursor = TestDataFactory.getConversationListCursor(); in setUp()
140 mCursor.moveToPosition(messageIndex); in testBindUnread()
141 assertFalse(isRead(mCursor, messageIndex)); in testBindUnread()
142 view.bind(mCursor, mockHost); in testBindUnread()
143 verifyContent(view, mCursor, messageIndex); in testBindUnread()
150 mCursor.moveToPosition(messageIndex); in testBindRead()
151 assertTrue(isRead(mCursor, messageIndex)); in testBindRead()
152 view.bind(mCursor, mockHost); in testBindRead()
153 verifyContent(view, mCursor, messageIndex); in testBindRead()
[all …]
/packages/providers/ContactsProvider/src/com/android/providers/contacts/
DReorderingCursorWrapper.java26 private final Cursor mCursor; field in ReorderingCursorWrapper
41 mCursor = cursor; in ReorderingCursorWrapper()
48 mCursor.close(); in close()
53 return mCursor.moveToPosition(mPositionMap[newPosition]); in onMove()
58 return mCursor.getColumnNames(); in getColumnNames()
63 return mCursor.getCount(); in getCount()
68 return mCursor.getDouble(column); in getDouble()
73 return mCursor.getFloat(column); in getFloat()
78 return mCursor.getInt(column); in getInt()
83 return mCursor.getLong(column); in getLong()
[all …]
/packages/apps/Settings/src/com/android/settings/
DApnEditor.java94 private Cursor mCursor; field in ApnEditor
236 mCursor = managedQuery(mUri, sProjection, null, null); in onCreate()
237 mCursor.moveToFirst(); in onCreate()
267 mName.setText(mCursor.getString(NAME_INDEX)); in fillUi()
268 mApn.setText(mCursor.getString(APN_INDEX)); in fillUi()
269 mProxy.setText(mCursor.getString(PROXY_INDEX)); in fillUi()
270 mPort.setText(mCursor.getString(PORT_INDEX)); in fillUi()
271 mUser.setText(mCursor.getString(USER_INDEX)); in fillUi()
272 mServer.setText(mCursor.getString(SERVER_INDEX)); in fillUi()
273 mPassword.setText(mCursor.getString(PASSWORD_INDEX)); in fillUi()
[all …]
DUserDictionarySettings.java70 private Cursor mCursor; field in UserDictionarySettings
109 mCursor = createCursor(locale); in onActivityCreated()
150 R.layout.user_dictionary_item, mCursor, in createAdapter()
202 if (null == mCursor) return null; in getWord()
203 mCursor.moveToPosition(position); in getWord()
205 if (mCursor.isAfterLast()) return null; in getWord()
207 return mCursor.getString( in getWord()
208 mCursor.getColumnIndexOrThrow(UserDictionary.Words.WORD)); in getWord()
212 if (null == mCursor) return null; in getShortcut()
213 mCursor.moveToPosition(position); in getShortcut()
[all …]
/packages/apps/Dialer/src/com/android/dialer/calllog/
DGroupingListAdapter.java65 private Cursor mCursor; field in GroupingListAdapter
142 if (cursor == mCursor) { in changeCursor()
146 if (mCursor != null) { in changeCursor()
147 mCursor.unregisterContentObserver(mChangeObserver); in changeCursor()
148 mCursor.unregisterDataSetObserver(mDataSetObserver); in changeCursor()
149 mCursor.close(); in changeCursor()
151 mCursor = cursor; in changeCursor()
165 return mCursor; in getCursor()
176 if (mCursor == null) { in findGroups()
180 addGroups(mCursor); in findGroups()
[all …]
/packages/apps/FMRadio/src/com/android/fmradio/
DFmFavoriteActivity.java267 private Cursor mCursor; field in FmFavoriteActivity.MyFavoriteAdapter
276 if (null != mCursor) { in swipResult()
277 mCursor.close(); in swipResult()
279 mCursor = cursor; in swipResult()
285 if (null != mCursor) { in getCount()
286 return mCursor.getCount(); in getCount()
322 if (mCursor != null && mCursor.moveToFirst()) { in getView()
323 mCursor.moveToPosition(position); in getView()
324 final int stationFreq = mCursor.getInt(mCursor in getView()
326 String name = mCursor.getString(mCursor in getView()
[all …]
/packages/apps/Messaging/src/com/android/messaging/widget/
DBaseWidgetFactory.java59 protected Cursor mCursor; field in BaseWidgetFactory
90 if (mCursor != null && !mCursor.isClosed()) { in onDestroy()
91 mCursor.close(); in onDestroy()
92 mCursor = null; in onDestroy()
103 if (mCursor != null) { in onDataSetChanged()
104 mCursor.close(); in onDataSetChanged()
105 mCursor = null; in onDataSetChanged()
109 mCursor = doQuery(); in onDataSetChanged()
127 if (mCursor == null) { in getCount()
137 mShouldShowViewMore = count < mCursor.getCount(); in getCount()
[all …]

123