Home | History | Annotate | Download | only in preview
      1 page.title= 
      2 page.image=images/cards/card-n-guide_2x.png
      3 meta.tags="preview", "testing"
      4 page.tags="preview", "developer preview"
      5 
      6 @jd:body
      7 
      8 <div id="qv-wrapper">
      9   <div id="qv">
     10     <h2>  </h2>
     11       <ol>
     12         <li><a href="#runtime-permissions"> </a></li>
     13         <li><a href="#doze-standby">     </a></li>
     14         <li><a href="#ids">    </a></li>
     15       </ol>
     16   </div>
     17 </div>
     18 
     19 <p>
     20   Android N         .
     21          API     .   <a href="{@docRoot}preview/api-overview.html">API </a> <a href="{@docRoot}preview/behavior-changes.html">  </a>  .
     22 
     23                      .
     24 
     25 
     26 </p>
     27 
     28 <p>
     29          ,     .         .           .
     30 
     31 
     32 </p>
     33 
     34 <ul>
     35   <li><a href="#runtime-permissions"></a>
     36   </li>
     37   <li><a href="#doze-standby">    </a>
     38   </li>
     39   <li><a href="#ids">    </a></li>
     40 </ul>
     41 
     42 <p>
     43                <a href="{@docRoot}preview/setup-sdk.html">Android N SDK </a> .
     44 
     45 
     46 </p>
     47 
     48 
     49 <h2 id="runtime-permissions"> </h2>
     50 
     51 <p>
     52    <a href="{@docRoot}preview/features/runtime-permissions.html"></a>         .
     53         ,       .
     54 
     55                                 .
     56         ,    .
     57            ,             .
     58 
     59 
     60 </p>
     61 
     62 <p class="caution">
     63            ,         .
     64          ,           .            .
     65 
     66 
     67 </p>
     68 
     69 
     70 <h3 id="permission-test-tips"> </h3>
     71 
     72 <p>
     73                 .
     74 
     75 </p>
     76 
     77 <ul>
     78   <li>      .</li>
     79   <li>         .</li>
     80   <li>/     .</li>
     81   <li>    {@code adb}  .
     82     <ul>
     83       <li>    .
     84         <pre>adb shell pm list permissions -d -g</pre>
     85       </li>
     86       <li>        .<br>
     87         <pre>adb shell pm [grant|revoke] &lt;permission.name&gt; ...</pre>
     88       </li>
     89     </ul>
     90   </li>
     91   <li>     .</li>
     92 </ul>
     93 
     94 <h3 id="permission-test-strategy"> </h3>
     95 
     96 <p>
     97          ,      .
     98               .
     99        ,          .
    100 
    101 
    102 </p>
    103 
    104 <p>
    105          ,         .
    106              .
    107         .    {@code targetSdkVersion}   .
    108    <a href="{@docRoot}preview/setup-sdk.html#">Android N SDK </a> .
    109 
    110 
    111 </p>
    112 
    113 <p>
    114               .
    115      ,        ,          .
    116 
    117 
    118 </p>
    119 
    120 <p>
    121     ,        <a href="{@docRoot}preview/features/runtime-permissions.html"></a>     .
    122 
    123 
    124 </p>
    125 
    126 
    127 <h2 id="doze-standby">     </h2>
    128 
    129 <p>
    130                              .
    131            ,    ,   ,         .
    132 
    133                  .
    134 
    135 
    136 </p>
    137 
    138 <h4 id="doze">   </h4>
    139 
    140 <p>   :</p>
    141 
    142 <ol>
    143 <li>Android N        .</li>
    144 <li>     .</li>
    145 <li>      .</li>
    146 <li>        .
    147 
    148 <pre>
    149 $ adb shell dumpsys battery unplug
    150 $ adb shell dumpsys deviceidle step
    151 $ adb shell dumpsys deviceidle -h
    152 </pre>
    153 
    154   </li>
    155   <li>      .         .
    156 </li>
    157 </ol>
    158 
    159 
    160 <h4 id="standby">    </h4>
    161 
    162 <p>    :</p>
    163 
    164 <ol>
    165   <li>Android N        .</li>
    166   <li>     .</li>
    167   <li>      .</li>
    168   <li>        .
    169 
    170 <pre>
    171 $ adb shell am broadcast -a android.os.action.DISCHARGING
    172 $ adb shell am set-idle &lt;packageName&gt; true
    173 </pre>
    174 
    175   </li>
    176   <li>        .
    177     <pre>$ adb shell am set-idle &lt;packageName&gt; false</pre>
    178   </li>
    179   <li>       .      .
    180  ,          .
    181 </li>
    182 </ol>
    183 
    184 <h2 id="ids">     </h2>
    185 
    186 <p>       (: Google Cloud Messaging  ID)  ,         .   <a href="{@docRoot}preview/backup/index.html">  </a>  .
    187 
    188 
    189 
    190  </p>
    191