Don't duplicate sql string code as suggested by pserwylo
This commit is contained in:
		
							parent
							
								
									3db3a516eb
								
							
						
					
					
						commit
						11205dcf72
					
				| @ -522,19 +522,19 @@ public class AppProvider extends FDroidProvider { | ||||
|         boolean firstColumn = true; | ||||
|         for (final String column : columns) { | ||||
|             if (firstColumn) { | ||||
|                 selection.append("("); | ||||
|                 firstColumn = false; | ||||
|             } else { | ||||
|                 selection.append("OR ("); | ||||
|                 selection.append("OR "); | ||||
|             } | ||||
|             selection.append("("); | ||||
|             boolean firstKeyword = true; | ||||
|             for (final String keyword : keywords) { | ||||
|                 if (firstKeyword) { | ||||
|                     selection.append(column + " like ?"); | ||||
|                     firstKeyword = false; | ||||
|                 } else { | ||||
|                     selection.append(" OR " + column + " like ?"); | ||||
|                     selection.append(" OR "); | ||||
|                 } | ||||
|                 selection.append(column + " like ?"); | ||||
|                 selectionKeywords[iKeyword] = keyword; | ||||
|                 iKeyword++; | ||||
|             } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Daniel Martí
						Daniel Martí