weex-bot commented on pull request #3246: URL: https://github.com/apache/incubator-weex/pull/3246#issuecomment-664150240
<!-- 4 failure: AndroidLint Result, <section class="s..., AndroidLint Result, <section class="s... 0 warning: DangerID: danger-id-androidlint; --> <table> <thead> <tr> <th width="50"></th> <th width="100%" data-danger-table="true">Fails</th> </tr> </thead> <tbody><tr> <td>:no_entry_sign:</td> <td>AndroidLint Result</td> </tr> <tr> <td>:no_entry_sign:</td> <td> <section class="section--center mdl-grid mdl-grid--no-spacing mdl-shadow--2dp" id="MissingPermissionCard" style="display: block;"> <div class="mdl-card mdl-cell mdl-cell--12-col"> <div class="mdl-card__title"> <h2 class="mdl-card__title-text">Missing Permissions</h2> </div> <div class="mdl-card__supporting-text"> <div class="issue"> <div class="warningslist"> <span class="location"><a href="../../src/main/java/org/apache/weex/WXEnvironment.java">../../src/main/java/org/apache/weex/WXEnvironment.java</a>:410</span>: <span class="message">Missing permissions required by TelephonyManager.getDeviceId: android.permission.READ_PRIVILEGED_PHONE_STATE</span><br /><pre class="errorlines"> <span class="lineno"> 407 </span> String ret = <span class="string">""</span>; <span class="lineno"> 408 </span> <span class="keyword">if</span>(sApplication != <span class="keyword">null</span>){ <span class="lineno"> 409 </span> <span class="keyword">try</span>{ <span class="caretline"><span class="lineno"> 410 </span> ret = <span class="error">((TelephonyManager) sApplication</span> </span> <span class="lineno"> 411 </span> .getSystemService(Context.TELEPHONY_SERVICE)).getDeviceId(); <span class="lineno"> 412 </span> }<span class="keyword">catch</span> (SecurityException | NullPointerException e){ <span class="lineno"> 413 </span> WXLogUtils.e(WXLogUtils.getStackTrace(e)); </pre> <span class="location"><a href="../../src/main/java/org/apache/weex/WXEnvironment.java">../../src/main/java/org/apache/weex/WXEnvironment.java</a>:410</span>: <span class="message">Missing permissions required by TelephonyManager.getDeviceId: android.permission.READ_PRIVILEGED_PHONE_STATE</span><br /><pre class="errorlines"> <span class="lineno"> 407 </span> String ret = <span class="string">""</span>; <span class="lineno"> 408 </span> <span class="keyword">if</span>(sApplication != <span class="keyword">null</span>){ <span class="lineno"> 409 </span> <span class="keyword">try</span>{ <span class="caretline"><span class="lineno"> 410 </span> ret = <span class="error">((TelephonyManager) sApplication</span> </span> <span class="lineno"> 411 </span> .getSystemService(Context.TELEPHONY_SERVICE)).getDeviceId(); <span class="lineno"> 412 </span> }<span class="keyword">catch</span> (SecurityException | NullPointerException e){ <span class="lineno"> 413 </span> WXLogUtils.e(WXLogUtils.getStackTrace(e)); </pre> </div> <div class="metadata"><div class="explanation" id="explanationMissingPermission" style="display: none;"> This check scans through your code and libraries and looks at the APIs being used, and checks this against the set of permissions required to access those APIs. If the code using those APIs is called at runtime, then the program will crash.<br/> <br/> Furthermore, for permissions that are revocable (with targetSdkVersion 23), client code must also be prepared to handle the calls throwing an exception if the user rejects the request for permission at runtime.<br/>Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.<br> To suppress this error, use the issue id "MissingPermission" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/> <br/></div> </div> </div> <div class="chips"> <span class="mdl-chip"> <span class="mdl-chip__text">MissingPermission</span> </span> <span class="mdl-chip"> <span class="mdl-chip__text">Correctness</span> </span> <span class="mdl-chip"> <span class="mdl-chip__text">Error</span> </span> <span class="mdl-chip"> <span class="mdl-chip__text">Priority 9/10</span> </span> </div> </div> <div class="mdl-card__actions mdl-card--border"> <button class="mdl-button mdl-js-button mdl-js-ripple-effect" id="explanationMissingPermissionLink" onclick="reveal('explanationMissingPermission');"> Explain</button><button class="mdl-button mdl-js-button mdl-js-ripple-effect" id="MissingPermissionCardLink" onclick="hideid('MissingPermissionCard');"> Dismiss</button> </div> </div> </td> </tr> <tr> <td>:no_entry_sign:</td> <td>AndroidLint Result</td> </tr> <tr> <td>:no_entry_sign:</td> <td> <section class="section--center mdl-grid mdl-grid--no-spacing mdl-shadow--2dp" id="MissingPermissionCard" style="display: block;"> <div class="mdl-card mdl-cell mdl-cell--12-col"> <div class="mdl-card__title"> <h2 class="mdl-card__title-text">Missing Permissions</h2> </div> <div class="mdl-card__supporting-text"> <div class="issue"> <div class="warningslist"> <span class="location"><a href="../../src/main/java/org/apache/weex/WXEnvironment.java">../../src/main/java/org/apache/weex/WXEnvironment.java</a>:410</span>: <span class="message">Missing permissions required by TelephonyManager.getDeviceId: android.permission.READ_PRIVILEGED_PHONE_STATE</span><br /><pre class="errorlines"> <span class="lineno"> 407 </span> String ret = <span class="string">""</span>; <span class="lineno"> 408 </span> <span class="keyword">if</span>(sApplication != <span class="keyword">null</span>){ <span class="lineno"> 409 </span> <span class="keyword">try</span>{ <span class="caretline"><span class="lineno"> 410 </span> ret = <span class="error">((TelephonyManager) sApplication</span> </span> <span class="lineno"> 411 </span> .getSystemService(Context.TELEPHONY_SERVICE)).getDeviceId(); <span class="lineno"> 412 </span> }<span class="keyword">catch</span> (SecurityException | NullPointerException e){ <span class="lineno"> 413 </span> WXLogUtils.e(WXLogUtils.getStackTrace(e)); </pre> <span class="location"><a href="../../src/main/java/org/apache/weex/WXEnvironment.java">../../src/main/java/org/apache/weex/WXEnvironment.java</a>:410</span>: <span class="message">Missing permissions required by TelephonyManager.getDeviceId: android.permission.READ_PRIVILEGED_PHONE_STATE</span><br /><pre class="errorlines"> <span class="lineno"> 407 </span> String ret = <span class="string">""</span>; <span class="lineno"> 408 </span> <span class="keyword">if</span>(sApplication != <span class="keyword">null</span>){ <span class="lineno"> 409 </span> <span class="keyword">try</span>{ <span class="caretline"><span class="lineno"> 410 </span> ret = <span class="error">((TelephonyManager) sApplication</span> </span> <span class="lineno"> 411 </span> .getSystemService(Context.TELEPHONY_SERVICE)).getDeviceId(); <span class="lineno"> 412 </span> }<span class="keyword">catch</span> (SecurityException | NullPointerException e){ <span class="lineno"> 413 </span> WXLogUtils.e(WXLogUtils.getStackTrace(e)); </pre> </div> <div class="metadata"><div class="explanation" id="explanationMissingPermission" style="display: none;"> This check scans through your code and libraries and looks at the APIs being used, and checks this against the set of permissions required to access those APIs. If the code using those APIs is called at runtime, then the program will crash.<br/> <br/> Furthermore, for permissions that are revocable (with targetSdkVersion 23), client code must also be prepared to handle the calls throwing an exception if the user rejects the request for permission at runtime.<br/>Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.<br> To suppress this error, use the issue id "MissingPermission" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/> <br/></div> </div> </div> <div class="chips"> <span class="mdl-chip"> <span class="mdl-chip__text">MissingPermission</span> </span> <span class="mdl-chip"> <span class="mdl-chip__text">Correctness</span> </span> <span class="mdl-chip"> <span class="mdl-chip__text">Error</span> </span> <span class="mdl-chip"> <span class="mdl-chip__text">Priority 9/10</span> </span> </div> </div> <div class="mdl-card__actions mdl-card--border"> <button class="mdl-button mdl-js-button mdl-js-ripple-effect" id="explanationMissingPermissionLink" onclick="reveal('explanationMissingPermission');"> Explain</button><button class="mdl-button mdl-js-button mdl-js-ripple-effect" id="MissingPermissionCardLink" onclick="hideid('MissingPermissionCard');"> Dismiss</button> </div> </div> </td> </tr> </tbody> </table> <p align="right"> Generated by :no_entry_sign: <a href="https://danger.systems/js">dangerJS</a> against 8c5d8489430a5c8ea0028e941ac5b7639a1867e2 </p> ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org