{"id":14431,"date":"2024-08-22T16:45:28","date_gmt":"2024-08-22T08:45:28","guid":{"rendered":"http:\/\/xinyiworld.top\/wordpress_it\/?p=14431"},"modified":"2024-08-22T18:06:14","modified_gmt":"2024-08-22T10:06:14","slug":"binder-java","status":"publish","type":"post","link":"http:\/\/xinyiworld.top\/wordpress_it\/?p=14431","title":{"rendered":"Binder.java"},"content":{"rendered":"<p>\u6e90\u7801\u4f4d\u7f6e\uff1a<code>frameworks\/base\/core\/java\/android\/os\/Binder.java<\/code><\/p>\n<h1>\u65b9\u6cd5<\/h1>\n<ul>\n<li>allowBlocking\n<pre><code class=\"language-java\">198     \/**\n199      * Allow blocking calls on the given interface, overriding the requested\n200      * value of {@link #setWarnOnBlocking(boolean)}.\n201      * &lt;p&gt;\n202      * This should only be rarely called when you are &lt;em&gt;absolutely sure&lt;\/em&gt;\n203      * the remote interface is a built-in system component that can never be\n204      * upgraded. In particular, this &lt;em&gt;must never&lt;\/em&gt; be called for\n205      * interfaces hosted by package that could be upgraded or replaced,\n206      * otherwise you risk system instability if that remote interface wedges.\n207      *\n208      * @hide\n209      *\/\n210     public static IBinder allowBlocking(IBinder binder) {\n211         try {\n212             if (binder instanceof BinderProxy) {\n213                 ((BinderProxy) binder).mWarnOnBlocking = false;\n214             } else if (binder != null &amp;&amp; binder.getInterfaceDescriptor() != null\n215                     &amp;&amp; binder.queryLocalInterface(binder.getInterfaceDescriptor()) == null) {\n216                 Log.w(TAG, &quot;Unable to allow blocking on interface &quot; + binder);\n217             }\n218         } catch (RemoteException ignored) {\n219         }\n220         return binder;\n221     }<\/code><\/pre>\n<\/li>\n<\/ul>\n<button class=\"simplefavorite-button\" data-postid=\"14431\" data-siteid=\"1\" data-groupid=\"1\" data-favoritecount=\"0\" style=\"\">\u6536\u85cf <i class=\"sf-icon-star-empty\"><\/i><\/button>","protected":false},"excerpt":{"rendered":"<p>\u6e90\u7801\u4f4d\u7f6e\uff1aframeworks\/base\/core\/java\/android\/os\/Binder.j [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1101],"tags":[],"_links":{"self":[{"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/posts\/14431"}],"collection":[{"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=14431"}],"version-history":[{"count":2,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/posts\/14431\/revisions"}],"predecessor-version":[{"id":14433,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/posts\/14431\/revisions\/14433"}],"wp:attachment":[{"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=14431"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=14431"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=14431"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}