Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-8517

App crash because of ContentResolver query returned null on lollipop device

    XMLWordPrintableJSON

    Details

      Description

      ContentResolver.query() can return null in devices running with lollipop.
      Its not handled in contacts plugin at ContactAccessorSdk5.java:186 for idCursor

      ---------------------------------------------------------------------------
      FATAL EXCEPTION: pool-1-thread-38
      E/AndroidRuntime(17921): Process: com.toshiba.uclient, PID: 17921
      E/AndroidRuntime(17921): java.lang.NullPointerException: Attempt to invoke interface method 'boolean android.database.Cursor.moveToNext()' on a null object reference
      E/AndroidRuntime(17921): at org.apache.cordova.contacts.ContactAccessorSdk5.search(ContactAccessorSdk5.java:186)
      E/AndroidRuntime(17921): at org.apache.cordova.contacts.ContactManager$1.run(ContactManager.java:93)
      E/AndroidRuntime(17921): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
      E/AndroidRuntime(17921): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
      E/AndroidRuntime(17921): at java.lang.Thread.run(Thread.java:818)

        Attachments

          Activity

            People

            • Assignee:
              vladimir.kotikov Vladimir Kotikov
              Reporter:
              manoj.kp Manoj Katari P
            • Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: