码迷,mamicode.com
首页 > 移动开发 > 详细

Android O 获取应用权限 Demo案例

时间:2018-07-13 15:17:48      阅读:384      评论:0      收藏:0      [点我收藏+]

标签:port   main   ash   通讯   tst   roi   sage   bubuko   call   

 

1. 通过 aapt 工具查看 APK权限

C:\Users\zh>adb pull /system/priv-app/Settings .
/system/priv-app/Settings/: 3 files pulled. 10.8 MB/s (48840608 bytes in 4.325s)

C:\Users\zh>aapt d permissions  C:\Users\zh\Settings\Settings.apk
package: com.android.settings
uses-permission: name=‘android.permission.REQUEST_NETWORK_SCORES‘
uses-permission: name=‘android.permission.WRITE_MEDIA_STORAGE‘
uses-permission: name=‘android.permission.WRITE_EXTERNAL_STORAGE‘
uses-permission: name=‘android.permission.READ_EXTERNAL_STORAGE‘
uses-permission: name=‘android.permission.WRITE_SETTINGS‘
uses-permission: name=‘android.permission.WRITE_SECURE_SETTINGS‘
uses-permission: name=‘android.permission.DEVICE_POWER‘
uses-permission: name=‘android.permission.CHANGE_CONFIGURATION‘
uses-permission: name=‘android.permission.MOUNT_UNMOUNT_FILESYSTEMS‘
uses-permission: name=‘android.permission.VIBRATE‘
uses-permission: name=‘android.permission.BLUETOOTH‘
uses-permission: name=‘android.permission.BLUETOOTH_ADMIN‘
uses-permission: name=‘android.permission.BLUETOOTH_PRIVILEGED‘
uses-permission: name=‘android.permission.NFC‘
uses-permission: name=‘android.permission.HARDWARE_TEST‘
uses-permission: name=‘android.permission.CALL_PHONE‘
uses-permission: name=‘android.permission.MODIFY_AUDIO_SETTINGS‘
uses-permission: name=‘android.permission.MASTER_CLEAR‘
uses-permission: name=‘com.google.android.googleapps.permission.GOOGLE_AUTH‘
uses-permission: name=‘android.permission.ACCESS_DOWNLOAD_MANAGER‘
uses-permission: name=‘android.permission.READ_CONTACTS‘
uses-permission: name=‘android.permission.WRITE_CONTACTS‘
uses-permission: name=‘android.permission.ACCESS_NETWORK_STATE‘
uses-permission: name=‘android.permission.ACCESS_WIMAX_STATE‘
uses-permission: name=‘android.permission.CHANGE_WIMAX_STATE‘
uses-permission: name=‘android.permission.ACCESS_WIFI_STATE‘
uses-permission: name=‘com.android.certinstaller.INSTALL_AS_USER‘
uses-permission: name=‘android.permission.CHANGE_WIFI_STATE‘
uses-permission: name=‘android.permission.TETHER_PRIVILEGED‘
uses-permission: name=‘android.permission.INTERNET‘
uses-permission: name=‘android.permission.CLEAR_APP_USER_DATA‘
uses-permission: name=‘android.permission.READ_PHONE_STATE‘
uses-permission: name=‘android.permission.MODIFY_PHONE_STATE‘
uses-permission: name=‘android.permission.ACCESS_COARSE_LOCATION‘
uses-permission: name=‘android.permission.WRITE_APN_SETTINGS‘
uses-permission: name=‘android.permission.ACCESS_CHECKIN_PROPERTIES‘
uses-permission: name=‘android.permission.READ_USER_DICTIONARY‘
uses-permission: name=‘android.permission.WRITE_USER_DICTIONARY‘
uses-permission: name=‘android.permission.FORCE_STOP_PACKAGES‘
uses-permission: name=‘android.permission.PACKAGE_USAGE_STATS‘
uses-permission: name=‘android.permission.BATTERY_STATS‘
uses-permission: name=‘com.android.launcher.permission.READ_SETTINGS‘
uses-permission: name=‘com.android.launcher.permission.WRITE_SETTINGS‘
uses-permission: name=‘android.permission.MOVE_PACKAGE‘
uses-permission: name=‘android.permission.USE_CREDENTIALS‘
uses-permission: name=‘android.permission.BACKUP‘
uses-permission: name=‘android.permission.READ_SYNC_STATS‘
uses-permission: name=‘android.permission.READ_SYNC_SETTINGS‘
uses-permission: name=‘android.permission.WRITE_SYNC_SETTINGS‘
uses-permission: name=‘android.permission.STATUS_BAR‘
uses-permission: name=‘android.permission.MANAGE_USB‘
uses-permission: name=‘android.permission.SET_POINTER_SPEED‘
uses-permission: name=‘android.permission.SET_KEYBOARD_LAYOUT‘
uses-permission: name=‘android.permission.INTERACT_ACROSS_USERS_FULL‘
uses-permission: name=‘android.permission.COPY_PROTECTED_DATA‘
uses-permission: name=‘android.permission.MANAGE_USERS‘
uses-permission: name=‘android.permission.MANAGE_PROFILE_AND_DEVICE_OWNERS‘
uses-permission: name=‘android.permission.READ_PROFILE‘
uses-permission: name=‘android.permission.CONFIGURE_WIFI_DISPLAY‘
uses-permission: name=‘android.permission.CONFIGURE_DISPLAY_COLOR_MODE‘
uses-permission: name=‘android.permission.SET_TIME‘
uses-permission: name=‘android.permission.ACCESS_NOTIFICATIONS‘
uses-permission: name=‘android.permission.REBOOT‘
uses-permission: name=‘android.permission.RECEIVE_BOOT_COMPLETED‘
uses-permission: name=‘android.permission.MANAGE_DEVICE_ADMINS‘
uses-permission: name=‘android.permission.READ_SEARCH_INDEXABLES‘
uses-permission: name=‘android.permission.OEM_UNLOCK_STATE‘
uses-permission: name=‘android.permission.MANAGE_USER_OEM_UNLOCK_STATE‘
uses-permission: name=‘android.permission.OVERRIDE_WIFI_CONFIG‘
uses-permission: name=‘android.permission.USE_FINGERPRINT‘
uses-permission: name=‘android.permission.MANAGE_FINGERPRINT‘
uses-permission: name=‘android.permission.USER_ACTIVITY‘
uses-permission: name=‘android.permission.CHANGE_APP_IDLE_STATE‘
uses-permission: name=‘android.permission.PEERS_MAC_ADDRESS‘
uses-permission: name=‘android.permission.MANAGE_NOTIFICATIONS‘
uses-permission: name=‘android.permission.DELETE_PACKAGES‘
uses-permission: name=‘android.permission.MANAGE_APP_OPS_RESTRICTIONS‘
uses-permission: name=‘android.permission.HIDE_NON_SYSTEM_OVERLAY_WINDOWS‘
uses-permission: name=‘android.permission.READ_PRINT_SERVICES‘
uses-permission: name=‘android.permission.NETWORK_SETTINGS‘

C:\Users\zh>

 

 

2. 通过代码获取权限

package com.remote.bangdemo;

import android.app.Activity;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.content.pm.PermissionGroupInfo;
import android.content.pm.PermissionInfo;
import android.os.Bundle;
import android.util.Log;

public class MainActivity extends Activity {
    String TAG = "MainActivityZZ";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        getUsesPermission("com.android.settings");
    }

    private void getUsesPermission(String packageName) {
        PackageManager packageManager = getPackageManager();
        PackageInfo packageInfo = null;
        try {
            packageInfo = packageManager.getPackageInfo(packageName, PackageManager.GET_PERMISSIONS);
        } catch (NameNotFoundException e) {
            e.printStackTrace();
        }
        if (packageInfo == null) {
            return;
        }

        // <permission> 标签声明自定义的权限
        PermissionInfo[] permissions = packageInfo.permissions;
        if (permissions != null) {
            for (PermissionInfo permissionInfo : permissions) {
                CharSequence label = permissionInfo.loadLabel(packageManager);
                CharSequence desc = permissionInfo.loadDescription(packageManager);
                Log.d(TAG, "permission label =" + label);
                Log.d(TAG, "permission desc =" + desc);
            }
        }

        // <uses-permission> 标签声明请求的权限
        String[] usesPermissionsArray = packageInfo.requestedPermissions;
        if (usesPermissionsArray != null) {
            for (String usesPermissionName : usesPermissionsArray) {
                Log.d(TAG, "<uses-permission> name =" + usesPermissionName);

                // 通过usesPermissionName获取该权限的详细信息
                PermissionInfo permissionInfo = null;
                try {
                    permissionInfo = packageManager.getPermissionInfo(usesPermissionName, 0);
                } catch (NameNotFoundException e) {
                    e.printStackTrace();
                }

                if (permissionInfo == null) {
                    continue;
                }

                // 获取该权限的标签信息,比如:完全的网络访问权限
                String label = permissionInfo.loadLabel(packageManager).toString();
                Log.d(TAG, "permission label =" + label);

                // 获取该权限的详细描述信息,比如:允许该应用创建网络套接字和使用自定义网络协议
                // 浏览器和其他某些应用提供了向互联网发送数据的途径,因此应用无需该权限即可向互联网发送数据.
                CharSequence desc = permissionInfo.loadDescription(packageManager);
                Log.d(TAG, "permission desc =" + desc);

                // // 获得该权限属于哪个权限组,如:网络通信
                if (permissionInfo.group != null) {
                    try {
                        PermissionGroupInfo permissionGroupInfo = packageManager.getPermissionGroupInfo(permissionInfo.group, 0);
                        CharSequence groupInfoLabel = permissionGroupInfo.loadLabel(packageManager);
                        Log.d(TAG, "permissionGroup name =" + permissionInfo.group);
                        Log.d(TAG, "permissionGroup label =" + groupInfoLabel);
                    } catch (NameNotFoundException e) {
                        e.printStackTrace();
                    }
                }
                Log.d(TAG, "===========================================");
            }
        }
    }
}

 

 

3.AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.remote.bangdemo"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="25"
        android:targetSdkVersion="25" />

    <permission
        android:name="com.example.carol.playground.RESTART"
        android:description="@string/permission_desc" />
    <permission android:name="com.example.carol.playground.SHOPPING" />

    <uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION" >
    </uses-permission>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" >
    </uses-permission>
    <uses-permission android:name="android.permission.RECEIVE_MMS" >
    </uses-permission>

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/transcutestyle" >
        <activity
            android:name=".MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>

 

 

打印log:

07-13 06:22:37.322 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.REQUEST_NETWORK_SCORES
07-13 06:22:37.323 17789 17789 D MainActivityZZ: permission label =android.permission.REQUEST_NETWORK_SCORES
07-13 06:22:37.323 17789 17789 D MainActivityZZ: permission desc =null
07-13 06:22:37.323 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.324 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.WRITE_MEDIA_STORAGE
07-13 06:22:37.324 17789 17789 D MainActivityZZ: permission label =android.permission.WRITE_MEDIA_STORAGE
07-13 06:22:37.324 17789 17789 D MainActivityZZ: permission desc =null
07-13 06:22:37.324 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.324 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.WRITE_EXTERNAL_STORAGE
07-13 06:22:37.346 17789 17789 D MainActivityZZ: permission label =修改或删除您的USB存储设备中的内容
07-13 06:22:37.347 17789 17789 D MainActivityZZ: permission desc =允许应用写入USB存储设备。
07-13 06:22:37.349 17789 17789 D MainActivityZZ: permissionGroup name =android.permission-group.STORAGE
07-13 06:22:37.349 17789 17789 D MainActivityZZ: permissionGroup label =存储空间
07-13 06:22:37.349 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.349 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.READ_EXTERNAL_STORAGE
07-13 06:22:37.351 17789 17789 D MainActivityZZ: permission label =读取您的USB存储设备中的内容
07-13 06:22:37.352 17789 17789 D MainActivityZZ: permission desc =允许应用读取您USB存储设备中的内容。
07-13 06:22:37.353 17789 17789 D MainActivityZZ: permissionGroup name =android.permission-group.STORAGE
07-13 06:22:37.353 17789 17789 D MainActivityZZ: permissionGroup label =存储空间
07-13 06:22:37.353 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.353 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.WRITE_SETTINGS
07-13 06:22:37.354 17789 17789 D MainActivityZZ: permission label =修改系统设置
07-13 06:22:37.355 17789 17789 D MainActivityZZ: permission desc =允许应用修改系统的设置数据。恶意应用可能会破坏您的系统配置。
07-13 06:22:37.356 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.356 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.WRITE_SECURE_SETTINGS
07-13 06:22:37.356 17789 17789 D MainActivityZZ: permission label =android.permission.WRITE_SECURE_SETTINGS
07-13 06:22:37.356 17789 17789 D MainActivityZZ: permission desc =null
07-13 06:22:37.356 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.356 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.DEVICE_POWER
07-13 06:22:37.357 17789 17789 D MainActivityZZ: permission label =android.permission.DEVICE_POWER
07-13 06:22:37.357 17789 17789 D MainActivityZZ: permission desc =null
07-13 06:22:37.357 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.357 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.CHANGE_CONFIGURATION
07-13 06:22:37.357 17789 17789 D MainActivityZZ: permission label =android.permission.CHANGE_CONFIGURATION
07-13 06:22:37.358 17789 17789 D MainActivityZZ: permission desc =null
07-13 06:22:37.358 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.358 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.MOUNT_UNMOUNT_FILESYSTEMS
07-13 06:22:37.358 17789 17789 D MainActivityZZ: permission label =android.permission.MOUNT_UNMOUNT_FILESYSTEMS
07-13 06:22:37.358 17789 17789 D MainActivityZZ: permission desc =null
07-13 06:22:37.358 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.358 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.VIBRATE
07-13 06:22:37.360 17789 17789 D MainActivityZZ: permission label =控制振动
07-13 06:22:37.361 17789 17789 D MainActivityZZ: permission desc =允许应用控制振动器。
07-13 06:22:37.361 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.361 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.BLUETOOTH
07-13 06:22:37.362 17789 17789 D MainActivityZZ: permission label =与蓝牙设备配对
07-13 06:22:37.363 17789 17789 D MainActivityZZ: permission desc =允许该应用查看手机上的蓝牙配置,以及与配对设备建立连接或接受其连接请求。
07-13 06:22:37.363 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.363 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.BLUETOOTH_ADMIN
07-13 06:22:37.364 17789 17789 D MainActivityZZ: permission label =访问蓝牙设置
07-13 06:22:37.365 17789 17789 D MainActivityZZ: permission desc =允许应用配置本地蓝牙手机,并允许其查找远程设备且与之配对。
07-13 06:22:37.365 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.365 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.BLUETOOTH_PRIVILEGED
07-13 06:22:37.366 17789 17789 D MainActivityZZ: permission label =android.permission.BLUETOOTH_PRIVILEGED
07-13 06:22:37.366 17789 17789 D MainActivityZZ: permission desc =null
07-13 06:22:37.366 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.366 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.NFC
07-13 06:22:37.367 17789 17789 D MainActivityZZ: permission label =控制近距离通信
07-13 06:22:37.368 17789 17789 D MainActivityZZ: permission desc =允许应用与近距离无线通信(NFC)标签、卡和读取器通信。
07-13 06:22:37.368 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.368 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.HARDWARE_TEST
07-13 06:22:37.368 17789 17789 D MainActivityZZ: permission label =android.permission.HARDWARE_TEST
07-13 06:22:37.368 17789 17789 D MainActivityZZ: permission desc =null
07-13 06:22:37.368 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.369 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.CALL_PHONE
07-13 06:22:37.370 17789 17789 D MainActivityZZ: permission label =拨打电话
07-13 06:22:37.371 17789 17789 D MainActivityZZ: permission desc =允许该应用在您未执行操作的情况下拨打电话号码。此权限可能会导致意外收费或呼叫。请注意,此权限不允许该应用拨打紧急电话号码。恶意应用可通过拨打电话产生相关费用,而无需您的确认。
07-13 06:22:37.372 17789 17789 D MainActivityZZ: permissionGroup name =android.permission-group.PHONE
07-13 06:22:37.372 17789 17789 D MainActivityZZ: permissionGroup label =电话
07-13 06:22:37.372 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.372 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.MODIFY_AUDIO_SETTINGS
07-13 06:22:37.373 17789 17789 D MainActivityZZ: permission label =更改您的音频设置
07-13 06:22:37.374 17789 17789 D MainActivityZZ: permission desc =允许该应用修改全局音频设置,例如音量和用于输出的扬声器。
07-13 06:22:37.374 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.375 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.MASTER_CLEAR
07-13 06:22:37.375 17789 17789 D MainActivityZZ: permission label =android.permission.MASTER_CLEAR
07-13 06:22:37.375 17789 17789 D MainActivityZZ: permission desc =null
07-13 06:22:37.375 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.375 17789 17789 D MainActivityZZ: <uses-permission> name =com.google.android.googleapps.permission.GOOGLE_AUTH
07-13 06:22:37.377 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.ACCESS_DOWNLOAD_MANAGER
07-13 06:22:37.389 17789 17789 D MainActivityZZ: permission label =访问下载管理器。
07-13 06:22:37.391 17789 17789 D MainActivityZZ: permission desc =允许该应用使用下载管理器并通过它下载文件。恶意应用可能会借此中断下载并访问私人信息。
07-13 06:22:37.391 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.391 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.READ_CONTACTS
07-13 06:22:37.393 17789 17789 D MainActivityZZ: permission label =读取联系人
07-13 06:22:37.394 17789 17789 D MainActivityZZ: permission desc =允许该应用读取您手机上存储的联系人的相关数据,包括您通过打电话、发送电子邮件或以其他方式与特定个人通信的频率。此权限可让应用保存您的联系人数据,而恶意应用可能会在您不知情的情况下分享联系人数据。
07-13 06:22:37.395 17789 17789 D MainActivityZZ: permissionGroup name =android.permission-group.CONTACTS
07-13 06:22:37.396 17789 17789 D MainActivityZZ: permissionGroup label =通讯录
07-13 06:22:37.396 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.396 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.WRITE_CONTACTS
07-13 06:22:37.397 17789 17789 D MainActivityZZ: permission label =修改您的通讯录
07-13 06:22:37.398 17789 17789 D MainActivityZZ: permission desc =允许该应用修改您手机上存储的联系人的相关数据,包括您通过打电话、发送电子邮件或以其他方式与特定联系人通信的频率。此权限可让应用删除联系人数据。
07-13 06:22:37.399 17789 17789 D MainActivityZZ: permissionGroup name =android.permission-group.CONTACTS
07-13 06:22:37.399 17789 17789 D MainActivityZZ: permissionGroup label =通讯录
07-13 06:22:37.399 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.399 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.ACCESS_NETWORK_STATE
07-13 06:22:37.400 17789 17789 D MainActivityZZ: permission label =查看网络连接
07-13 06:22:37.401 17789 17789 D MainActivityZZ: permission desc =允许该应用查看网络连接的相关信息,例如存在和连接的网络。
07-13 06:22:37.401 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.401 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.ACCESS_WIMAX_STATE
07-13 06:22:37.402 17789 17789 D MainActivityZZ: permission label =建立或中断 WiMAX 网络连接
07-13 06:22:37.403 17789 17789 D MainActivityZZ: permission desc =允许该应用确定是否启用了 WiMAX 以及连接的任何 WiMAX 网络的相关信息。
07-13 06:22:37.403 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.403 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.CHANGE_WIMAX_STATE
07-13 06:22:37.405 17789 17789 D MainActivityZZ: permission label =更改 WiMAX 状态
07-13 06:22:37.406 17789 17789 D MainActivityZZ: permission desc =允许该应用建立和断开手机与 WiMAX 网络之间的连接。
07-13 06:22:37.406 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.406 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.ACCESS_WIFI_STATE
07-13 06:22:37.407 17789 17789 D MainActivityZZ: permission label =查看WLAN连接
07-13 06:22:37.408 17789 17789 D MainActivityZZ: permission desc =允许该应用查看WLAN网络的相关信息,例如是否启用了WLAN以及连接的WLAN设备的名称。
07-13 06:22:37.408 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.408 17789 17789 D MainActivityZZ: <uses-permission> name =com.android.certinstaller.INSTALL_AS_USER
07-13 06:22:37.409 17789 17789 D MainActivityZZ: permission label =com.android.certinstaller.INSTALL_AS_USER
07-13 06:22:37.409 17789 17789 D MainActivityZZ: permission desc =null
07-13 06:22:37.409 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.409 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.CHANGE_WIFI_STATE
07-13 06:22:37.410 17789 17789 D MainActivityZZ: permission label =连接WLAN网络和断开连接
07-13 06:22:37.411 17789 17789 D MainActivityZZ: permission desc =允许该应用与WLAN接入点建立和断开连接,以及更改WLAN网络的设备配置。
07-13 06:22:37.411 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.411 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.TETHER_PRIVILEGED
07-13 06:22:37.412 17789 17789 D MainActivityZZ: permission label =android.permission.TETHER_PRIVILEGED
07-13 06:22:37.412 17789 17789 D MainActivityZZ: permission desc =null
07-13 06:22:37.412 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.412 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.INTERNET
07-13 06:22:37.413 17789 17789 D MainActivityZZ: permission label =拥有完全的网络访问权限
07-13 06:22:37.415 17789 17789 D MainActivityZZ: permission desc =允许该应用创建网络套接字和使用自定义网络协议。浏览器和其他某些应用提供了向互联网发送数据的途径,因此应用无需该权限即可向互联网发送数据。
07-13 06:22:37.415 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.415 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.CLEAR_APP_USER_DATA
07-13 06:22:37.415 17789 17789 D MainActivityZZ: permission label =android.permission.CLEAR_APP_USER_DATA
07-13 06:22:37.415 17789 17789 D MainActivityZZ: permission desc =null
07-13 06:22:37.415 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.415 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.READ_PHONE_STATE
07-13 06:22:37.417 17789 17789 D MainActivityZZ: permission label =读取手机状态和身份
07-13 06:22:37.418 17789 17789 D MainActivityZZ: permission desc =允许该应用访问设备的电话功能。此权限可让该应用确定本机号码和设备 ID、是否正处于通话状态以及拨打的号码。
07-13 06:22:37.419 17789 17789 D MainActivityZZ: permissionGroup name =android.permission-group.PHONE
07-13 06:22:37.419 17789 17789 D MainActivityZZ: permissionGroup label =电话
07-13 06:22:37.419 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.419 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.MODIFY_PHONE_STATE
07-13 06:22:37.419 17789 17789 D MainActivityZZ: permission label =android.permission.MODIFY_PHONE_STATE
07-13 06:22:37.420 17789 17789 D MainActivityZZ: permission desc =null
07-13 06:22:37.420 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.420 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.ACCESS_COARSE_LOCATION
07-13 06:22:37.421 17789 17789 D MainActivityZZ: permission label =访问大致位置信息(以网络为依据)
07-13 06:22:37.422 17789 17789 D MainActivityZZ: permission desc =此应用可根据网络来源(例如基站和 WLAN 网络)获取您的位置信息。您的手机必须支持并开启这些位置信息服务,此应用才能使用这些服务。
07-13 06:22:37.424 17789 17789 D MainActivityZZ: permissionGroup name =android.permission-group.LOCATION
07-13 06:22:37.424 17789 17789 D MainActivityZZ: permissionGroup label =位置信息
07-13 06:22:37.424 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.424 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.WRITE_APN_SETTINGS
07-13 06:22:37.424 17789 17789 D MainActivityZZ: permission label =android.permission.WRITE_APN_SETTINGS
07-13 06:22:37.424 17789 17789 D MainActivityZZ: permission desc =null
07-13 06:22:37.424 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.424 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.ACCESS_CHECKIN_PROPERTIES
07-13 06:22:37.425 17789 17789 D MainActivityZZ: permission label =android.permission.ACCESS_CHECKIN_PROPERTIES
07-13 06:22:37.425 17789 17789 D MainActivityZZ: permission desc =null
07-13 06:22:37.425 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.425 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.READ_USER_DICTIONARY
07-13 06:22:37.425 17789 17789 D MainActivityZZ: permission label =android.permission.READ_USER_DICTIONARY
07-13 06:22:37.426 17789 17789 D MainActivityZZ: permission desc =null
07-13 06:22:37.426 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.426 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.WRITE_USER_DICTIONARY
07-13 06:22:37.426 17789 17789 D MainActivityZZ: permission label =android.permission.WRITE_USER_DICTIONARY
07-13 06:22:37.426 17789 17789 D MainActivityZZ: permission desc =null
07-13 06:22:37.426 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.426 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.FORCE_STOP_PACKAGES
07-13 06:22:37.427 17789 17789 D MainActivityZZ: permission label =android.permission.FORCE_STOP_PACKAGES
07-13 06:22:37.427 17789 17789 D MainActivityZZ: permission desc =null
07-13 06:22:37.427 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.427 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.PACKAGE_USAGE_STATS
07-13 06:22:37.428 17789 17789 D MainActivityZZ: permission label =android.permission.PACKAGE_USAGE_STATS
07-13 06:22:37.428 17789 17789 D MainActivityZZ: permission desc =null
07-13 06:22:37.428 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.428 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.BATTERY_STATS
07-13 06:22:37.428 17789 17789 D MainActivityZZ: permission label =android.permission.BATTERY_STATS
07-13 06:22:37.428 17789 17789 D MainActivityZZ: permission desc =null
07-13 06:22:37.428 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.428 17789 17789 D MainActivityZZ: <uses-permission> name =com.android.launcher.permission.READ_SETTINGS
07-13 06:22:37.431 17789 17789 D MainActivityZZ: <uses-permission> name =com.android.launcher.permission.WRITE_SETTINGS
07-13 06:22:37.432 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.MOVE_PACKAGE
07-13 06:22:37.433 17789 17789 D MainActivityZZ: permission label =android.permission.MOVE_PACKAGE
07-13 06:22:37.433 17789 17789 D MainActivityZZ: permission desc =null
07-13 06:22:37.433 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.433 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.USE_CREDENTIALS
07-13 06:22:37.433 17789 17789 D MainActivityZZ: permission label =android.permission.USE_CREDENTIALS
07-13 06:22:37.434 17789 17789 D MainActivityZZ: permission desc =null
07-13 06:22:37.434 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.434 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.BACKUP
07-13 06:22:37.434 17789 17789 D MainActivityZZ: permission label =android.permission.BACKUP
07-13 06:22:37.434 17789 17789 D MainActivityZZ: permission desc =null
07-13 06:22:37.434 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.434 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.READ_SYNC_STATS
07-13 06:22:37.435 17789 17789 D MainActivityZZ: permission label =读取同步统计信息
07-13 06:22:37.436 17789 17789 D MainActivityZZ: permission desc =允许该应用读取某个帐号的同步统计信息,包括同步活动历史记录和同步数据量。
07-13 06:22:37.437 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.437 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.READ_SYNC_SETTINGS
07-13 06:22:37.438 17789 17789 D MainActivityZZ: permission label =读取同步设置
07-13 06:22:37.439 17789 17789 D MainActivityZZ: permission desc =允许该应用读取某个帐号的同步设置。例如,此权限可确定“联系人”应用是否与某个帐号同步。
07-13 06:22:37.439 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.439 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.WRITE_SYNC_SETTINGS
07-13 06:22:37.441 17789 17789 D MainActivityZZ: permission label =启用和停用同步
07-13 06:22:37.442 17789 17789 D MainActivityZZ: permission desc =允许该应用修改某个帐号的同步设置。例如,此权限可用于在“联系人”应用与某个帐号之间启用同步。
07-13 06:22:37.442 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.442 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.STATUS_BAR
07-13 06:22:37.442 17789 17789 D MainActivityZZ: permission label =android.permission.STATUS_BAR
07-13 06:22:37.442 17789 17789 D MainActivityZZ: permission desc =null
07-13 06:22:37.442 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.442 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.MANAGE_USB
07-13 06:22:37.443 17789 17789 D MainActivityZZ: permission label =android.permission.MANAGE_USB
07-13 06:22:37.443 17789 17789 D MainActivityZZ: permission desc =null
07-13 06:22:37.443 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.443 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.SET_POINTER_SPEED
07-13 06:22:37.443 17789 17789 D MainActivityZZ: permission label =android.permission.SET_POINTER_SPEED
07-13 06:22:37.443 17789 17789 D MainActivityZZ: permission desc =null
07-13 06:22:37.443 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.443 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.SET_KEYBOARD_LAYOUT
07-13 06:22:37.444 17789 17789 D MainActivityZZ: permission label =android.permission.SET_KEYBOARD_LAYOUT
07-13 06:22:37.444 17789 17789 D MainActivityZZ: permission desc =null
07-13 06:22:37.444 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.444 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.INTERACT_ACROSS_USERS_FULL
07-13 06:22:37.444 17789 17789 D MainActivityZZ: permission label =android.permission.INTERACT_ACROSS_USERS_FULL
07-13 06:22:37.444 17789 17789 D MainActivityZZ: permission desc =null
07-13 06:22:37.444 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.444 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.COPY_PROTECTED_DATA
07-13 06:22:37.444 17789 17789 D MainActivityZZ: permission label =android.permission.COPY_PROTECTED_DATA
07-13 06:22:37.444 17789 17789 D MainActivityZZ: permission desc =null
07-13 06:22:37.444 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.444 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.MANAGE_USERS
07-13 06:22:37.445 17789 17789 D MainActivityZZ: permission label =android.permission.MANAGE_USERS
07-13 06:22:37.445 17789 17789 D MainActivityZZ: permission desc =null
07-13 06:22:37.445 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.445 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.MANAGE_PROFILE_AND_DEVICE_OWNERS
07-13 06:22:37.446 17789 17789 D MainActivityZZ: permission label =管理个人资料和设备所有者
07-13 06:22:37.447 17789 17789 D MainActivityZZ: permission desc =允许应用设置个人资料所有者和设备所有者。
07-13 06:22:37.447 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.447 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.READ_PROFILE
07-13 06:22:37.447 17789 17789 D MainActivityZZ: permission label =android.permission.READ_PROFILE
07-13 06:22:37.448 17789 17789 D MainActivityZZ: permission desc =null
07-13 06:22:37.448 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.448 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.CONFIGURE_WIFI_DISPLAY
07-13 06:22:37.448 17789 17789 D MainActivityZZ: permission label =android.permission.CONFIGURE_WIFI_DISPLAY
07-13 06:22:37.448 17789 17789 D MainActivityZZ: permission desc =null
07-13 06:22:37.448 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.448 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.CONFIGURE_DISPLAY_COLOR_MODE
07-13 06:22:37.448 17789 17789 D MainActivityZZ: permission label =android.permission.CONFIGURE_DISPLAY_COLOR_MODE
07-13 06:22:37.448 17789 17789 D MainActivityZZ: permission desc =null
07-13 06:22:37.448 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.448 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.SET_TIME
07-13 06:22:37.449 17789 17789 D MainActivityZZ: permission label =android.permission.SET_TIME
07-13 06:22:37.449 17789 17789 D MainActivityZZ: permission desc =null
07-13 06:22:37.449 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.449 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.ACCESS_NOTIFICATIONS
07-13 06:22:37.449 17789 17789 D MainActivityZZ: permission label =android.permission.ACCESS_NOTIFICATIONS
07-13 06:22:37.449 17789 17789 D MainActivityZZ: permission desc =null
07-13 06:22:37.449 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.449 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.REBOOT
07-13 06:22:37.449 17789 17789 D MainActivityZZ: permission label =android.permission.REBOOT
07-13 06:22:37.450 17789 17789 D MainActivityZZ: permission desc =null
07-13 06:22:37.450 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.450 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.RECEIVE_BOOT_COMPLETED
07-13 06:22:37.451 17789 17789 D MainActivityZZ: permission label =开机启动
07-13 06:22:37.452 17789 17789 D MainActivityZZ: permission desc =允许应用在系统完成引导后立即自动启动。这样可能会延长手机的启动时间,并允许应用始终运行,从而导致手机总体运行速度减慢。
07-13 06:22:37.452 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.452 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.MANAGE_DEVICE_ADMINS
07-13 06:22:37.452 17789 17789 D MainActivityZZ: permission label =android.permission.MANAGE_DEVICE_ADMINS
07-13 06:22:37.452 17789 17789 D MainActivityZZ: permission desc =null
07-13 06:22:37.452 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.452 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.READ_SEARCH_INDEXABLES
07-13 06:22:37.453 17789 17789 D MainActivityZZ: permission label =android.permission.READ_SEARCH_INDEXABLES
07-13 06:22:37.453 17789 17789 D MainActivityZZ: permission desc =null
07-13 06:22:37.453 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.453 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.OEM_UNLOCK_STATE
07-13 06:22:37.453 17789 17789 D MainActivityZZ: permission label =android.permission.OEM_UNLOCK_STATE
07-13 06:22:37.453 17789 17789 D MainActivityZZ: permission desc =null
07-13 06:22:37.453 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.453 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.MANAGE_USER_OEM_UNLOCK_STATE
07-13 06:22:37.453 17789 17789 D MainActivityZZ: permission label =android.permission.MANAGE_USER_OEM_UNLOCK_STATE
07-13 06:22:37.453 17789 17789 D MainActivityZZ: permission desc =null
07-13 06:22:37.454 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.454 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.OVERRIDE_WIFI_CONFIG
07-13 06:22:37.454 17789 17789 D MainActivityZZ: permission label =android.permission.OVERRIDE_WIFI_CONFIG
07-13 06:22:37.454 17789 17789 D MainActivityZZ: permission desc =null
07-13 06:22:37.454 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.454 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.USE_FINGERPRINT
07-13 06:22:37.455 17789 17789 D MainActivityZZ: permission label =使用指纹硬件
07-13 06:22:37.456 17789 17789 D MainActivityZZ: permission desc =允许该应用使用指纹硬件进行身份验证
07-13 06:22:37.456 17789 17789 D MainActivityZZ: permissionGroup name =android.permission-group.SENSORS
07-13 06:22:37.457 17789 17789 D MainActivityZZ: permissionGroup label =身体传感器
07-13 06:22:37.457 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.457 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.MANAGE_FINGERPRINT
07-13 06:22:37.457 17789 17789 D MainActivityZZ: permission label =android.permission.MANAGE_FINGERPRINT
07-13 06:22:37.457 17789 17789 D MainActivityZZ: permission desc =null
07-13 06:22:37.457 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.457 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.USER_ACTIVITY
07-13 06:22:37.457 17789 17789 D MainActivityZZ: permission label =android.permission.USER_ACTIVITY
07-13 06:22:37.457 17789 17789 D MainActivityZZ: permission desc =null
07-13 06:22:37.457 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.457 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.CHANGE_APP_IDLE_STATE
07-13 06:22:37.458 17789 17789 D MainActivityZZ: permission label =android.permission.CHANGE_APP_IDLE_STATE
07-13 06:22:37.458 17789 17789 D MainActivityZZ: permission desc =null
07-13 06:22:37.458 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.458 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.PEERS_MAC_ADDRESS
07-13 06:22:37.458 17789 17789 D MainActivityZZ: permission label =android.permission.PEERS_MAC_ADDRESS
07-13 06:22:37.458 17789 17789 D MainActivityZZ: permission desc =null
07-13 06:22:37.458 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.458 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.MANAGE_NOTIFICATIONS
07-13 06:22:37.459 17789 17789 D MainActivityZZ: permission label =android.permission.MANAGE_NOTIFICATIONS
07-13 06:22:37.459 17789 17789 D MainActivityZZ: permission desc =null
07-13 06:22:37.459 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.459 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.DELETE_PACKAGES
07-13 06:22:37.459 17789 17789 D MainActivityZZ: permission label =android.permission.DELETE_PACKAGES
07-13 06:22:37.459 17789 17789 D MainActivityZZ: permission desc =null
07-13 06:22:37.459 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.459 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.MANAGE_APP_OPS_RESTRICTIONS
07-13 06:22:37.460 17789 17789 D MainActivityZZ: permission label =android.permission.MANAGE_APP_OPS_RESTRICTIONS
07-13 06:22:37.460 17789 17789 D MainActivityZZ: permission desc =null
07-13 06:22:37.460 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.460 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.HIDE_NON_SYSTEM_OVERLAY_WINDOWS
07-13 06:22:37.460 17789 17789 D MainActivityZZ: permission label =android.permission.HIDE_NON_SYSTEM_OVERLAY_WINDOWS
07-13 06:22:37.460 17789 17789 D MainActivityZZ: permission desc =null
07-13 06:22:37.460 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.460 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.READ_PRINT_SERVICES
07-13 06:22:37.461 17789 17789 D MainActivityZZ: permission label =android.permission.READ_PRINT_SERVICES
07-13 06:22:37.461 17789 17789 D MainActivityZZ: permission desc =null
07-13 06:22:37.461 17789 17789 D MainActivityZZ: ===========================================
07-13 06:22:37.461 17789 17789 D MainActivityZZ: <uses-permission> name =android.permission.NETWORK_SETTINGS
07-13 06:22:37.461 17789 17789 D MainActivityZZ: permission label =android.permission.NETWORK_SETTINGS
07-13 06:22:37.461 17789 17789 D MainActivityZZ: permission desc =null
07-13 06:22:37.461 17789 17789 D MainActivityZZ: ===========================================

 

 

 

将 getUsesPermission("com.android.settings") 改成 getUsesPermission("com.remote.bangdemo"),然后再运行下:

07-13 06:26:34.483 18127 18127 D MainActivityZZ: permission label =com.example.carol.playground.RESTART
07-13 06:26:34.483 18127 18127 D MainActivityZZ: permission desc =重启
07-13 06:26:34.483 18127 18127 D MainActivityZZ: permission label =com.example.carol.playground.SHOPPING
07-13 06:26:34.483 18127 18127 D MainActivityZZ: permission desc =null
07-13 06:26:34.483 18127 18127 D MainActivityZZ: <uses-permission> name =android.permission.ACCESS_MOCK_LOCATION
07-13 06:26:34.484 18127 18127 D MainActivityZZ: permission label =android.permission.ACCESS_MOCK_LOCATION
07-13 06:26:34.484 18127 18127 D MainActivityZZ: permission desc =null
07-13 06:26:34.484 18127 18127 D MainActivityZZ: ===========================================
07-13 06:26:34.484 18127 18127 D MainActivityZZ: <uses-permission> name =android.permission.ACCESS_NETWORK_STATE
07-13 06:26:34.505 18127 18127 D MainActivityZZ: permission label =查看网络连接
07-13 06:26:34.506 18127 18127 D MainActivityZZ: permission desc =允许该应用查看网络连接的相关信息,例如存在和连接的网络。
07-13 06:26:34.506 18127 18127 D MainActivityZZ: ===========================================
07-13 06:26:34.506 18127 18127 D MainActivityZZ: <uses-permission> name =android.permission.RECEIVE_MMS
07-13 06:26:34.508 18127 18127 D MainActivityZZ: permission label =接收讯息(彩信)
07-13 06:26:34.509 18127 18127 D MainActivityZZ: permission desc =允许该应用接收和处理彩信。这就意味着,该应用可能会监视发送到您设备的彩信,或删除发送到您设备的彩信而不向您显示。
07-13 06:26:34.511 18127 18127 D MainActivityZZ: permissionGroup name =android.permission-group.SMS
07-13 06:26:34.511 18127 18127 D MainActivityZZ: permissionGroup label =短信
07-13 06:26:34.511 18127 18127 D MainActivityZZ: ===========================================

 

 

延伸:

<permission> 自定义权限

技术分享图片

 

protectionLevel 可以引用的值如上

 

<permission> 自定义权限可以使用的属性

技术分享图片

 

Android O 获取应用权限 Demo案例

标签:port   main   ash   通讯   tst   roi   sage   bubuko   call   

原文地址:https://www.cnblogs.com/onelikeone/p/9304629.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!