Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small issue but critical to make select query #39

Open
libliboom opened this issue Jun 23, 2020 · 1 comment
Open

Small issue but critical to make select query #39

libliboom opened this issue Jun 23, 2020 · 1 comment

Comments

@libliboom
Copy link

@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 libliboom changed the title small issue but critical to make select query Small issue but critical to make select query Jun 23, 2020
@rexi1r
Copy link

rexi1r commented Sep 29, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants