AndroidDeviceNames icon indicating copy to clipboard operation
AndroidDeviceNames copied to clipboard

Small issue but critical to make select query

Open libliboom opened this issue 5 years ago • 1 comments

@jaredrummler There is issue on condition.

    else if (TextUtils.isEmpty(model)) {
      selection = COLUMN_MODEL + " LIKE ?";
      selectionArgs = new String[] { model };
    }

I think the condition will be edited like below

    else if (!TextUtils.isEmpty(model)) {
      selection = COLUMN_MODEL + " LIKE ?";
      selectionArgs = new String[] { model };
    }

I found this when I tried to fetch data with Build.MODEL first.

libliboom avatar Jun 23 '20 08:06 libliboom

yes, that's right and it has one more problem. the SQL query to search device uses " or "in where condition but the cause of we have some devices with the wired model name we should use " and ".

for example my device information is : codename = "h1" model = "LG-H860"

as you can see we have multiple devices with a combination of codename and models of mine. Screenshot from 2020-09-29 09-53-30

and in library's, we have the same but as you can see with ' or ' condition additional result appears: Screenshot from 2020-09-29 09-54-29

and with " and " condition I can get the correct answer. Screenshot from 2020-09-29 10-00-19

rexi1r avatar Sep 29 '20 06:09 rexi1r