CN117932589A - Authority management method and related device - Google Patents
Authority management method and related device Download PDFInfo
- Publication number
- CN117932589A CN117932589A CN202311722748.8A CN202311722748A CN117932589A CN 117932589 A CN117932589 A CN 117932589A CN 202311722748 A CN202311722748 A CN 202311722748A CN 117932589 A CN117932589 A CN 117932589A
- Authority
- CN
- China
- Prior art keywords
- application
- version
- permission
- read
- media
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000007726 management method Methods 0.000 title claims abstract description 21
- 238000000034 method Methods 0.000 claims abstract description 61
- 238000004590 computer program Methods 0.000 claims description 17
- 238000004891 communication Methods 0.000 claims description 14
- 230000004044 response Effects 0.000 claims description 9
- 238000013475 authorization Methods 0.000 abstract description 29
- 238000005516 engineering process Methods 0.000 abstract description 8
- 238000012545 processing Methods 0.000 description 29
- 230000006870 function Effects 0.000 description 21
- 238000010586 diagram Methods 0.000 description 13
- 230000008569 process Effects 0.000 description 13
- 238000013461 design Methods 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 4
- 230000008859 change Effects 0.000 description 3
- 238000013500 data storage Methods 0.000 description 3
- 238000010295 mobile communication Methods 0.000 description 3
- 101000827703 Homo sapiens Polyphosphoinositide phosphatase Proteins 0.000 description 2
- 102100023591 Polyphosphoinositide phosphatase Human genes 0.000 description 2
- 101100012902 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) FIG2 gene Proteins 0.000 description 2
- 101100233916 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) KAR5 gene Proteins 0.000 description 2
- 239000008186 active pharmaceutical agent Substances 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 239000000835 fiber Substances 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 1
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 1
- 230000001133 acceleration Effects 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 238000013528 artificial neural network Methods 0.000 description 1
- 230000003190 augmentative effect Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 210000000988 bone and bone Anatomy 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 239000003795 chemical substances by application Substances 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000014509 gene expression Effects 0.000 description 1
- 239000011521 glass Substances 0.000 description 1
- 230000000977 initiatory effect Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 239000004984 smart glass Substances 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000001356 surgical procedure Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/30—Authentication, i.e. establishing the identity or authorisation of security principals
- G06F21/44—Program or device authentication
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/604—Tools and structures for managing or administering access control systems
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- General Engineering & Computer Science (AREA)
- Computer Hardware Design (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Health & Medical Sciences (AREA)
- Bioethics (AREA)
- Health & Medical Sciences (AREA)
- Automation & Control Theory (AREA)
- Stored Programmes (AREA)
Abstract
本申请实施例提供的权限管理方法及相关装置,涉及终端技术领域。方法包括:系统可以对应用所申请的隐式授权的权限状态进行判断。若隐式授权的权限是未授权状态,且应用的targetSDK版本在预设版本区间内,系统可以为该应用所申请的隐式授权的权限进行二次授权。这样,应用所申请的隐式授权的权限可以被授权,从而使得应用可以正常运行。
The permission management method and related device provided by the embodiment of the present application relate to the field of terminal technology. The method includes: the system can judge the status of the implicitly authorized permission applied for by the application. If the implicitly authorized permission is in an unauthorized state, and the targetSDK version of the application is within a preset version range, the system can perform a secondary authorization for the implicitly authorized permission applied for by the application. In this way, the implicitly authorized permission applied for by the application can be authorized, so that the application can run normally.
Description
技术领域Technical Field
本申请涉及终端技术领域,尤其涉及权限管理方法及相关装置。The present application relates to the field of terminal technology, and in particular to a rights management method and related devices.
背景技术Background technique
电子设备中可以包括多个应用,一些场景中,应用可以访问电子设备的外部存储中的数据或者其他应用的媒体文件等,例如应用可以访问图库中的图片和视频。An electronic device may include multiple applications. In some scenarios, an application may access data in an external storage of the electronic device or media files of other applications. For example, an application may access pictures and videos in a gallery.
然而,一些场景中,可能出现应用无法访问图库中的图片和视频的情况。However, in some scenarios, the application may not be able to access the pictures and videos in the gallery.
发明内容Summary of the invention
本申请实施例提供的权限管理方法及相关装置,系统可以对应用所申请的READ_MEDIA_IMAGES权限、READ_MEDIA_AUDIO权限和/或READ_MEDIA_VIDEO权限状态进行判断。若READ_MEDIA_IMAGES权限、READ_MEDIA_AUDIO权限和/或READ_MEDIA_VIDEO权限是未授权状态,且应用的targetSDK版本在Android系统6版本到Android系统12版本之间,系统可以为该应用进行二次授权。这样,当该应用访问电子设备外部存储中读取数据时,系统可以判断应用被授予READ_MEDIA_IMAGES权限等,进而可以允许应用访问存储中的数据。The permission management method and related devices provided in the embodiments of the present application can determine the status of the READ_MEDIA_IMAGES permission, READ_MEDIA_AUDIO permission and/or READ_MEDIA_VIDEO permission applied for by the application. If the READ_MEDIA_IMAGES permission, READ_MEDIA_AUDIO permission and/or READ_MEDIA_VIDEO permission is unauthorized, and the targetSDK version of the application is between Android system version 6 and Android system version 12, the system can perform secondary authorization for the application. In this way, when the application accesses the external storage of the electronic device to read data, the system can determine that the application is granted READ_MEDIA_IMAGES permission, etc., and then allow the application to access the data in the storage.
第一方面,本申请实施例提供的权限管理方法,方法包括:In a first aspect, the method for rights management provided by the embodiment of the present application includes:
响应于电子设备的系统版本从第一系统版本升级到第二系统版本,将第一应用的第一权限设置为不授权状态,其中,第一应用的应用版本为第一应用版本,在第一应用版本中第一应用申请有第一权限,第一系统版本中未定义有第一权限,第二系统版本中定义有第一权限;在电子设备的系统版本为第二系统版本的情况下,响应于第一应用的应用版本从第一应用版本升级到第二应用版本,将第一应用的第一权限设置为授权状态。这样,当第一应用访问电子设备外部存储中读取数据时,系统可以判断应用被授予第一权限,进而可以允许应用访问存储中的数据。In response to the system version of the electronic device being upgraded from the first system version to the second system version, the first permission of the first application is set to an unauthorized state, wherein the application version of the first application is the first application version, in the first application version, the first application applies for a first permission, the first system version does not define the first permission, and the second system version defines the first permission; when the system version of the electronic device is the second system version, in response to the application version of the first application being upgraded from the first application version to the second application version, the first permission of the first application is set to an authorized state. In this way, when the first application accesses the external storage of the electronic device to read data, the system can determine that the application is granted the first permission, and then can allow the application to access the data in the storage.
一种可能的实现中,第二应用版本为预设版本区间内的软件开发工具包SDK版本。这样,当第一应用访问电子设备外部存储中的数据时,可以判断第一应用被授予第一权限,从而不影响应用的运行,使第一应用可以正常访问存储中的数据,提升用户体验。In a possible implementation, the second application version is a software development kit SDK version within a preset version range. In this way, when the first application accesses data in the external storage of the electronic device, it can be determined that the first application is granted the first permission, so that the operation of the application is not affected, and the first application can normally access the data in the storage, thereby improving the user experience.
一种可能的实现中,电子设备中保存有预设列表,预设列表中包括第一权限,将第一应用的第一权限设置为授权状态之前,还包括:判断第一应用是否申请有预设列表中的权限;将第一应用的第一权限设置为授权状态,包括:在第一应用申请了预设列表中的第一权限的情况下,将第一应用的第一权限设置为授权状态。这样,当第一应用访问电子设备外部存储中的数据时,系统会校验隐式存储权限,若系统判断第一应用被授予隐式存储权限,则第一应用可以访问存储中的数据,使得第一应用可以正常运行。In a possible implementation, a preset list is stored in the electronic device, and the preset list includes the first permission. Before setting the first permission of the first application to the authorized state, it also includes: determining whether the first application has applied for the permission in the preset list; setting the first permission of the first application to the authorized state, including: if the first application has applied for the first permission in the preset list, setting the first permission of the first application to the authorized state. In this way, when the first application accesses data in the external storage of the electronic device, the system will check the implicit storage permission. If the system determines that the first application is granted the implicit storage permission, the first application can access the data in the storage, so that the first application can operate normally.
一种可能的实现中,方法还包括:第一应用请求访问第二应用的数据;在第一应用的应用版本为第二应用版本的情况下,对第一应用的第一权限进行校验;在第一权限为授权状态的情况下,第一应用访问第二应用的数据。这样,提高了应用之间访问数据的安全性,从而可以更好的保护第二应用的数据,提升用户体验。In a possible implementation, the method further includes: the first application requests to access the data of the second application; when the application version of the first application is the second application version, the first permission of the first application is verified; when the first permission is in an authorized state, the first application accesses the data of the second application. In this way, the security of data access between applications is improved, so that the data of the second application can be better protected and the user experience can be improved.
一种可能的实现中,在第一应用版本和第二应用版本中第一应用均还申请有第二权限,方法还包括:第一应用请求访问第二应用的数据;在第一应用的应用版本为第一应用版本的情况下,对第一应用的第二权限进行校验;在第二权限为授权状态的情况下,第一应用访问第二应用的数据。这样,提高了应用之间访问数据的安全性,从而可以更好的保护第二应用的数据,提升用户体验。In a possible implementation, the first application also applies for the second permission in both the first application version and the second application version, and the method further includes: the first application requests to access the data of the second application; when the application version of the first application is the first application version, the second permission of the first application is verified; when the second permission is in the authorized state, the first application accesses the data of the second application. In this way, the security of data access between applications is improved, so that the data of the second application can be better protected and the user experience can be improved.
一种可能的实现中,第一权限包括下述的一项或多项:READ_MEDIA_IMAGES权限、READ_MEDIA_AUDIO权限或READ_MEDIA_VIDEO权限,第二权限包括:READ_EXTERNAL_STORAGE权限。这样,电子设备通过控制第一权限和/或第二权限等授权状态,可以更好的控制应用之间访问数据的安全性,合理地为第一应用开放第一权限和/或第二权限,使得第一应用正常运行。In a possible implementation, the first permission includes one or more of the following: READ_MEDIA_IMAGES permission, READ_MEDIA_AUDIO permission, or READ_MEDIA_VIDEO permission, and the second permission includes: READ_EXTERNAL_STORAGE permission. In this way, the electronic device can better control the security of data access between applications by controlling the authorization status of the first permission and/or the second permission, and reasonably open the first permission and/or the second permission for the first application, so that the first application can run normally.
第二方面,本申请实施例提供一种权限管理的装置,该装置可以是电子设备,也可以是电子设备内的芯片或者芯片系统。该装置可以包括处理单元。处理单元用于实现第一方面或第一方面的任意一种可能的实现方式中电子设备执行的与处理相关的任意方法。当该装置是电子设备时,该处理单元可以是处理器。该装置还可以包括存储单元,该存储单元可以是存储器。该存储单元用于存储指令,该处理单元执行该存储单元所存储的指令,以使该电子设备实现第一方面或第一方面的任意一种可能的实现方式中描述的方法。当该装置是电子设备内的芯片或者芯片系统时,该处理单元可以是处理器。该处理单元执行存储单元所存储的指令,以使该电子设备实现第一方面或第一方面的任意一种可能的实现方式中描述的方法。该存储单元可以是该芯片内的存储单元(例如,寄存器、缓存等),也可以是该电子设备内的位于该芯片外部的存储单元(例如,只读存储器、随机存取存储器等)。In a second aspect, an embodiment of the present application provides a device for rights management, which may be an electronic device, or a chip or chip system in an electronic device. The device may include a processing unit. The processing unit is used to implement any method related to processing performed by the electronic device in the first aspect or any possible implementation of the first aspect. When the device is an electronic device, the processing unit may be a processor. The device may also include a storage unit, which may be a memory. The storage unit is used to store instructions, and the processing unit executes the instructions stored in the storage unit so that the electronic device implements the method described in the first aspect or any possible implementation of the first aspect. When the device is a chip or chip system in an electronic device, the processing unit may be a processor. The processing unit executes the instructions stored in the storage unit so that the electronic device implements the method described in the first aspect or any possible implementation of the first aspect. The storage unit may be a storage unit in the chip (for example, a register, a cache, etc.), or a storage unit in the electronic device located outside the chip (for example, a read-only memory, a random access memory, etc.).
示例性的,处理单元,用于响应于电子设备的系统版本从第一系统版本升级到第二系统版本,将第一应用的第一权限设置为不授权状态;还用于响应于第一应用的应用版本从第一应用版本升级到第二应用版本,将第一应用的第一权限设置为授权状态。Exemplarily, a processing unit is used to set the first permission of the first application to an unauthorized state in response to the system version of the electronic device being upgraded from a first system version to a second system version; and is also used to set the first permission of the first application to an authorized state in response to the application version of the first application being upgraded from a first application version to a second application version.
一种可能的实现方式中,第二应用版本为预设版本区间内的软件开发工具包SDK版本。In a possible implementation, the second application version is a software development kit SDK version within a preset version range.
一种可能的实现方式中,处理单元,用于判断第一应用是否申请有预设列表中的权限,还用于在第一应用申请了预设列表中的第一权限的情况下,将第一应用的第一权限设置为授权状态。In a possible implementation, the processing unit is used to determine whether the first application has applied for a permission in a preset list, and is further used to set the first permission of the first application to an authorized state if the first application has applied for the first permission in the preset list.
一种可能的实现方式中,处理单元,用于请求访问第二应用的数据;还用于对第一应用的第一权限进行校验;具体还用于在第一权限为授权状态的情况下,访问第二应用的数据。In one possible implementation, the processing unit is used to request access to data of a second application; is also used to verify the first permission of the first application; and is specifically used to access the data of the second application when the first permission is in an authorized state.
一种可能的实现方式中,处理单元,用于请求访问第二应用的数据;还用于对第一应用的第二权限进行校验;具体还用于在第二权限为授权状态的情况下,第一应用访问第二应用的数据。In one possible implementation, the processing unit is used to request access to data of the second application; and is also used to verify the second permission of the first application; and is specifically used to allow the first application to access data of the second application when the second permission is in an authorized state.
一种可能的实现方式中,第一权限包括下述的一项或多项:READ_MEDIA_IMAGES权限、READ_MEDIA_AUDIO权限或READ_MEDIA_VIDEO权限,第二权限包括:READ_EXTERNAL_STORAGE权限。In a possible implementation, the first permission includes one or more of the following: READ_MEDIA_IMAGES permission, READ_MEDIA_AUDIO permission, or READ_MEDIA_VIDEO permission, and the second permission includes: READ_EXTERNAL_STORAGE permission.
第三方面,本申请实施例提供一种电子设备,包括处理器和存储器,存储器用于存储代码指令,处理器用于运行代码指令,以执行第一方面或第一方面的任意一种可能的实现方式中描述的方法。In a third aspect, an embodiment of the present application provides an electronic device, including a processor and a memory, the memory being used to store code instructions, and the processor being used to run the code instructions to execute the method described in the first aspect or any possible implementation of the first aspect.
第四方面,本申请提供一种芯片或者芯片系统,该芯片或者芯片系统包括至少一个处理器和通信接口,通信接口和至少一个处理器通过线路互联,至少一个处理器用于运行计算机程序或指令,以执行第一方面或第一方面的任意一种可能的实现方式中描述的方法。其中,芯片中的通信接口可以为输入/输出接口、管脚或电路等。In a fourth aspect, the present application provides a chip or a chip system, the chip or chip system comprising at least one processor and a communication interface, the communication interface and the at least one processor are interconnected by a line, and the at least one processor is used to run a computer program or instruction to execute the method described in the first aspect or any possible implementation of the first aspect. The communication interface in the chip can be an input/output interface, a pin or a circuit, etc.
在一种可能的实现中,本申请中上述描述的芯片或者芯片系统还包括至少一个存储器,该至少一个存储器中存储有指令。该存储器可以为芯片内部的存储单元,例如,寄存器、缓存等,也可以是该芯片的存储单元(例如,只读存储器、随机存取存储器等)。In a possible implementation, the chip or chip system described above in the present application further includes at least one memory, in which instructions are stored. The memory may be a storage unit inside the chip, such as a register, a cache, etc., or a storage unit of the chip (e.g., a read-only memory, a random access memory, etc.).
第五方面,本申请实施例提供一种计算机可读存储介质,计算机可读存储介质中存储有计算机程序或指令,当计算机程序或指令在计算机上运行时,使得计算机执行第一方面或第一方面的任意一种可能的实现方式中描述的方法。In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program or instructions are stored. When the computer program or instructions are run on a computer, the computer executes the method described in the first aspect or any possible implementation of the first aspect.
第六方面,本申请实施例提供一种包括计算机程序的计算机程序产品,当计算机程序在计算机上运行时,使得计算机执行第一方面或第一方面的任意一种可能的实现方式中描述的方法。In a sixth aspect, an embodiment of the present application provides a computer program product comprising a computer program, which, when the computer program runs on a computer, enables the computer to execute the method described in the first aspect or any possible implementation manner of the first aspect.
应当理解的是,本申请的第二方面至第六方面与本申请的第一方面的技术方案相对应,各方面及对应的可行实施方式所取得的有益效果相似,不再赘述。It should be understood that the second to sixth aspects of the present application correspond to the technical solutions of the first aspect of the present application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation methods are similar and will not be repeated here.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1为本申请实施例提供的一种应用存储权限及其授予状态变化的示意图;FIG1 is a schematic diagram of an application storage permission and its granting status change provided by an embodiment of the present application;
图2为本申请实施例提供的一种电子设备的结构示意图;FIG2 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
图3为本申请实施例提供的一种电子设备的软件结构示意图;FIG3 is a schematic diagram of a software structure of an electronic device provided in an embodiment of the present application;
图4为本申请实施例提供的一种权限管理方法的流程图;FIG4 is a flow chart of a method for managing permissions provided in an embodiment of the present application;
图5为本申请实施例提供的一种权限管理方法的示意图;FIG5 is a schematic diagram of a permission management method provided in an embodiment of the present application;
图6为本申请实施例提供的一种芯片的结构示意图。FIG6 is a schematic diagram of the structure of a chip provided in an embodiment of the present application.
具体实施方式Detailed ways
为了便于清楚描述本申请实施例的技术方案,以下,对本申请实施例中所涉及的部分术语和技术进行简单介绍:In order to clearly describe the technical solutions of the embodiments of the present application, some terms and technologies involved in the embodiments of the present application are briefly introduced below:
1、存储权限:1. Storage permissions:
(1.1)READ_EXTERNAL_STORAGE权限:该权限允许应用从电子设备的外部存储中读取数据,例如数据可以包括图片、音频、视频、文件等内容。(1.1) READ_EXTERNAL_STORAGE permission: This permission allows an application to read data from the external storage of an electronic device. For example, the data may include pictures, audio, video, files, etc.
(1.2)READ_MEDIA_IMAGES权限:该权限允许应用从电子设备的外部存储中读取图像文件,例如图像文件可以包括图片等。(1.2) READ_MEDIA_IMAGES permission: This permission allows the application to read image files from the external storage of the electronic device. For example, image files may include pictures, etc.
(1.3)READ_MEDIA_AUDIO权限:该权限允许应用从电子设备的外部存储中读取音频文件,例如音频文件可以包括录音、语音等。(1.3) READ_MEDIA_AUDIO permission: This permission allows the application to read audio files from the external storage of the electronic device. For example, audio files may include recordings, voice, etc.
(1.4)READ_MEDIA_VIDEO权限:该权限允许应用从电子设备的外部存储中读取视频文件。(1.4)READ_MEDIA_VIDEO permission: This permission allows the application to read video files from the external storage of the electronic device.
2、targetSDK版本:软件开发工具包(software development kit,SDK)的目标版本,也可以称为targetSdkVersion。targetSDK版本可以理解为应用运行时对应的应用编程接口(application programming interface,API)级别,应用可以根据自身业务需要设置targetSdkVersion为某个API级别。2. targetSDK version: The target version of the software development kit (SDK), also known as targetSdkVersion. The targetSDK version can be understood as the application programming interface (API) level corresponding to the application runtime. The application can set the targetSdkVersion to a certain API level according to its own business needs.
可以理解的是,不同的Android系统版本可以有对应的API级别,例如Android系统13版本对应API级别33,Android系统12版本对应API级别31或32,Android系统11版本对应API级别30,Android系统10版本对应API级别29,Android系统6版本对应API级别23等。It is understandable that different Android system versions can have corresponding API levels, for example, Android system version 13 corresponds to API level 33, Android system version 12 corresponds to API level 31 or 32, Android system version 11 corresponds to API level 30, Android system version 10 corresponds to API level 29, Android system version 6 corresponds to API level 23, and so on.
一些实现中,Android系统13版本也可以称为T版本,Android系统12版本也可以称为S版本,Android系统6版本也可以称为M版本。In some implementations, Android system version 13 may also be called version T, Android system version 12 may also be called version S, and Android system version 6 may also be called version M.
3、术语3. Terminology
在本申请的实施例中,采用了“第一”、“第二”等字样对功能和作用基本相同的相同项或相似项进行区分。例如,第一芯片和第二芯片仅仅是为了区分不同的芯片,并不对其先后顺序进行限定。本领域技术人员可以理解“第一”、“第二”等字样并不对数量和执行次序进行限定,并且“第一”、“第二”等字样也并不限定一定不同。In the embodiments of the present application, words such as "first" and "second" are used to distinguish the same or similar items with substantially the same functions and effects. For example, the first chip and the second chip are only used to distinguish different chips, and their order is not limited. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit them to be different.
需要说明的是,本申请实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其他实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。It should be noted that in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
本申请实施例中,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b,或c中的至少一项(个),可以表示:a,b,c,a-b,a--c,b-c,或a-b-c,其中a,b,c可以是单个,也可以是多个。In the embodiments of the present application, "at least one" refers to one or more, and "plurality" refers to two or more. "And/or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and/or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character "/" generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, a-b, a--c, b-c, or a-b-c, where a, b, c can be single or multiple.
4、电子设备4. Electronic equipment
本申请实施例的电子设备也可以为任意形式的终端设备,例如,电子设备可以包括:手机(mobile phone)、平板电脑、掌上电脑、笔记本电脑、移动互联网设备(mobileinternet device,MID)、可穿戴设备,虚拟现实(virtual reality,VR)设备、增强现实(augmented reality,AR)设备、工业控制(industrial control)中的无线终端、无人驾驶(self driving)中的无线终端、远程手术(remote medical surgery)中的无线终端、智能电网(smart grid)中的无线终端、运输安全(transportation safety)中的无线终端、智慧城市(smart city)中的无线终端、智慧家庭(smart home)中的无线终端、蜂窝电话、无绳电话、会话启动协议(session initiation protocol,SIP)电话、无线本地环路(wirelesslocal loop,WLL)站、个人数字助理(personal digital assistant,PDA)、具有无线通信功能的手持设备、计算设备或连接到无线调制解调器的其它处理设备、车载设备、可穿戴设备,5G网络中的电子设备或者未来演进的公用陆地移动通信网络(public land mobilenetwork,PLMN)中的电子设备等,本申请实施例对此并不限定。The electronic device of the embodiment of the present application may also be a terminal device in any form. For example, the electronic device may include: a mobile phone, a tablet computer, a PDA, a laptop computer, a mobile internet device (MID), a wearable device, a virtual reality (VR) device, an augmented reality (AR) device, a wireless terminal in industrial control, a wireless terminal in self driving, a wireless terminal in remote medical surgery, a wireless terminal in a smart grid, a wireless terminal in transportation safety, a wireless terminal in a smart city, a wireless terminal in a smart home, a cellular phone, a cordless phone, a session initiation protocol (SIP) phone, a wireless local loop (WLL) station, a personal digital assistant (PDA), a handheld device with wireless communication function, a computing device or other processing device connected to a wireless modem, a vehicle-mounted device, a wearable device, an electronic device in a 5G network or a public land mobile communication network (public land mobile communication network) to be evolved in the future. Mobile network, PLMN) and the like, the embodiments of the present application are not limited to this.
作为示例而非限定,在本申请实施例中,该电子设备还可以是可穿戴设备。可穿戴设备也可以称为穿戴式智能设备,是应用穿戴式技术对日常穿戴进行智能化设计、开发出可以穿戴的设备的总称,如眼镜、手套、手表、服饰及鞋等。可穿戴设备即直接穿在身上,或是整合到用户的衣服或配件的一种便携式设备。可穿戴设备不仅仅是一种硬件设备,更是通过软件支持以及数据交互、云端交互来实现强大的功能。广义穿戴式智能设备包括功能全、尺寸大、可不依赖智能手机实现完整或者部分的功能,例如:智能手表或智能眼镜等,以及只专注于某一类应用功能,需要和其它设备如智能手机配合使用,如各类进行体征监测的智能手环、智能首饰等。As an example but not limitation, in the embodiments of the present application, the electronic device may also be a wearable device. Wearable devices may also be referred to as wearable smart devices, which are a general term for wearable devices that are intelligently designed and developed using wearable technology for daily wear, such as glasses, gloves, watches, clothing, and shoes. A wearable device is a portable device that is worn directly on the body or integrated into the user's clothes or accessories. Wearable devices are not only hardware devices, but also powerful functions achieved through software support, data interaction, and cloud interaction. Broadly speaking, wearable smart devices include full-featured, large-sized, and fully or partially independent of smartphones, such as smart watches or smart glasses, as well as devices that only focus on a certain type of application function and need to be used in conjunction with other devices such as smartphones, such as various types of smart bracelets and smart jewelry for vital sign monitoring.
此外,在本申请实施例中,电子设备还可以是物联网(internet of things,IoT)系统中的电子设备,IoT是未来信息技术发展的重要组成部分,其主要技术特点是将物品通过通信技术与网络连接,从而实现人机互连,物物互连的智能化网络。In addition, in the embodiments of the present application, the electronic device may also be an electronic device in an Internet of Things (IoT) system. IoT is an important part of the future development of information technology. Its main technical feature is to connect objects to the network through communication technology, thereby realizing an intelligent network that interconnects people and machines and things.
本申请实施例中的电子设备也可以称为:用户设备(user equipment,UE)、移动台(mobile station,MS)、移动终端(mobile terminal,MT)、接入终端、用户单元、用户站、移动站、移动台、远方站、远程终端、移动设备、用户终端、终端、无线通信设备、用户代理或用户装置等。The electronic device in the embodiments of the present application may also be referred to as: user equipment (UE), mobile station (MS), mobile terminal (MT), access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication equipment, user agent or user device, etc.
在本申请实施例中,电子设备或各个网络设备包括硬件层、运行在硬件层之上的操作系统层,以及运行在操作系统层上的应用层。该硬件层包括中央处理器(centralprocessing unit,CPU)、内存管理单元(memory management unit,MMU)和内存(也称为主存)等硬件。该操作系统可以是任意一种或多种通过进程(process)实现业务处理的计算机操作系统,例如,Linux操作系统、Unix操作系统、Android操作系统、iOS操作系统或windows操作系统等。该应用层包含浏览器、通讯录、文字处理软件、即时通信软件等应用。In an embodiment of the present application, the electronic device or each network device includes a hardware layer, an operating system layer running on the hardware layer, and an application layer running on the operating system layer. The hardware layer includes hardware such as a central processing unit (CPU), a memory management unit (MMU), and a memory (also called main memory). The operating system can be any one or more computer operating systems that implement business processing through processes, such as Linux operating system, Unix operating system, Android operating system, iOS operating system, or Windows operating system. The application layer includes applications such as browsers, address books, word processing software, and instant messaging software.
电子设备中可以包括多个应用,一些场景中,应用可以访问电子设备的外部存储中的数据或者其他应用的媒体文件等,例如应用可以访问图库中的图片、视频等。An electronic device may include multiple applications. In some scenarios, an application may access data in the external storage of the electronic device or media files of other applications. For example, an application may access pictures and videos in a gallery.
以应用可以访问图库中的图片、视频为例,应用访问图库之前,应用需要申请READ_EXTERNAL_STORAGE存储权限。在系统授予该应用READ_EXTERNAL_STORAGE权限的情况下,应用可以访问图库中的图片、视频等。For example, if an application can access pictures and videos in the gallery, the application needs to apply for the READ_EXTERNAL_STORAGE permission before accessing the gallery. If the system grants the application the READ_EXTERNAL_STORAGE permission, the application can access pictures and videos in the gallery.
一种可能的场景中,从Android系统13版本开始,READ_EXTERNAL_STORAGE权限无效。其中,Android系统13版本对应的API级别为33,也就是说,若应用以33为targetSDK版本,当应用想要从电子设备的外部存储中读取数据或者访问其他应用的媒体文件,应用不再需要申请READ_EXTERNAL_STORAGE权限,而是需要申请下述的一项或多项权限:READ_MEDIA_IMAGES权限、READ_MEDIA_AUDIO权限、或READ_MEDIA_VIDEO权限。In one possible scenario, the READ_EXTERNAL_STORAGE permission is invalid starting from Android version 13. The API level corresponding to Android version 13 is 33, that is, if the application uses 33 as the target SDK version, when the application wants to read data from the external storage of the electronic device or access the media files of other applications, the application no longer needs to apply for the READ_EXTERNAL_STORAGE permission, but needs to apply for one or more of the following permissions: READ_MEDIA_IMAGES permission, READ_MEDIA_AUDIO permission, or READ_MEDIA_VIDEO permission.
然而,若应用的targetSDK版本在Android系统13版本以下,则应用可能无法访问电子设备的外部存储中的数据或者其他应用的媒体文件等。However, if the targetSDK version of the application is lower than Android system version 13, the application may not be able to access data in the external storage of the electronic device or media files of other applications.
如图1所示,以应用访问图库为例,说明不同操作系统(Operating System,OS)版本和应用的不同targetSDK版本中,存储权限及其授予状态的变化。本申请实施例中,OS版本也可以理解为Android系统版本或ROM版本。As shown in Figure 1, taking the application accessing the gallery as an example, the changes in storage permissions and their granting status in different operating system (OS) versions and different targetSDK versions of the application are explained. In the embodiment of the present application, the OS version can also be understood as the Android system version or ROM version.
(1)情况1:Android系统13版本以下,targetSDK版本30以下。(1) Case 1: Android system version 13 or below, targetSDK version 30 or below.
以Android系统12版本,应用的targetSDK版本为29为例,若应用想要访问图库,应用需要申请READ_EXTERNAL_STORAGE权限。Taking Android system version 12 and the application's targetSDK version 29 as an example, if the application wants to access the gallery, the application needs to apply for the READ_EXTERNAL_STORAGE permission.
一些场景中,应用在申请READ_EXTERNAL_STORAGE权限之外,还会预先申请READ_MEDIA_IMAGES权限、READ_MEDIA_AUDIO权限和/或READ_MEDIA_VIDEO权限。为了便于表述,后续将没有预先申请READ_MEDIA_IMAGES权限、READ_MEDIA_AUDIO权限和/或READ_MEDIA_VIDEO权限的应用称为应用A,将预先申请READ_MEDIA_IMAGES权限、READ_MEDIA_AUDIO权限和/或READ_MEDIA_VIDEO权限的应用称为应用B。In some scenarios, in addition to applying for the READ_EXTERNAL_STORAGE permission, an application will also pre-apply for the READ_MEDIA_IMAGES permission, READ_MEDIA_AUDIO permission, and/or READ_MEDIA_VIDEO permission. For the sake of convenience, the application that does not pre-apply for the READ_MEDIA_IMAGES permission, READ_MEDIA_AUDIO permission, and/or READ_MEDIA_VIDEO permission will be referred to as application A, and the application that pre-applies for the READ_MEDIA_IMAGES permission, READ_MEDIA_AUDIO permission, and/or READ_MEDIA_VIDEO permission will be referred to as application B.
然而,在Android系统12版本上,系统中并没有定义READ_MEDIA_IMAGES权限、READ_MEDIA_AUDIO权限和/或READ_MEDIA_VIDEO权限,因此,系统也不会检查这三个权限的授权状态。其中,系统中没有定义的权限可以称为游离权限。当应用A或应用B访问图库时,系统会校验应用A或应用B的READ_EXTERNAL_STORAGE权限,但是不会校验游离权限。However, in the Android 12 version, the system does not define the READ_MEDIA_IMAGES permission, the READ_MEDIA_AUDIO permission, and/or the READ_MEDIA_VIDEO permission, so the system does not check the authorization status of these three permissions. Among them, permissions that are not defined in the system can be called free permissions. When application A or application B accesses the gallery, the system will check the READ_EXTERNAL_STORAGE permission of application A or application B, but will not check the free permissions.
若系统判断应用A或应用B被授予READ_EXTERNAL_STORAGE权限,则可以允许应用A或应用B访问图库中的图片、视频等内容。If the system determines that application A or application B is granted the READ_EXTERNAL_STORAGE permission, application A or application B can be allowed to access pictures, videos and other content in the gallery.
若系统判断应用A或应用B未被授予READ_EXTERNAL_STORAGE权限,则不允许应用A或应用B访问图库中的图片、视频等内容。If the system determines that application A or application B is not granted the READ_EXTERNAL_STORAGE permission, application A or application B is not allowed to access pictures, videos and other content in the gallery.
(2)情况2:Android系统13版本及13版本以上,targetSDK版本30以下。(2) Case 2: Android system version 13 or above, targetSDK version 30 or below.
当系统升级到Android系统13版本时,系统定义了READ_MEDIA_IMAGES权限、READ_MEDIA_AUDIO权限和READ_MEDIA_VIDEO权限。When the system is upgraded to Android version 13, the system defines the READ_MEDIA_IMAGES permission, READ_MEDIA_AUDIO permission, and READ_MEDIA_VIDEO permission.
可以理解的是,不同Android系统版本所对应的API可能会发生变化。为了向前兼容,也就是为了兼容以前的版本,若应用设置的targetSDK版本较低,即使Android系统上有更高的API级别,Android系统还是会使用应用所设置的较低的targetSDK版本对应的API级别。It is understandable that the APIs corresponding to different Android system versions may change. For forward compatibility, that is, for compatibility with previous versions, if the targetSDK version set by the application is lower, even if there is a higher API level on the Android system, the Android system will still use the API level corresponding to the lower targetSDK version set by the application.
示例性的,若应用设置的targetSDK版本对应的API级别为32,Android系统上有更高的API级别,例如API级别为33,但是Android系统仍会使用应用所设置的API级别,即API级别为32。For example, if the targetSDK version set by the application corresponds to API level 32, and there is a higher API level on the Android system, such as API level 33, the Android system will still use the API level set by the application, that is, API level 32.
因此,对于应用的targetSDK版本在30以下的情况,系统还是会判断该应用是否被授予了READ_EXTERNAL_STORAGE权限,而不是判断READ_MEDIA_IMAGES权限、READ_MEDIA_AUDIO权限和/或READ_MEDIA_VIDEO权限。Therefore, if the targetSDK version of an app is lower than 30, the system will still determine whether the app is granted the READ_EXTERNAL_STORAGE permission instead of the READ_MEDIA_IMAGES permission, the READ_MEDIA_AUDIO permission, and/or the READ_MEDIA_VIDEO permission.
由于Android系统13版本中,系统定义了READ_MEDIA_IMAGES权限、READ_MEDIA_AUDIO权限和READ_MEDIA_VIDEO权限。但是一些应用仍然使用的READ_EXTERNAL_STORAGE权限。Since Android 13, the system defines the READ_MEDIA_IMAGES permission, READ_MEDIA_AUDIO permission, and READ_MEDIA_VIDEO permission. However, some apps still use the READ_EXTERNAL_STORAGE permission.
对于申请了READ_EXTERNAL_STORAGE权限的应用A,系统可以给应用A隐式的授予READ_MEDIA_IMAGES权限、READ_MEDIA_AUDIO权限和READ_MEDIA_VIDEO权限。系统还可以将这些隐式存储权限记录为授权状态,例如,授权状态可以标记为“YES”。其中,READ_MEDIA_IMAGES权限、READ_MEDIA_AUDIO权限和READ_MEDIA_VIDEO权限也可以称为隐式存储权限。For application A that has applied for the READ_EXTERNAL_STORAGE permission, the system can implicitly grant application A the READ_MEDIA_IMAGES permission, the READ_MEDIA_AUDIO permission, and the READ_MEDIA_VIDEO permission. The system can also record these implicit storage permissions as authorization status, for example, the authorization status can be marked as "YES". Among them, the READ_MEDIA_IMAGES permission, the READ_MEDIA_AUDIO permission, and the READ_MEDIA_VIDEO permission can also be called implicit storage permissions.
对于应用B,系统不会给应用B授予READ_MEDIA_IMAGES权限、READ_MEDIA_AUDIO权限和/或READ_MEDIA_VIDEO权限。在该情况下,系统会将这些隐式存储权限记录为非授权状态,例如,非授权状态可以标记为“NO”。For application B, the system will not grant the READ_MEDIA_IMAGES permission, the READ_MEDIA_AUDIO permission, and/or the READ_MEDIA_VIDEO permission to application B. In this case, the system will record these implicit storage permissions as unauthorized states, for example, the unauthorized state can be marked as "NO".
当应用访问图库时,由于应用A或应用B的targetSDK版本在30以下,系统会校验应用A或应用B的READ_EXTERNAL_STORAGE权限,而不会校验应用A或应用B的READ_MEDIA_IMAGES权限等。也就是说,对于应用未被授予READ_MEDIA_IMAGES权限、READ_MEDIA_AUDIO权限和/或READ_MEDIA_VIDEO权限的情况,应用仍可以通过READ_EXTERNAL_STORAGE权限访问图库。When an app accesses the gallery, since the targetSDK version of app A or app B is below 30, the system will check the READ_EXTERNAL_STORAGE permission of app A or app B, but will not check the READ_MEDIA_IMAGES permission of app A or app B. In other words, if an app is not granted the READ_MEDIA_IMAGES permission, the READ_MEDIA_AUDIO permission, and/or the READ_MEDIA_VIDEO permission, the app can still access the gallery through the READ_EXTERNAL_STORAGE permission.
若系统判断应用A或应用B被授予READ_EXTERNAL_STORAGE权限,则可以允许应用A或应用B访问图库中的图片、视频等内容。If the system determines that application A or application B is granted the READ_EXTERNAL_STORAGE permission, application A or application B can be allowed to access pictures, videos and other content in the gallery.
若系统判断应用A或应用B未被授予READ_EXTERNAL_STORAGE权限,则不允许应用A或应用B访问图库中的图片、视频等内容。If the system determines that application A or application B is not granted the READ_EXTERNAL_STORAGE permission, application A or application B is not allowed to access pictures, videos and other content in the gallery.
(3)情况3:Android系统13版本,targetSDK版本30-32。(3) Case 3: Android system version 13, targetSDK version 30-32.
对于应用的targetSDK版本为30、31或32的情况,系统会校验应用的READ_MEDIA_IMAGES权限、READ_MEDIA_AUDIO权限和/或READ_MEDIA_VIDEO权限。If the target SDK version of your app is 30, 31, or 32, the system checks your app's READ_MEDIA_IMAGES permission, READ_MEDIA_AUDIO permission, and/or READ_MEDIA_VIDEO permission.
对于应用A,系统可以给应用隐式的授予READ_MEDIA_IMAGES权限、READ_MEDIA_AUDIO权限和/或READ_MEDIA_VIDEO权限,并将这些隐式授权的权限记录为授权状态。For application A, the system may implicitly grant the application the READ_MEDIA_IMAGES permission, the READ_MEDIA_AUDIO permission, and/or the READ_MEDIA_VIDEO permission, and record these implicitly granted permissions as the authorization status.
对于应用B,系统不会授予应用READ_MEDIA_IMAGES权限、READ_MEDIA_AUDIO权限和/或READ_MEDIA_VIDEO权限。在该情况下,系统会将这些隐式授权的权限记录为非授权状态。For application B, the system does not grant the application READ_MEDIA_IMAGES permission, READ_MEDIA_AUDIO permission, and/or READ_MEDIA_VIDEO permission. In this case, the system records these implicitly authorized permissions as unauthorized.
当应用访问图库时,系统会校验应用的READ_MEDIA_IMAGES权限。When an app accesses the gallery, the system checks the app's READ_MEDIA_IMAGES permission.
若系统判断应用A或应用B被授予READ_MEDIA_IMAGES权限,则可以允许应用A或应用B访问图库中的图片、视频等内容。If the system determines that application A or application B is granted the READ_MEDIA_IMAGES permission, application A or application B can be allowed to access pictures, videos and other content in the gallery.
若系统判断应用A或应用B未被授予READ_MEDIA_IMAGES权限,则不允许应用A或应用B访问图库中的图片、视频等内容。If the system determines that application A or application B is not granted the READ_MEDIA_IMAGES permission, application A or application B is not allowed to access pictures, videos and other content in the gallery.
有鉴于此,本申请实施例提供的权限管理方法,系统可以对应用所申请的READ_MEDIA_IMAGES权限、READ_MEDIA_AUDIO权限和/或READ_MEDIA_VIDEO权限状态进行判断。若READ_MEDIA_IMAGES权限、READ_MEDIA_AUDIO权限和/或READ_MEDIA_VIDEO权限是未授权状态,且应用的targetSDK版本在Android系统6版本到Android系统12版本之间,系统可以为该应用进行二次授权。这样,当该应用访问电子设备外部存储中读取数据时,系统可以判断应用被授予READ_MEDIA_IMAGES权限等,进而可以允许应用访问存储中的数据。In view of this, the permission management method provided in the embodiment of the present application can determine the status of the READ_MEDIA_IMAGES permission, READ_MEDIA_AUDIO permission and/or READ_MEDIA_VIDEO permission applied for by the application. If the READ_MEDIA_IMAGES permission, READ_MEDIA_AUDIO permission and/or READ_MEDIA_VIDEO permission is unauthorized, and the targetSDK version of the application is between Android system version 6 and Android system version 12, the system can perform secondary authorization for the application. In this way, when the application accesses the external storage of the electronic device to read data, the system can determine that the application is granted READ_MEDIA_IMAGES permission, etc., and then allow the application to access the data in the storage.
示例性的,图2示出了电子设备的结构示意图。Exemplarily, FIG2 shows a schematic structural diagram of an electronic device.
电子设备可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。The electronic device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
可以理解的是,本发明实施例示意的结构并不构成对电子设备的具体限定。在本申请另一些实施例中,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以包括硬件,软件或软件和硬件的组合实现。It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The illustrated components may be implemented by hardware, software, or a combination of software and hardware.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processingunit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and/or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated into one or more processors. The controller may generate an operation control signal according to the instruction opcode and the timing signal to complete the control of fetching and executing instructions.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从上述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
可以理解的是,本发明实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备的结构限定。在本申请另一些实施例中,电子设备也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation of the electronic device. In other embodiments of the present application, the electronic device may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
内部存储器121可以用于存储计算机可执行程序代码,可执行程序代码包括指令。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序等。存储数据区可存储电子设备使用过程中所创建的数据等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在内部存储器121的指令,和/或存储在设置于处理器中的存储器的指令,执行电子设备的各种功能应用以及数据处理。The internal memory 121 can be used to store computer executable program codes, and the executable program codes include instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, at least one application required for a function, etc. The data storage area may store data created during the use of the electronic device, etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the electronic device by running instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
显示屏194用于显示图像,视频等。显示屏194包括显示面板。在一些实施例中,电子设备可以包括1个或N个显示屏194,N为大于1的正整数。电子设备通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。例如本申请实施例中,显示屏用于显示图库等应用中的照片或视频。The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. In some embodiments, the electronic device may include 1 or N display screens 194, where N is a positive integer greater than 1. The electronic device implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. For example, in an embodiment of the present application, the display screen is used to display photos or videos in applications such as a gallery.
图3是本申请实施例的电子设备的软件结构框图。分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为五层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。FIG3 is a software structure diagram of an electronic device of an embodiment of the present application. The layered architecture divides the software into several layers, each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into five layers, from top to bottom, namely, the application layer, the application framework layer, the Android runtime (Android runtime) and the system library, and the kernel layer.
应用程序层也可以称为应用层,应用层可以包括一系列应用程序包。如图3所示,应用程序包可以包括图库、视频、日历、相机、游戏、备忘录等应用程序。应用程序可以包括系统应用和三方应用。The application layer can also be called the application layer, and the application layer can include a series of application packages. As shown in Figure 3, the application package can include applications such as gallery, video, calendar, camera, game, memo, etc. Applications can include system applications and third-party applications.
应用程序框架层也可以称为Framework层,Framework层可以为应用层的应用程序提供API和编程框架。Framework层可以包括一些预先定义的函数。The application framework layer can also be called the Framework layer. The Framework layer can provide APIs and programming frameworks for the application layer applications. The Framework layer can include some predefined functions.
如图3所示,Framework层可以包括包管理器服务(package manager service,PMS)、窗口管理器、资源管理器、内容提供器和视图系统等。As shown in FIG. 3 , the Framework layer may include a package manager service (PMS), a window manager, a resource manager, a content provider, a view system, and the like.
PMS可以负责在电子设备上安装、管理和卸载应用等。当某个应用被安装时,PMS可以识别应用的所有组件,例如组件包括活动组件Activity、服务组件Service和广播组件Broadcast Receiver等,并为这些组件分配相应的权限。PMS还可以检测已安装应用的运行状态,确保应用的完整性和安全性。PMS can be responsible for installing, managing, and uninstalling applications on electronic devices. When an application is installed, PMS can identify all components of the application, such as activity components, service components, and broadcast components, and assign corresponding permissions to these components. PMS can also detect the running status of installed applications to ensure the integrity and security of the applications.
Android runtime包括核心库和虚拟机。Android runtime负责安卓系统的控制和管理。Android runtime includes core libraries and virtual machines. Android runtime is responsible for the control and management of the Android system.
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.
应用层和Framework层运行在虚拟机中。虚拟机将应用层和Framework层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。例如本申请实施例中,虚拟机可以用于校验应用所申请的权限、访问图库等应用、系统版本升级等功能。The application layer and the framework layer run in a virtual machine. The virtual machine executes the java files of the application layer and the framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection. For example, in the embodiment of the present application, the virtual machine can be used to verify the permissions applied for by the application, access applications such as the gallery, and upgrade the system version.
系统库也可以称为Native层,Native层可以包括多个功能模块。例如:媒体库、函数库、图形处理库等。The system library can also be called the Native layer, which can include multiple functional modules, such as the media library, function library, and graphics processing library.
内核层是硬件和软件之间的层。内核层可以包括显示驱动、摄像头驱动、音频驱动、电池驱动、CPU驱动等。The kernel layer is the layer between hardware and software. The kernel layer may include display driver, camera driver, audio driver, battery driver, CPU driver, etc.
需要说明的是,本申请实施例仅以安卓系统举例来说明,在其他操作系统中(例如Windows系统,IOS系统等),只要各个功能模块实现的功能和本申请的实施例类似,也能实现本申请的方案。It should be noted that the embodiments of the present application are only illustrated using the Android system as an example. In other operating systems (such as Windows system, IOS system, etc.), as long as the functions implemented by each functional module are similar to those in the embodiments of the present application, the solutions of the present application can also be implemented.
图4示出了权限管理方法的流程图。FIG4 shows a flow chart of a rights management method.
S401、运行在S版本的应用。S401. Application running in S version.
示例性的,本申请实施例以运行在S版本的应用为例进行说明。其中,S版本也可以理解为Android系统12版本。Exemplarily, the embodiment of the present application is described by taking an application running in version S as an example. Among them, version S can also be understood as version 12 of the Android system.
S402、系统记录应用权限。S402: The system records application permissions.
对于运行在Android系统12版本的应用,系统可以记录应用所申请的存储权限的状态,例如包括READ_MEDIA_IMAGES权限、READ_MEDIA_AUDIO权限和/或READ_MEDIA_VIDEO权限等游离权限的状态。For applications running on Android system version 12, the system can record the status of storage permissions applied for by the application, such as the status of free permissions such as READ_MEDIA_IMAGES permission, READ_MEDIA_AUDIO permission and/or READ_MEDIA_VIDEO permission.
S403、应用访问图库。S403, the application accesses the gallery.
S404、校验应用申请的存储权限。S404: Verify the storage permission applied for by the application.
当应用访问图库时,系统可以校验应用申请的存储权限。其中,应用的targetSDK版本不同,所校验的存储权限也不同,具体校验应用申请的存储权限的过程,可以参照上述图3对应的实施例中的相关描述,不再赘述。When an application accesses the gallery, the system can verify the storage permission applied by the application. The storage permission verified varies depending on the targetSDK version of the application. The specific process of verifying the storage permission applied by the application can refer to the relevant description in the embodiment corresponding to FIG. 3 above, which will not be repeated here.
S405、校验是否成功。S405: Verify whether it is successful.
若存储权限校验成功,则应用可以访问图库,对应步骤S406;若存储权限校验失败,应用会访问图库失败,对应步骤S407。If the storage permission check succeeds, the application can access the gallery, corresponding to step S406; if the storage permission check fails, the application will fail to access the gallery, corresponding to step S407.
可以理解的是,在访问图库时,对存储权限校验,可以提高访问图库中数据的安全性,从而可以更好的保护图库中的数据,提升用户体验。It is understandable that when accessing the gallery, checking the storage permissions can improve the security of accessing the data in the gallery, thereby better protecting the data in the gallery and improving the user experience.
S406、应用可以访问图库。S406: The application can access the gallery.
S407、应用访问图库失败。S407: The application fails to access the gallery.
S408、系统从S版本升级到T版本。S408. The system is upgraded from version S to version T.
T版本也可以理解为Android系统13版本。系统从S版本升级到T版本可以理解为系统从Android系统12版本升级到Android系统13版本。The T version can also be understood as Android system version 13. Upgrading the system from S version to T version can be understood as upgrading the system from Android system version 12 to Android system version 13.
当系统从Android系统12版本升级到Android系统13版本时,可以执行步骤S409。When the system is upgraded from Android system version 12 to Android system version 13, step S409 can be executed.
可以的实现中,当系统升级到Android系统13版本时,系统可以在首次升级开机过程中,执行步骤S409,对未授权的READ_MEDIA_IMAGES权限、READ_MEDIA_AUDIO权限和/或READ_MEDIA_VIDEO权限进行二次授权。当然,系统也可以在其他时机执行二次授权的流程,例如,其他时机可以包括应用升级版本时或者响应于用户同意授权READ_MEDIA_IMAGES权限、READ_MEDIA_AUDIO权限和/或READ_MEDIA_VIDEO权限的操作时,具体的二次授权时机,本申请实施例不作限定。In a possible implementation, when the system is upgraded to Android system version 13, the system can execute step S409 during the first upgrade and startup process to re-authorize the unauthorized READ_MEDIA_IMAGES permission, READ_MEDIA_AUDIO permission and/or READ_MEDIA_VIDEO permission. Of course, the system can also perform the secondary authorization process at other times. For example, other times may include when the application is upgraded or in response to the user's consent to authorize the READ_MEDIA_IMAGES permission, READ_MEDIA_AUDIO permission and/or READ_MEDIA_VIDEO permission. The specific secondary authorization time is not limited in the embodiments of this application.
S409、系统授权应用存储权限。S409: The system authorizes the application to store permissions.
系统Framework层的包管理器服务(package manager service,PMS)可以用于为应用授权存储权限。The package manager service (PMS) at the system Framework layer can be used to authorize storage permissions for applications.
S410、系统检测应用是否申请隐式存储权限。S410: The system detects whether the application applies for implicit storage permission.
PMS还可以用于检测应用是否申请隐式存储权限。PMS can also be used to detect whether an application applies for implicit storage permissions.
若应用未申请READ_MEDIA_IMAGES权限、READ_MEDIA_AUDIO权限和/或READ_MEDIA_VIDEO权限,则可以执行步骤S411。If the application does not apply for the READ_MEDIA_IMAGES permission, the READ_MEDIA_AUDIO permission and/or the READ_MEDIA_VIDEO permission, step S411 may be executed.
若应用申请了READ_MEDIA_IMAGES权限、READ_MEDIA_AUDIO权限和/或READ_MEDIA_VIDEO权限,则可以执行步骤S412。If the application has applied for the READ_MEDIA_IMAGES permission, the READ_MEDIA_AUDIO permission and/or the READ_MEDIA_VIDEO permission, step S412 may be executed.
S411、授权。S411. Authorization.
系统可以给应用授予READ_MEDIA_IMAGES权限、READ_MEDIA_AUDIO权限和/或READ_MEDIA_VIDEO权限。The system can grant an application the READ_MEDIA_IMAGES permission, the READ_MEDIA_AUDIO permission, and/or the READ_MEDIA_VIDEO permission.
S412、不授权。S412, not authorized.
系统不给应用授予READ_MEDIA_IMAGES权限、READ_MEDIA_AUDIO权限和/或READ_MEDIA_VIDEO权限。The system does not grant the app the READ_MEDIA_IMAGES permission, the READ_MEDIA_AUDIO permission, and/or the READ_MEDIA_VIDEO permission.
可以理解的是,系统还可以执行步骤S413,记录授予应用的权限。It is understandable that the system may also execute step S413 to record the permissions granted to the application.
S413、是否hota升级场景,targetSDK版本在M版本到T版本之间,是否为隐式存储权限。S413: Whether it is a hota upgrade scenario, the targetSDK version is between M and T, and whether it is an implicit storage permission.
hota升级也可以称为控件下载(over the air,OTA)升级、在线升级或云升级。hota升级可以用于电子设备的系统版本升级,也可以理解为Android系统版本的升级。Hota upgrade can also be called control download (over the air, OTA) upgrade, online upgrade or cloud upgrade. Hota upgrade can be used for system version upgrade of electronic equipment, and can also be understood as Android system version upgrade.
可能的实现中,系统可以调用相关接口判断应用是否需要进行hota升级。示例性的,若系统检测到云服务器中包括比当前应用版本更高的版本,则可以进行hota升级。In a possible implementation, the system may call a related interface to determine whether the application needs to be upgraded to a hota version. For example, if the system detects that the cloud server includes a version higher than the current application version, a hota upgrade may be performed.
系统可以判断是否需要为隐式存储权限进行二次授权。示例性的,若系统为hota升级场景,targetSDK版本在Android系统6版本到Android系统12版本之间,且为隐式存储权限,则系统在进行hota升级的过程中,可以为隐式存储权限进行二次授权。The system can determine whether a second authorization is required for the implicit storage permission. For example, if the system is a hota upgrade scenario, the targetSDK version is between Android system version 6 and Android system version 12, and it is an implicit storage permission, the system can perform a second authorization for the implicit storage permission during the hota upgrade process.
其中,Android系统6版本可以理解为M版本,Android系统12版本可以理解为T版本。targetSDK版本在Android系统6版本到Android系统12版本之间,也可以理解为API级别为23到32之间。隐式存储权限可以包括READ_MEDIA_IMAGES权限、READ_MEDIA_AUDIO权限和READ_MEDIA_VIDEO权限。Among them, Android system version 6 can be understood as M version, and Android system version 12 can be understood as T version. The targetSDK version is between Android system version 6 and Android system version 12, which can also be understood as API level between 23 and 32. Implicit storage permissions can include READ_MEDIA_IMAGES permission, READ_MEDIA_AUDIO permission, and READ_MEDIA_VIDEO permission.
S414、hota升级。S414, hota upgrade.
可能的实现中,云服务器中可以包括更高版本的系统升级包,系统可以调用下载升级包的接口进行hota升级。具体hota升级的方式,本申请实施例不作限定。In a possible implementation, the cloud server may include a higher version of the system upgrade package, and the system may call an interface for downloading the upgrade package to perform a hota upgrade. The specific hota upgrade method is not limited in the embodiment of the present application.
S415、遍历系统隐式授权列表,对于应用申请了隐式授权的权限,进行授权。S415: traverse the system implicit authorization list, and authorize the permissions that the application has applied for implicit authorization.
可以理解的是,系统中可以创建有隐式授权列表,该隐式授权列表中可以包括一个或多个需要隐式授权的权限,例如需要隐式授权的权限可以包括READ_MEDIA_IMAGES权限、READ_MEDIA_AUDIO权限和/或READ_MEDIA_VIDEO权限等。系统可以遍历隐式授权列表,若应用申请了隐式授权列表中的一个或多个需要隐式授权的权限,则系统可以为该应用所申请的一个或多个需要隐式授权的权限进行授权,并将各个权限的授权状态更新到系统中。It is understandable that an implicit authorization list may be created in the system, and the implicit authorization list may include one or more permissions that require implicit authorization, for example, permissions that require implicit authorization may include READ_MEDIA_IMAGES permission, READ_MEDIA_AUDIO permission, and/or READ_MEDIA_VIDEO permission, etc. The system may traverse the implicit authorization list, and if an application applies for one or more permissions that require implicit authorization in the implicit authorization list, the system may authorize the one or more permissions that require implicit authorization applied for by the application, and update the authorization status of each permission to the system.
可能的实现中,系统可以在列表、map等数据结构中保存应用的隐式授权信息,具体保存信息的方式,本申请实施例不作限定。In a possible implementation, the system can save the implicit authorization information of the application in a data structure such as a list or a map. The specific method of saving the information is not limited in the embodiment of the present application.
系统可以在应用的隐式存储权限未授权的情况下,为应用的隐式存储权限进行二次授权。这样,当该应用访问图库时,系统会校验READ_MEDIA_IMAGES权限,若系统判断应用被授予READ_MEDIA_IMAGES权限,从而可以允许应用访问图库中的图片等内容。The system can re-authorize the implicit storage permission of the application if the implicit storage permission of the application is not authorized. In this way, when the application accesses the gallery, the system will check the READ_MEDIA_IMAGES permission. If the system determines that the application is granted the READ_MEDIA_IMAGES permission, the application can be allowed to access the pictures and other content in the gallery.
可以理解的是,上述实施例以应用访问图库中的图片、视频等内容为例进行说明,本申请实施例的权限管理方法还可以应用于应用访问视频应用、文档应用等场景中,也就是说,可以应用于需要申请READ_MEDIA_IMAGES权限、READ_MEDIA_AUDIO权限、和/或READ_MEDIA_VIDEO权限的场景。此外,本申请实施例的权限管理方法还可以应用于其他随系统版本变化导致申请权限发生变化的场景,本申请实施例不作限定。It is understandable that the above embodiment is explained by taking the application accessing the pictures, videos and other contents in the gallery as an example. The permission management method of the embodiment of the present application can also be applied to the scene where the application accesses the video application, the document application and the like, that is, it can be applied to the scene where the READ_MEDIA_IMAGES permission, the READ_MEDIA_AUDIO permission, and/or the READ_MEDIA_VIDEO permission need to be applied. In addition, the permission management method of the embodiment of the present application can also be applied to other scenes where the application permission changes with the change of the system version, and the embodiment of the present application is not limited.
下面通过具体的实施例对本申请实施例的方法进行详细说明。下面的实施例可以相互结合或独立实施,对于相同或相似的概念或过程可能在某些实施例中不再赘述。The following is a detailed description of the method of the embodiment of the present application through specific embodiments. The following embodiments can be combined with each other or implemented independently, and the same or similar concepts or processes may not be repeated in some embodiments.
图5示出了本申请实施例的权限管理方法。方法包括:FIG5 shows a method for managing rights according to an embodiment of the present application. The method includes:
S501、响应于电子设备的系统版本从第一系统版本升级到第二系统版本,将第一应用的第一权限设置为不授权状态,其中,第一应用的应用版本为第一应用版本,在第一应用版本中第一应用申请有第一权限,第一系统版本中未定义有第一权限,第二系统版本中定义有第一权限。S501. In response to a system version of the electronic device being upgraded from a first system version to a second system version, setting a first permission of a first application to an unauthorized state, wherein the application version of the first application is a first application version, in the first application version, the first application applies for a first permission, the first system version does not define the first permission, and the second system version defines the first permission.
本申请实施例中,电子设备的系统版本可以理解为电子设备的操作系统的版本,也可以理解为Android系统版本或ROM版本,本申请实施例不作限定。In the embodiment of the present application, the system version of the electronic device can be understood as the version of the operating system of the electronic device, and can also be understood as the Android system version or ROM version, which is not limited in the embodiment of the present application.
第一权限可以理解为在不同系统版本上有不同定义的权限,也可以理解为上述实施例中的游离权限。例如第一权限可以为上述图1对应的实施例中的READ_MEDIA_IMAGES权限、READ_MEDIA_AUDIO权限和/或READ_MEDIA_VIDEO权限。示例性的,在Android系统13版本中,可以定义有READ_MEDIA_IMAGES权限、READ_MEDIA_AUDIO权限和/或READ_MEDIA_VIDEO权限。而在Android系统13以下的版本中,没有定义READ_MEDIA_IMAGES权限、READ_MEDIA_AUDIO权限和/或READ_MEDIA_VIDEO权限。The first permission can be understood as a permission with different definitions on different system versions, or it can be understood as a free permission in the above embodiment. For example, the first permission can be the READ_MEDIA_IMAGES permission, READ_MEDIA_AUDIO permission and/or READ_MEDIA_VIDEO permission in the embodiment corresponding to Figure 1 above. Exemplarily, in the Android system 13 version, READ_MEDIA_IMAGES permission, READ_MEDIA_AUDIO permission and/or READ_MEDIA_VIDEO permission can be defined. In versions below Android system 13, READ_MEDIA_IMAGES permission, READ_MEDIA_AUDIO permission and/or READ_MEDIA_VIDEO permission are not defined.
第一应用可以为电子设备中的任一应用,第一应用可以理解为申请有第一权限的应用。The first application may be any application in the electronic device, and the first application may be understood as an application applying for the first permission.
第一系统版本可以理解为未定义有第一权限的系统版本,示例性的,以第一权限为READ_MEDIA_IMAGES权限、READ_MEDIA_AUDIO权限和/或READ_MEDIA_VIDEO权限为例,则第一系统版本可以理解为Android系统13以下的版本,例如第一系统版本可以包括S版本。The first system version can be understood as a system version that does not define the first permission. For example, taking the first permission as READ_MEDIA_IMAGES permission, READ_MEDIA_AUDIO permission and/or READ_MEDIA_VIDEO permission, the first system version can be understood as a version below Android system 13. For example, the first system version can include the S version.
第二系统版本可以理解为定义有第一权限的系统版本,示例性的,以第一权限为READ_MEDIA_IMAGES权限、READ_MEDIA_AUDIO权限和/或READ_MEDIA_VIDEO权限为例,则第二系统版本可以理解为Android系统13的版本,例如第二系统版本可以包括T版本。The second system version can be understood as a system version that defines the first permission. For example, taking the first permission as READ_MEDIA_IMAGES permission, READ_MEDIA_AUDIO permission and/or READ_MEDIA_VIDEO permission, the second system version can be understood as the version of Android system 13. For example, the second system version can include version T.
第一应用版本可以理解为targetSDK版本,第一应用版本可以包括在Android系统13以下的版本中,电子设备的系统不需要对第一权限校验的版本。可以理解的是,电子设备的系统版本和第一应用版本可以不对应,且第一应用版本小于电子设备的系统版本。这时,为了向前兼容,系统可以不对第一应用版本中第一应用申请的第一权限校验。The first application version can be understood as the targetSDK version, and the first application version can be included in versions below Android system 13, and the system of the electronic device does not need a version for the first permission check. It is understandable that the system version of the electronic device and the first application version may not correspond, and the first application version is smaller than the system version of the electronic device. At this time, in order to be forward compatible, the system may not check the first permission applied for by the first application in the first application version.
示例性的,上述图3对应的实施例中,在Android系统13以下的版本;例如在Android系统6版本到Android系统12版本之间,第一应用版本可以包括targetSDK版本在30以下的版本。Exemplarily, in the embodiment corresponding to the above-mentioned Figure 3, in versions below Android system 13; for example, between Android system version 6 and Android system version 12, the first application version may include a version with a targetSDK version below 30.
S502、在电子设备的系统版本为第二系统版本的情况下,响应于第一应用的应用版本从第一应用版本升级到第二应用版本,将第一应用的第一权限设置为授权状态。S502: When the system version of the electronic device is the second system version, in response to the application version of the first application being upgraded from the first application version to the second application version, setting the first permission of the first application to an authorized state.
本申请实施例中,第二应用版本可以包括在Android系统13及13以上的版本中,电子设备的系统需要对第一权限校验的版本。可以理解的是,电子设备的系统版本和第二应用版本可以不对应,且在第二应用版本中第一应用申请有第一权限。这时,系统需要对第二应用版本中第一应用申请的第一权限校验。In the embodiment of the present application, the second application version may be included in the Android system 13 and above, and the system of the electronic device needs to verify the version of the first permission. It is understandable that the system version of the electronic device and the second application version may not correspond, and the first application applies for the first permission in the second application version. At this time, the system needs to verify the first permission applied by the first application in the second application version.
示例性的,上述图3对应的实施例中,在Android系统13及13以上的版本中,第二应用版本可以包括targetSDK版本为30、31、32的版本。Exemplarily, in the embodiment corresponding to FIG. 3 above, in Android system versions 13 and above, the second application version may include versions with targetSDK versions 30, 31, and 32.
系统可以对第一应用所申请的第一权限的授权状态进行判断。若第一权限是未授权状态,且第一应用的targetSDK版本在Android系统6版本到Android系统12版本之间,系统可以为第一应用进行二次授权。这样,当第一应用访问电子设备外部存储中读取数据时,系统可以判断应用被授予第一权限,进而可以允许应用访问存储中的数据。The system can determine the authorization status of the first permission applied for by the first application. If the first permission is in an unauthorized state and the targetSDK version of the first application is between Android system version 6 and Android system version 12, the system can perform secondary authorization for the first application. In this way, when the first application accesses the external storage of the electronic device to read data, the system can determine that the application is granted the first permission, and then allow the application to access the data in the storage.
可选的,在图5对应的实施例的基础上,第二应用版本为预设版本区间内的软件开发工具包SDK版本。Optionally, based on the embodiment corresponding to FIG. 5 , the second application version is a software development kit SDK version within a preset version range.
本申请实施例中,预设版本区间可以包括上述实施例中targetSDK版本为30、31、32的版本。第二应用版本可以参照上述步骤S502中的相关描述,不再赘述。In the embodiment of the present application, the preset version range may include the targetSDK versions 30, 31, and 32 in the above embodiment. The second application version may refer to the relevant description in the above step S502, which will not be repeated here.
可以理解的是,系统为第二应用版本中第一应用所申请的第一权限再次进行授权,这样,当第一应用访问电子设备外部存储中的数据时,可以判断第一应用被授予第一权限,从而不影响应用的运行,使第一应用可以正常访问存储中的数据,提升用户体验。It can be understood that the system re-authorizes the first permission applied for by the first application in the second application version. In this way, when the first application accesses data in the external storage of the electronic device, it can be determined that the first application is granted the first permission, which will not affect the operation of the application, allowing the first application to normally access the data in the storage, thereby improving the user experience.
可选的,在图5对应的实施例的基础上,电子设备中保存有预设列表,预设列表中包括第一权限,将第一应用的第一权限设置为授权状态之前,还可以包括:判断第一应用是否申请有预设列表中的权限;将第一应用的第一权限设置为授权状态,可以包括:在第一应用申请了预设列表中的第一权限的情况下,将第一应用的第一权限设置为授权状态。Optionally, based on the embodiment corresponding to Figure 5, a preset list is saved in the electronic device, the preset list includes the first permission, and before setting the first permission of the first application to the authorized state, it may also include: determining whether the first application has applied for the permission in the preset list; setting the first permission of the first application to the authorized state may include: if the first application has applied for the first permission in the preset list, setting the first permission of the first application to the authorized state.
本申请实施例中,预设列表可以理解为上述图4对应的实施例中的隐式授权列表。具体判断第一应用是否申请有预设列表中的权限的过程可以参照上述图4对应的实施例中步骤S415的相关描述,不再赘述。In the embodiment of the present application, the preset list can be understood as the implicit authorization list in the embodiment corresponding to Figure 4. The specific process of determining whether the first application has applied for permissions in the preset list can refer to the relevant description of step S415 in the embodiment corresponding to Figure 4, which will not be repeated here.
系统可以在第一应用的隐式存储权限未授权的情况下,为第一应用的隐式存储权限进行二次授权。这样,当第一应用访问电子设备外部存储中的数据时,系统会校验隐式存储权限,若系统判断第一应用被授予隐式存储权限,则第一应用可以访问存储中的数据,使得第一应用可以正常运行。The system can re-authorize the implicit storage permission of the first application when the implicit storage permission of the first application is not authorized. In this way, when the first application accesses data in the external storage of the electronic device, the system will check the implicit storage permission. If the system determines that the first application is granted the implicit storage permission, the first application can access the data in the storage, so that the first application can run normally.
可选的,在图5对应的实施例的基础上,方法还可以包括:第一应用请求访问第二应用的数据;在第一应用的应用版本为第二应用版本的情况下,对第一应用的第一权限进行校验;在第一权限为授权状态的情况下,第一应用访问第二应用的数据。Optionally, based on the embodiment corresponding to Figure 5, the method may also include: the first application requests access to data of the second application; when the application version of the first application is the second application version, verifying the first permission of the first application; when the first permission is in an authorized state, the first application accesses the data of the second application.
本申请实施例中,第二应用可以理解为需要申请第一权限才能访问第二应用的数据的应用。例如,第二应用可以包括图库应用、音频应用、视频应用、文件管理应用等,对于第二应用的具体类型,本申请实施例不作限定。第二应用的数据可以包括图片、音频、视频、文件等,本申请实施例不作限定。In the embodiment of the present application, the second application can be understood as an application that needs to apply for the first permission to access the data of the second application. For example, the second application may include a gallery application, an audio application, a video application, a file management application, etc., and the specific type of the second application is not limited in the embodiment of the present application. The data of the second application may include pictures, audio, video, files, etc., which are not limited in the embodiment of the present application.
在电子设备的系统版本为第二系统版本,第一应用的应用版本为第二应用版本的情况下,第一应用访问第二应用的数据时,需要申请第一权限。在第一权限为授权状态的情况下,第一应用才可以访问第二应用的数据。这样,提高了应用之间访问数据的安全性,从而可以更好的保护第二应用的数据,提升用户体验。When the system version of the electronic device is the second system version and the application version of the first application is the second application version, the first application needs to apply for the first permission when accessing the data of the second application. The first application can access the data of the second application only when the first permission is in the authorized state. In this way, the security of data access between applications is improved, so that the data of the second application can be better protected and the user experience can be improved.
可选的,在图5对应的实施例的基础上,在第一应用版本和第二应用版本中第一应用均还申请有第二权限,方法还可以包括:第一应用请求访问第二应用的数据;在第一应用的应用版本为第一应用版本的情况下,对第一应用的第二权限进行校验;在第二权限为授权状态的情况下,第一应用访问第二应用的数据。Optionally, based on the embodiment corresponding to Figure 5, the first application also applies for the second permission in both the first application version and the second application version, and the method may also include: the first application requests access to data of the second application; when the application version of the first application is the first application version, the second permission of the first application is verified; when the second permission is in an authorized state, the first application accesses the data of the second application.
本申请实施例中,第二权限可以包括上述图1对应的实施例中的READ_EXTERNAL_STORAGE权限。当第一应用访问第二应用的数据时,In the embodiment of the present application, the second permission may include the READ_EXTERNAL_STORAGE permission in the embodiment corresponding to FIG. 1 above. When the first application accesses the data of the second application,
在电子设备的系统版本为第一系统版本或第二系统版本,第一应用的应用版本为第一应用版本的情况下,第一应用访问第二应用的数据时,需要申请第二权限。在第二权限为授权状态的情况下,第一应用才可以访问第二应用的数据。When the system version of the electronic device is the first system version or the second system version and the application version of the first application is the first application version, the first application needs to apply for the second permission when accessing the data of the second application. The first application can access the data of the second application only when the second permission is in the authorized state.
这样,提高了应用之间访问数据的安全性,从而可以更好的保护第二应用的数据,提升用户体验。In this way, the security of data access between applications is improved, so that the data of the second application can be better protected and the user experience is improved.
可选的,在图5对应的实施例的基础上,第一权限包括下述的一项或多项:READ_MEDIA_IMAGES权限、READ_MEDIA_AUDIO权限或READ_MEDIA_VIDEO权限,第二权限包括:READ_EXTERNAL_STORAGE权限。Optionally, based on the embodiment corresponding to FIG. 5 , the first permission includes one or more of the following: READ_MEDIA_IMAGES permission, READ_MEDIA_AUDIO permission or READ_MEDIA_VIDEO permission, and the second permission includes: READ_EXTERNAL_STORAGE permission.
本申请实施例中,第一权限和第二权限的功能可以参照上述实施例中的描述,不再赘述。In the embodiment of the present application, the functions of the first permission and the second permission can refer to the description in the above embodiment and will not be repeated here.
电子设备通过控制第一权限和/或第二权限等授权状态,可以更好的控制应用之间访问数据的安全性,合理地为第一应用开放第一权限和/或第二权限,这样,可以使得第一应用正常运行。By controlling the authorization status of the first permission and/or the second permission, the electronic device can better control the security of data access between applications and reasonably open the first permission and/or the second permission for the first application, so that the first application can run normally.
需要说明的是,本申请所涉及的用户信息(包括但不限于用户设备信息、用户个人信息等)和数据(包括但不限于用于分析的数据、存储的数据、展示的数据等),均为经用户授权或者经过各方充分授权的信息和数据,并且相关数据的收集、使用和处理需要遵守相关国家和地区的相关法律法规和标准,并提供有相应的操作入口,供用户选择授权或者拒绝。It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
上述主要从方法的角度对本申请实施例提供的方案进行了介绍。为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的方法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. In order to realize the above functions, it includes hardware structures and/or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the method steps of each example described in the embodiment disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present application.
本申请实施例可以根据上述方法示例对实现该方法的装置进行功能模块的划分,例如可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。The embodiment of the present application can divide the functional modules of the device implementing the method according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.
如图6示为本申请实施例提供的一种芯片的结构示意图。芯片600包括一个或两个以上(包括两个)处理器601、通信线路602、通信接口603和存储器604。FIG6 is a schematic diagram of the structure of a chip provided in an embodiment of the present application. The chip 600 includes one or more (including two) processors 601 , a communication line 602 , a communication interface 603 and a memory 604 .
在一些实施方式中,存储器604存储了如下的元素:可执行模块或者数据结构,或者他们的子集,或者他们的扩展集。In some implementations, the memory 604 stores the following elements: executable modules or data structures, or a subset thereof, or an extended set thereof.
上述本申请实施例描述的方法可以应用于处理器601中,或者由处理器601实现。处理器601可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器601中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器601可以是通用处理器(例如,微处理器或常规处理器)、数字信号处理器(digitalsignal processing,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现成可编程门阵列(field-programmable gate array,FPGA)或者其他可编程逻辑器件、分立门、晶体管逻辑器件或分立硬件组件,处理器601可以实现或者执行本申请实施例中的公开的各处理相关的方法、步骤及逻辑框图。The method described in the above embodiment of the present application can be applied to the processor 601, or implemented by the processor 601. The processor 601 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware or software instructions in the processor 601. The above processor 601 can be a general processor (for example, a microprocessor or a conventional processor), a digital signal processor (digital signal processing, DSP), an application specific integrated circuit (application specific integrated circuit, ASIC), a field-programmable gate array (field-programmable gate array, FPGA) or other programmable logic devices, discrete gates, transistor logic devices or discrete hardware components. The processor 601 can implement or execute the methods, steps and logic block diagrams related to each processing disclosed in the embodiment of the present application.
结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。其中,软件模块可以位于随机存储器、只读存储器、可编程只读存储器或带电可擦写可编程存储器(electricallyerasable programmable read only memory,EEPROM)等本领域成熟的存储介质中。该存储介质位于存储器604,处理器601读取存储器604中的信息,结合其硬件完成上述方法的步骤。The steps of the method disclosed in the embodiment of the present application can be directly embodied as being executed by a hardware decoding processor, or being executed by a combination of hardware and software modules in the decoding processor. Among them, the software module can be located in a mature storage medium in the field such as a random access memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable read only memory (EEPROM). The storage medium is located in the memory 604, and the processor 601 reads the information in the memory 604 and completes the steps of the above method in combination with its hardware.
处理器601、存储器604以及通信接口603之间可以通过通信线路602进行通信。The processor 601 , the memory 604 , and the communication interface 603 may communicate with each other via the communication line 602 .
在上述实施例中,存储器存储的供处理器执行的指令可以采用计算机程序产品的形式实现。其中,计算机程序产品可以是事先写入在存储器中,也可以是以软件形式下载并安装在存储器中。In the above embodiments, the instructions stored in the memory for execution by the processor may be implemented in the form of a computer program product, wherein the computer program product may be pre-written in the memory, or may be downloaded and installed in the memory in the form of software.
本申请实施例还提供一种计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行计算机程序指令时,全部或部分地产生按照本申请实施例的流程或功能。计算机可以是通用计算机、专用计算机、计算机网络或者其他可编程装置。计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一计算机可读存储介质传输,例如,计算机指令可以从一个网站的站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL)或无线(例如红外、无线、微波等)方式向另一个网站的站点、计算机、服务器或数据中心进行传输。计算机可读存储介质可以是计算机能够存储的任何可用介质或者是包括一个或多个可用介质集成的服务器、数据中心等数据存储设备。例如,可用介质可以包括磁性介质(例如,软盘、硬盘或磁带)、光介质(例如,数字通用光盘(digital versatiledisc,DVD))、或者半导体介质(例如,固态硬盘(solid state disk,SSD))等。The present application embodiment also provides a computer program product including one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or data center that includes one or more available media integrated. For example, the available medium may include a magnetic medium (e.g., a floppy disk, a hard disk or a tape), an optical medium (e.g., a digital versatile disc (DVD)), or a semiconductor medium (e.g., a solid state disk (SSD)), etc.
本申请实施例还提供一种计算机可读存储介质。上述实施例中描述的方法可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。计算机可读介质可以包括计算机存储介质和通信介质,还可以包括任何可以将计算机程序从一个地方传送到另一个地方的介质。存储介质可以是可由计算机访问的任何目标介质。The embodiments of the present application also provide a computer-readable storage medium. The methods described in the above embodiments can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. Computer-readable media may include computer storage media and communication media, and may also include any medium that can transfer a computer program from one place to another. The storage medium may be any target medium that can be accessed by a computer.
作为一种可能的设计,计算机可读介质可以包括紧凑型光盘只读储存器(compactdisc read-only memory,CD-ROM)、RAM、ROM、EEPROM或其它光盘存储器;计算机可读介质可以包括磁盘存储器或其它磁盘存储设备。而且,任何连接线也可以被适当地称为计算机可读介质。例如,如果使用同轴电缆,光纤电缆,双绞线,DSL或无线技术(如红外,无线电和微波)从网站,服务器或其它远程源传输软件,则同轴电缆,光纤电缆,双绞线,DSL或诸如红外,无线电和微波之类的无线技术包括在介质的定义中。如本文所使用的磁盘和光盘包括光盘(CD),激光盘,光盘,数字通用光盘(digital versatiledisc,DVD),软盘和蓝光盘,其中磁盘通常以磁性方式再现数据,而光盘利用激光光学地再现数据。As a possible design, the computer readable medium may include a compact disc read-only memory (CD-ROM), RAM, ROM, EEPROM or other optical disc storage; the computer readable medium may include a magnetic disk storage or other magnetic disk storage device. Moreover, any connection line may also be appropriately referred to as a computer readable medium. For example, if the software is transmitted from a website, server or other remote source using a coaxial cable, fiber optic cable, twisted pair, DSL or wireless technology (such as infrared, radio and microwave), the coaxial cable, fiber optic cable, twisted pair, DSL or wireless technology such as infrared, radio and microwave are included in the definition of medium. Disk and disc as used herein include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk and Blu-ray disc, where disks usually reproduce data magnetically, while optical discs reproduce data optically using lasers.
本申请实施例是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理单元以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理单元执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present application embodiment is described with reference to the flowchart and/or block diagram of the method, device (system) and computer program product according to the embodiment of the present application. It should be understood that each process and/or box in the flowchart and/or block diagram, and the combination of the process and/or box in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions can be provided to the processing unit of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processing unit of the computer or other programmable data processing device produce a device for realizing the function specified in one process or multiple processes in the flowchart and/or one box or multiple boxes in the block diagram.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311722748.8A CN117932589B (en) | 2023-12-14 | 2023-12-14 | Rights management method and related device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311722748.8A CN117932589B (en) | 2023-12-14 | 2023-12-14 | Rights management method and related device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN117932589A true CN117932589A (en) | 2024-04-26 |
CN117932589B CN117932589B (en) | 2025-01-07 |
Family
ID=90752677
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311722748.8A Active CN117932589B (en) | 2023-12-14 | 2023-12-14 | Rights management method and related device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117932589B (en) |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130346607A1 (en) * | 2012-06-13 | 2013-12-26 | Oracle International Corporation | System and method for supporting implicit versioning in a transactional middleware machine environment |
CN108717507A (en) * | 2018-04-20 | 2018-10-30 | 烽火通信科技股份有限公司 | A kind of management method and system of Android application programs permission |
CN109815680A (en) * | 2018-12-27 | 2019-05-28 | 歌尔股份有限公司 | Management method, device, terminal device and the storage medium of application permission |
CN110262832A (en) * | 2019-06-20 | 2019-09-20 | 北京金山安全软件有限公司 | Application program permission judgment method and device and electronic equipment |
CN111639021A (en) * | 2020-05-14 | 2020-09-08 | 深圳壹账通智能科技有限公司 | Permission testing method and device of application program and terminal equipment |
CN113591106A (en) * | 2021-06-30 | 2021-11-02 | 荣耀终端有限公司 | Application authorization method and device and terminal equipment |
CN113836540A (en) * | 2021-09-02 | 2021-12-24 | 青岛海信移动通信技术股份有限公司 | Method, apparatus, storage medium, and program product for managing application rights |
CN115422521A (en) * | 2022-08-31 | 2022-12-02 | 重庆长安汽车股份有限公司 | Vehicle machine system application authority management method, device, equipment and storage medium |
CN116702163A (en) * | 2022-09-27 | 2023-09-05 | 荣耀终端有限公司 | Rights management method and terminal equipment |
-
2023
- 2023-12-14 CN CN202311722748.8A patent/CN117932589B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130346607A1 (en) * | 2012-06-13 | 2013-12-26 | Oracle International Corporation | System and method for supporting implicit versioning in a transactional middleware machine environment |
CN108717507A (en) * | 2018-04-20 | 2018-10-30 | 烽火通信科技股份有限公司 | A kind of management method and system of Android application programs permission |
CN109815680A (en) * | 2018-12-27 | 2019-05-28 | 歌尔股份有限公司 | Management method, device, terminal device and the storage medium of application permission |
CN110262832A (en) * | 2019-06-20 | 2019-09-20 | 北京金山安全软件有限公司 | Application program permission judgment method and device and electronic equipment |
CN111639021A (en) * | 2020-05-14 | 2020-09-08 | 深圳壹账通智能科技有限公司 | Permission testing method and device of application program and terminal equipment |
CN113591106A (en) * | 2021-06-30 | 2021-11-02 | 荣耀终端有限公司 | Application authorization method and device and terminal equipment |
CN113836540A (en) * | 2021-09-02 | 2021-12-24 | 青岛海信移动通信技术股份有限公司 | Method, apparatus, storage medium, and program product for managing application rights |
CN115422521A (en) * | 2022-08-31 | 2022-12-02 | 重庆长安汽车股份有限公司 | Vehicle machine system application authority management method, device, equipment and storage medium |
CN116702163A (en) * | 2022-09-27 | 2023-09-05 | 荣耀终端有限公司 | Rights management method and terminal equipment |
Non-Patent Citations (1)
Title |
---|
宁华;李巍;汪坤;雷鸣宇;: "智能终端安全体系研究", 现代电信科技, no. 05, 25 May 2012 (2012-05-25), pages 48 - 53 * |
Also Published As
Publication number | Publication date |
---|---|
CN117932589B (en) | 2025-01-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11256496B2 (en) | Apparatus and method for managing application | |
US20170201378A1 (en) | Electronic device and method for authenticating identification information thereof | |
EP2998898B1 (en) | Token-based scheme for granting permissions | |
CN113032766A (en) | Application authority management method and device | |
CN111079125A (en) | Method and device for calling third-party library dynamic lifting authority by application program | |
US10516699B2 (en) | Electronic device and method for suggesting response manual in occurrence of denial | |
CN109753347A (en) | A kind of system and method for realizing driving | |
KR20150099440A (en) | Method and apparatus to sandbox run-time android applications with lightweight container | |
KR20190098516A (en) | Method for managing data related to application and electronic device thereof | |
CN116702163B (en) | Rights management method and terminal device | |
CN117932589A (en) | Authority management method and related device | |
CN116467015A (en) | Mirror image generation method, system start verification method and related equipment | |
CN117492636A (en) | Data storage method and electronic equipment | |
CN117857646B (en) | Data network sharing method, electronic device and storage medium | |
CN118260753B (en) | Application program management and control method and electronic equipment | |
CN118034889B (en) | Plug-in process mapping method and related device | |
CN116049812B (en) | Methods and electronic devices for accessing hardware resources | |
CN117156270B (en) | Photo processing method and related device | |
KR20140112393A (en) | Access control method of applcations using integrity check and electronic device implementing the same | |
CN115981576B (en) | Methods, electronic devices and storage media for sharing data | |
CN116737258B (en) | Method and related device for unloading application | |
CN116701299B (en) | A directory management method and related devices | |
WO2024046260A1 (en) | Hotfix method and related apparatus | |
US11809550B2 (en) | Electronic device and control method therefor | |
CN117556454A (en) | Data management method and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP03 | Change of name, title or address |
Address after: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040 Patentee after: Honor Terminal Co.,Ltd. Country or region after: China Address before: 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong Patentee before: Honor Device Co.,Ltd. Country or region before: China |