WO2024046184A1 - 一种文件管理、应用管理的方法和电子设备 - Google Patents
一种文件管理、应用管理的方法和电子设备 Download PDFInfo
- Publication number
- WO2024046184A1 WO2024046184A1 PCT/CN2023/114448 CN2023114448W WO2024046184A1 WO 2024046184 A1 WO2024046184 A1 WO 2024046184A1 CN 2023114448 W CN2023114448 W CN 2023114448W WO 2024046184 A1 WO2024046184 A1 WO 2024046184A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- application
- permission
- file
- electronic device
- files
- Prior art date
Links
- 238000007726 management method Methods 0.000 title abstract description 171
- 238000000034 method Methods 0.000 claims abstract description 88
- 230000004044 response Effects 0.000 claims abstract description 10
- 238000012552 review Methods 0.000 claims description 65
- 230000006870 function Effects 0.000 claims description 58
- 230000015654 memory Effects 0.000 claims description 23
- 238000004590 computer program Methods 0.000 claims description 10
- 238000012795 verification Methods 0.000 description 49
- 238000010586 diagram Methods 0.000 description 37
- 238000004891 communication Methods 0.000 description 36
- 238000005516 engineering process Methods 0.000 description 28
- 238000012545 processing Methods 0.000 description 24
- 230000007246 mechanism Effects 0.000 description 14
- 238000013475 authorization Methods 0.000 description 13
- 230000008569 process Effects 0.000 description 13
- 101100264195 Caenorhabditis elegans app-1 gene Proteins 0.000 description 11
- 238000010295 mobile communication Methods 0.000 description 10
- 230000009471 action Effects 0.000 description 9
- 238000012217 deletion Methods 0.000 description 7
- 230000037430 deletion Effects 0.000 description 7
- 238000007792 addition Methods 0.000 description 5
- 238000012986 modification Methods 0.000 description 5
- 230000004048 modification Effects 0.000 description 5
- 229920001621 AMOLED Polymers 0.000 description 4
- 244000035744 Hura crepitans Species 0.000 description 4
- 230000008859 change Effects 0.000 description 4
- 230000006399 behavior Effects 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000009434 installation Methods 0.000 description 3
- 238000002360 preparation method Methods 0.000 description 3
- 239000002699 waste material Substances 0.000 description 3
- 238000012550 audit Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000013523 data management Methods 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 230000007774 longterm Effects 0.000 description 2
- 230000005855 radiation Effects 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 230000000007 visual effect Effects 0.000 description 2
- 241000406668 Loxodonta cyclotis Species 0.000 description 1
- 230000001133 acceleration Effects 0.000 description 1
- 239000008186 active pharmaceutical agent Substances 0.000 description 1
- 230000003321 amplification Effects 0.000 description 1
- 238000013528 artificial neural network Methods 0.000 description 1
- 230000003416 augmentation Effects 0.000 description 1
- 230000003190 augmentative effect Effects 0.000 description 1
- 210000000988 bone and bone Anatomy 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000010267 cellular communication Effects 0.000 description 1
- 230000000739 chaotic effect Effects 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000003199 nucleic acid amplification method Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 239000002096 quantum dot Substances 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/11—File system administration, e.g. details of archiving or snapshots
- G06F16/122—File system administration, e.g. details of archiving or snapshots using management policies
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/11—File system administration, e.g. details of archiving or snapshots
-
- 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/50—Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
- G06F21/51—Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems at application loading time, e.g. accepting, rejecting, starting or inhibiting executable software based on integrity or source reliability
-
- 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2221/00—Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F2221/21—Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F2221/2141—Access rights, e.g. capability lists, access control lists, access tables, access matrices
Definitions
- Embodiments of the present application relate to the field of data management, and in particular, to a file management, application management method and electronic device.
- smart terminal devices have become an indispensable part of daily life in the new era, including smartphones, tablets, PCs and other devices.
- smart terminal devices carry more and more user data, including photos and videos taken, important documents for daily office work, and chat records of various social chat software and many other information. How to manage public data on smart terminal devices has become an important issue.
- the embodiments of the present application provide a file management, application management method and electronic device, which can avoid the problem of file chaos.
- a method of file management includes: an electronic device installs a first application through an application market, the first application corresponds to a permission configuration file, and the permission configuration file is used to indicate that the application
- the first application that has passed the market review can apply for permissions for file types; when the first application wants to access files in the electronic device, the first application requests to apply for the first permission; if the permissions are configured
- the first permission is included in the file, the electronic device displays a first interface, and the first interface is used to request the user to grant the first permission; in response to the first operation of the user agreeing to grant the first permission, The first application obtains the first permission.
- the electronic device when the electronic device installs the first application that has passed the application market review through the application market, when the first application wants to access files in the electronic device, it can request to apply for the first permission, and Only when the first permission is included in the permission profile, the electronic device can display the first interface requesting the user to grant the first permission, and when the user agrees to grant the first permission, the first application can obtain the first permission.
- the first application can only have the first permission if it passes the application market review and the user agrees to grant the requested first permission, and then the user can perform operations on the files in the electronic device with corresponding permissions.
- the method further includes: if the permission configuration file does not include the first permission, the electronic device does not display the first interface.
- the application market configures a permission configuration file for the first application based on the review results.
- the permission configuration file does not include the first permission requested by the first application
- the electronic device may not display it to the user. If the first interface requests the granting of the first permission, the first application will not have the first permission, and the user will not be able to perform operations on the files in the electronic device with corresponding permissions. This is different from the prior art in which the application developer decides to grant the first permission.
- this application provides a mechanism for the application market to review whether the permissions applied for by the application to be put on the shelves are reasonable, which can avoid the second issue from the source.
- An application applies to a user pop-up box to grant some unreasonable permissions. Further, it can avoid file corruption caused by the application in the prior art obtaining some unreasonable permissions and then randomly adding, deleting, modifying and checking public files in the electronic device. Chaos problem.
- the method further includes: the electronic device installs a second application through the application market; when the second application wants to access files in the electronic device, The second application is operated by the electronic device Access files in the electronic device using a file selector provided by the operating system.
- an electronic device installs a second application through the application market.
- the electronic device can be accessed through the file selector provided by the operating system of the electronic device.
- files in the electronic device that is, the second application can access the target file that the user wants to access through the interface provided by the file selector.
- the second application can freely access or operate files in the electronic device, thereby avoiding the problem of file chaos caused by the second application in the prior art by randomly adding, deleting, modifying, and checking public files in the electronic device.
- the second application accesses files in the electronic device through the file selector, specifically including: the electronic device displays a second interface, and the second interface including one or more candidate files provided by the file selector; the electronic device receiving a second operation by the user to determine one or more target files from the one or more candidate files; in response to the second operation , the second application obtains permission to access the one or more target files.
- an electronic device installs a second application through the application market.
- the electronic device displays the first file including one or more candidate files provided by the file selector.
- Second interface the user can allow the second application to access the target file selected by the user among the candidate files, that is, the second application can access the target file selected by the user among the candidate files through the interface provided by the file selector, but cannot access any candidate file. .
- the second application in the application randomly adds, deletes, modifies and checks public files in electronic devices, resulting in file chaos.
- the first application is a management application, and the management application relies on accessing a large number of one or more types of files in the electronic device to implement The application of its main function;
- the second application is a non-management application, and the non-management application does not rely on accessing a large number of one or more types of files in the electronic device to achieve its main function application.
- the files in the electronic device are stored in a file management module, and the method further includes: the first application accesses the target through a first interface of the file management module.
- file, the file type of the target file is the same as the file type applied for by the first permission.
- the files in the electronic device are stored in the file management module.
- the first application can access the target file through the first interface of the file management module, and the file type of the target file is consistent with the first permission applied for.
- the file types are the same. Since the files in the electronic device are stored in the file management module, when the first application wants to access the files on the electronic device, it can access them through the first interface of the file management module. This is different from each other in the prior art. Compared with independently storing corresponding files, the solution of this application can reduce the waste of storage resources.
- the permission profile is used to indicate permissions for file types that the first application that has been approved by the application market can apply for, including any of the following: access or operation Permissions for picture/video files, permissions for accessing or operating audio files, permissions for accessing or operating document files.
- the permissions for the file types that the first application can apply for included in the permission profile configured by the application market for the first application may include permissions to access or operate picture/video files, access or operation Any of the permissions for audio files and the permissions to access or operate document files.
- the first application can apply for specific types of operations on specific types of files required to perform the current function as required.
- Permissions, and then users grant application permissions on demand, and applications in the existing technology apply to perform any type of operations (reading, writing, editing, etc.) on any type of files (documents, pictures, audios, videos, etc.) in the storage space.
- the solution provided by this application can avoid the problem of file chaos caused by the application performing any type of operation on any type of file.
- the permission to access or operate picture/video files includes: the permission to read or edit, delete, and create picture/video files; the permission to access or operate audio files
- the permissions of files include the permissions to read or edit, delete, and create audio files
- the permissions to access or operate document files include the permissions to read or edit, delete, and create document files.
- files in the electronic device are stored in corresponding preset directories according to file types.
- files in electronic devices are stored in corresponding preset directories according to file types.
- the application requires When obtaining a file of a certain type, you can quickly find the corresponding file.
- the first application does not have the permission to create a new directory or a new file outside the preset directory that already exists in the electronic device.
- the first application does not have the permission to create a new directory or a new file outside the preset directory that already exists in the electronic device. In other words, the first application cannot create a new directory or a new file in the electronic device. Creating a new directory or a new file outside the existing default directory can ensure the orderliness of files in the electronic device.
- the files in the electronic device are stored in the file management module
- the method further includes: the electronic device stores the files in the file management module through the first application.
- the metadata information of the target file in the module is changed, and the file type of the target file is the same as the file type applied for by the first permission; when the electronic device accesses the target file through the second application, the The second application obtains the metadata information of the target file modified by the electronic device through the first application, and the second application is different from the first application.
- the first application can change the metadata information of the target file stored in the file management module.
- the second application can obtain the information obtained by the electronic device through the third application.
- One application changes the metadata information of the target file.
- the first application changes the metadata information of the target file in the file management module.
- the second application can also learn from the file management module. , thereby realizing the sharing of file metadata information among various applications, which can solve the problem that currently exists in some operating systems that after an application changes the metadata information of the file, other applications cannot learn in time.
- a method of application management includes: the application market obtains the data package of the first application, and the permission applied for by the first application submitted by the developer of the first application; The application market reviews whether the permissions applied for by the first application are reasonable; the application market configures a permission configuration file for the first application based on the review results, and the permission configuration file is used to indicate the permissions passed by the application market.
- the first application can apply for file type permissions.
- the application market after the application market obtains the data package of the first application and the permission applied for by the first application submitted by the developer of the first application, it can review whether the permission applied for by the first application is reasonable. And according to the review results, the first application is configured with a permission configuration file that indicates the permissions of the file types that the first application that has passed the application market review can apply for.
- some unreasonable application permissions can be filtered out for the user. There is no need for users to independently distinguish whether to grant the permissions requested by the first application.
- the application market can filter out some unreasonable application permissions in advance. Unlike the existing technology, application developers decide on their own what permissions to request from users.
- the application market review mechanism provided by this application can prevent users from being unable to distinguish and grant unreasonable permissions to malicious applications, causing the malicious applications to perform malicious operations on files on electronic devices.
- the chaos of public documents caused by arbitrary additions, deletions, modifications and searches.
- the application market reviews whether the permission applied for by the first application is reasonable, including:
- the application market reviews whether the permission applied for by the first application is reasonable based on the application type of the first application.
- the application market reviews whether the permissions applied for by the first application are reasonable based on the application type of the first application. If the first application is a management application, the application market can further review whether the permissions applied for by the first application are reasonable. Reasonably configure a permission profile for the first application, so that the first application can access or operate files with corresponding permissions according to the permission profile; if the first application is a non-management application, the application market may not grant the permissions applied for by the first application.
- Reasonableness review can directly deny the permission applied by the first application, so that the first application can access or operate the files selected by the user; through such an review mechanism, the permissions of the application can be distinguished, and the permissions of the application can be distinguished from the existing Compared with the solution in which application developers decide on their own what permissions to request from users and the application obtains the corresponding permissions once granted by the user, the application market listing review mechanism provided by this application can prevent applications from obtaining some unreasonable permissions in the existing technology.
- the application types include management applications and non-management applications
- the management applications are one or more types that rely on accessing a large number of the electronic devices.
- the non-management application is an application that does not rely on accessing a large number of one or more types of files in the electronic device to achieve its main function.
- a device is provided.
- the device is included in an electronic device and has the function of realizing the behavior of the electronic device in the above aspects and possible implementations of the above aspects.
- Functions can be implemented by hardware, or by hardware executing corresponding software.
- Hardware or software includes one or more modules or units corresponding to the above functions.
- an electronic device including: one or more processors; memory; one or more application programs; and one or more computer programs. Wherein, one or more computer programs are stored in the memory, and the one or more computer programs include instructions. When the instruction is executed by the electronic device, the electronic device is caused to execute the method in the possible implementation of any one of the above first aspects or any one of the second aspects.
- a chip system including at least one processor.
- program instructions are executed in the at least one processor, any one of the above first aspects or any one of the second aspects can be implemented.
- the functions of the method are implemented on the electronic device.
- a computer storage medium including computer instructions.
- the electronic device causes the electronic device to execute the method in any of the possible implementations of the first aspect or the second aspect. .
- a computer program product is provided.
- the computer program product When the computer program product is run on an electronic device, it causes the electronic device to execute the method in any one of the above-mentioned first aspects or any one of the possible designs of the second aspect.
- FIG. 1 is a schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present application.
- FIG. 2 is a schematic diagram of the software structure of an electronic device provided by an embodiment of the present application.
- Figure 3 is a schematic diagram of a public data access portal provided by an embodiment of the present application.
- Figure 4 is a schematic diagram of an application providing access to files in a mobile phone according to an embodiment of the present application.
- Figure 5 is a schematic diagram of another application accessing files provided by an embodiment of the present application.
- Figure 6 is a schematic diagram of a set of GUIs provided by an embodiment of the present application.
- Figure 7 is a schematic diagram of another set of GUIs provided by an embodiment of the present application.
- Figure 8 is a schematic diagram of another set of GUIs provided by an embodiment of the present application.
- Figure 9 is a schematic diagram of another set of GUIs provided by an embodiment of the present application.
- Figure 10 is a schematic diagram of another set of GUIs provided by an embodiment of the present application.
- Figure 11 is a schematic diagram of another set of GUIs provided by an embodiment of the present application.
- Figure 12 is a schematic diagram of a file management and application management method provided by an embodiment of the present application.
- Figure 13 is a schematic diagram of data classification provided by an embodiment of the present application.
- Figure 14 is a schematic diagram of a file classification provided by an embodiment of the present application.
- Figure 15 is a schematic diagram based on iOS sandbox restrictions.
- Figure 16 is a schematic diagram of metadata distribution of an Android operating system.
- Figure 17 is a schematic diagram of another file management and application management method provided by an embodiment of the present application.
- Figure 18 is a schematic diagram of yet another file management and application management method provided by an embodiment of the present application.
- Figure 19 is a schematic block diagram of an electronic device provided by an embodiment of the present application.
- Figure 20 is a schematic block diagram of another electronic device provided by an embodiment of the present application.
- first and second are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the quantity of indicated technical features. Therefore, features defined as “first” and “second” may explicitly or implicitly include one or more of these features.
- the solution provided by this application can be applied to mobile phones, tablets, personal computers (PC) wearable devices, vehicle-mounted devices, augmented reality (AR)/virtual reality (VR) devices, laptops,
- augmented reality (AR)/virtual reality (VR) devices laptops
- UMPCs ultra-mobile personal computers
- PDAs personal digital assistants
- FIG. 1 shows a schematic structural diagram of an electronic device 100 .
- the electronic device 100 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 , mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone interface 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and Subscriber identification module (SIM) card interface 195, etc.
- SIM Subscriber identification module
- the sensor module 180 may include a pressure sensor 180A, a gyro 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, and ambient light. Sensor 180L, bone conduction sensor 180M, etc.
- the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100 .
- the electronic device 100 may include more or fewer components than shown in the figures, or some components may be combined, some components may be separated, or some components may be arranged differently.
- the components illustrated may be implemented in hardware, software, or a combination of software and hardware.
- the processor 110 may include one or more processing units.
- the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (GPU), and an image signal processor. (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU) wait.
- application processor application processor, AP
- modem processor graphics processing unit
- GPU graphics processing unit
- image signal processor image signal processor
- ISP image signal processor
- controller memory
- video codec digital signal processor
- DSP digital signal processor
- baseband processor baseband processor
- NPU neural-network processing unit
- different processing units can be independent devices or integrated in one or more processors.
- the controller may be the nerve center and command center of the electronic device 100 .
- the controller can generate operation control signals based on the instruction operation code and timing signals to complete the control of fetching and executing instructions.
- the processor 110 may also be provided with a memory for storing instructions and data.
- the memory in processor 110 is cache memory. This memory may hold instructions or data that have been recently used or recycled by processor 110 . If the processor 110 needs to use the instructions or data again, it can be called directly from the memory. Repeated access is avoided and the waiting time of the processor 110 is reduced, thus improving the efficiency of the system.
- processor 110 may include one or more interfaces.
- Interfaces may include integrated circuit (inter-integrated circuit, I2C) interface, integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, pulse code modulation (pulse code modulation, PCM) interface, universal asynchronous receiver and transmitter (universal asynchronous receiver/transmitter (UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and /or universal serial bus (USB) interface, etc.
- I2C integrated circuit
- I2S integrated circuit built-in audio
- PCM pulse code modulation
- UART universal asynchronous receiver and transmitter
- MIPI mobile industry processor interface
- GPIO general-purpose input/output
- SIM subscriber identity module
- USB universal serial bus
- the interface connection relationships between the modules illustrated in the embodiments of the present application are only schematic illustrations and do not constitute a structural limitation of the electronic device 100 .
- the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
- the wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
- Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
- Each antenna in electronic device 100 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example: Antenna 1 can be reused as a diversity antenna for a wireless LAN. In other embodiments, antennas may be used in conjunction with tuning switches.
- the mobile communication module 150 can provide solutions for wireless communication including 2G/3G/4G/5G applied on the electronic device 100 .
- the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc.
- the mobile communication module 150 can receive electromagnetic waves through the antenna 1, perform filtering, amplification and other processing on the received electromagnetic waves, and transmit them to the modem processor for demodulation.
- the mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves through the antenna 1 for radiation.
- at least part of the functional modules of the mobile communication module 150 may be disposed in the processor 110 .
- at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be provided in the same device.
- the wireless communication module 160 can provide applications on the electronic device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), Bluetooth (bluetooth, BT), and global navigation satellites. Wireless communication solutions such as global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (infrared, IR), etc.
- WLAN wireless local area networks
- BT Bluetooth
- GNSS global navigation satellite system
- FM frequency modulation
- NFC near field communication
- infrared technology infrared, IR
- the wireless communication module 160 may be an integrated One or more devices of at least one communications processing module.
- the wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 .
- the wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 for radiation.
- the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology.
- the wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband Code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc.
- the GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), Beidou navigation satellite system (BDS), quasi-zenith satellite system (quasi) -zenith satellite system (QZSS) and/or satellite based augmentation systems (SBAS).
- GPS global positioning system
- GLONASS global navigation satellite system
- BDS Beidou navigation satellite system
- QZSS quasi-zenith satellite system
- SBAS satellite based augmentation systems
- the electronic device 100 implements display functions through a GPU, a display screen 194, an application processor, and the like.
- the GPU is an image processing microprocessor and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering.
- Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
- the display screen 194 is used to display images, videos, etc.
- Display 194 includes a display panel.
- the display panel can use a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light emitting diode or an active matrix organic light emitting diode (active-matrix organic light emitting diode).
- LCD liquid crystal display
- OLED organic light-emitting diode
- AMOLED organic light-emitting diode
- FLED flexible light-emitting diode
- Miniled MicroLed, Micro-oLed, quantum dot light emitting diode (QLED), etc.
- the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
- the electronic device 100 can implement the shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
- the ISP is used to process the data fed back by the camera 193.
- Camera 193 is used to capture still images or video.
- Video codecs are used to compress or decompress digital video.
- the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100.
- an external memory card such as a Micro SD card
- Internal memory 121 may be used to store computer executable program code, which includes instructions.
- the processor 110 executes instructions stored in the internal memory 121 to execute various functional applications and data processing of the electronic device 100 .
- the electronic device 100 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor. Such as music playback, recording, etc.
- the software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture.
- the embodiment of this application takes the Android system with a layered architecture as an example to illustrate the software structure of the electronic device 100 .
- FIG. 2 is a software structure block diagram of the electronic device 100 according to the embodiment of the present application.
- the layered architecture divides the software into several layers, and each layer has clear roles and division of labor.
- the layers communicate through software interfaces.
- the Android system is divided into four layers, from top to bottom: application layer, application framework layer, Android runtime (android runtime) and system libraries, and kernel layer.
- the application layer can include a series of application packages.
- the application package can include camera, gallery, calendar, calling, map, navigation, WLAN, Bluetooth, music, video, short message and other applications.
- the application framework layer provides an application programming interface (API) and programming framework for applications in the application layer.
- API application programming interface
- the application framework layer includes some predefined functions.
- the application framework layer can include a window manager, content provider, view system, phone manager, resource manager, notification manager, etc.
- a window manager is used to manage window programs.
- the window manager can obtain the display size, determine whether there is a status bar, lock the screen, capture the screen, etc.
- Content providers are used to store and retrieve data and make this data accessible to applications.
- the data may include video, Images, audio, calls made and received, browsing history and bookmarks, phone book, etc.
- the view system includes visual controls, such as controls that display text, controls that display pictures, etc.
- a view system can be used to build applications.
- the display interface can be composed of one or more views.
- a display interface including a text message notification icon may include a view for displaying text and a view for displaying pictures.
- the phone manager is used to provide communication functions of the electronic device 100 .
- call status management including connected, hung up, etc.
- the resource manager provides various resources to applications, such as localized strings, icons, pictures, layout files, video files, etc.
- the notification manager allows the application to display notification information in a pop-up box, such as the GUI shown in (d) in Figure 6, the GUI shown in (k) in Figure 6, and (d) in Figure 7 below.
- the GUI shown in FIG. 7(g), the GUI shown in FIG. 8(d), and the GUI shown in FIG. 8(g) may display corresponding information for notifying the user.
- the Android runtime includes core libraries and a virtual machine.
- the Android runtime is responsible for the scheduling and management of the Android system.
- the core library contains two parts: one is the functional functions that need to be called by the Java language, and the other is the core library of Android.
- System libraries can include multiple functional modules. For example: surface manager (surface manager), media libraries (media libraries), 3D graphics processing libraries (for example: OpenGL ES), 2D graphics engines (for example: SGL), etc.
- smart terminal devices have become an indispensable part of daily life in the new era, including smartphones, tablets, PCs and other devices.
- smart terminal devices carry more and more user data, including photos and videos taken, important documents for daily office work, and chat records of various social chat software and many other information. How to manage public data on smart terminal devices has become an important issue.
- the management of public data is basically dependent on the conscious maintenance of applications and users, and the system does not provide a unified management method.
- the files on this type of terminal device are directly displayed to the user in the form of a directory tree.
- the user can access any file on the terminal device, and can add, delete, modify, and search at will on the terminal device (referred to as adding, deleting, modifying, etc.) Check) each file; each application can also add, delete, modify and check each file anywhere according to its own wishes; resulting in confusion of public data and reducing user experience.
- each application can add, delete, modify and check public files at will according to its own wishes, causing confusion in public data.
- FIG. 3 it is a schematic diagram of a public data access portal provided by an embodiment of the present application.
- the operating system provides multiple access points for accessing public data: access through the media library, access through the system picker, and direct access through the file interface.
- Public data accessed by the media library and system picker will pass through the media library, so the media library can intercept public data with unified permissions to control the purity and orderliness of public data.
- public data accessed through the file interface (such as open, read, write) does not go through the media library, and the application can add, delete, modify and check public files at will according to its own wishes, thus causing public data chaos.
- embodiments of this application provide an application market listing review mechanism.
- an application is about to be put on the App Market, if the application wants to obtain certain types of permissions for certain or certain types of large quantities of files (for example, reading and editing permissions for large quantities of full pictures and videos) , the permission to read large amounts of audio)
- the application developer needs to submit the permission applied for by the application to the application market, and the application market will review whether the permission applied for by the application is reasonable.
- it is reasonable for a file manager application to apply for access and editing permissions to a large number of documents, pictures, videos, and audios.
- a photo album application it is unreasonable for a photo album application to apply for access and editing permissions for a large number of documents.
- it is unreasonable for a photo album application to apply for access and editing permissions for a large number of documents.
- Access and editing permissions for large batches of images and videos are reasonable.
- the application After the application market passes the review, the application will be granted a permission certificate.
- the permission certificate is used to identify the permissions that the application can apply for.
- the permission certificate can be carried in the application's installation package. After an application is installed on the user's electronic device, the application applies for a certain permission while the application is running. The electronic device determines whether to display the requesting user based on whether the permission certificate corresponding to the application includes the permission applied for by the application this time. A pop-up window to grant this permission.
- the electronic device will not display a pop-up window requesting the user to grant the permission; if the permission certificate corresponding to the application includes the permission For this permission applied for this time, the electronic device displays a pop-up window requesting the user to grant this permission. Only after the user clicks to agree, can the application obtain the permission applied for this time.
- an application when an application applies for storage space permissions, it may apply for any type of operation (reading, writing, editing, etc.) on any type of files (documents, pictures, audios, videos, etc.) in the storage space. permissions. Once the user grants storage space permission to an application, the application can perform any type of operations on any type of files, leading to file chaos.
- embodiments of the present application also provide a file permission management mechanism. From the dimensions of file type and operation type, storage space permissions are divided into more fine-grained permissions. When the application is running, it applies for the permissions required to perform specific types of files to perform specific types of operations on specific types of files as needed, and then the user grants the application permissions as needed.
- embodiments of the present application provide a method of file management and application management.
- the application market determines whether the application has the permission to directly access public data based on the application type. , when it is determined that the application has the permission to directly access public data, the application market will grant the application corresponding reasonable access permissions based on the file types the application applies to access, so that the application can access the corresponding files based on the authorized permissions, which can avoid Public data is in disarray.
- FIG. 4 it is a schematic diagram of an application accessing files in a mobile phone according to an embodiment of the present application.
- the application market is used to review the permissions applied for by the application. For example, the application market reviews whether an application has the permission to apply for pictures/videos, audios, documents, etc.
- the application is used to access files on local devices, devices in the local area network, cloud disks, etc.
- the file management module is the main functional module for applications to access files. It can provide an interface for applications to access data, verify the permissions applied for by applications, and manage files on local devices, LAN devices, and cloud disks.
- the files on the local device include pictures/videos, audios, documents, etc. stored on the local device
- the files on the LAN device include pictures/videos, audios, documents, etc. stored on the LAN device
- the files on the cloud disk Files include pictures/videos, audios, documents, etc. stored on the cloud disk.
- the application market can first review the permissions applied for by the newly developed application, and review whether the permissions applied for by the newly developed application are consistent with the permissions applied by the newly developed application. Whether the permissions that the newly developed application should have are consistent. When it is determined that the permissions applied for by the newly developed application are consistent with the permissions that it should have, the application market can certify that the permissions applied for by the newly developed application are passed; when it is determined that the permissions applied for by the newly developed application are consistent When the permissions applied for by the application are inconsistent with the permissions it should have, the application market can certify that the permissions applied for by the newly developed application are not approved.
- the file management module When the application market certifies that the permission applied for by the newly developed application is passed, when the user opens or accesses a picture/video or audio or document, the file management module will then review whether the newly developed application has obtained the permission to access the corresponding file. Permissions, for example, some applications may only have permission to access pictures/videos, some applications may only have permission to access audio, some applications may only have permission to access documents, etc. At this time, the file management module is reviewing the new Whether the files requested for access by the developed application are consistent with the permissions certified by the application market. After the file management module confirms that the newly developed application has obtained the permission to access the corresponding file, the file management module can return the file accessed by the user.
- FIG. 5 it is a schematic diagram of another application accessing files provided by the embodiment of the present application.
- the modules shown in the figure can mainly be used to implement the following functions: permission verification function, file access function, directory management function, and unified metadata management function.
- Permission verification function This function can be implemented through the permission verification module in the application market and file management module.
- the application market module can be used to review whether the application has permission to apply for pictures/videos, audios, documents, etc. For example, some applications should not have the permission to apply for pictures/videos, audios, documents, etc. Such applications can be called non-management applications, such as etc.; some applications can have permission to apply for pictures/videos, audios, documents, etc. Such applications can be called management applications, such as cameras, galleries, file managers, etc.
- the permission verification module can be used to verify whether the application has obtained the corresponding permissions when opening or accessing pictures/videos, audios, and documents. For example, some applications have permission to open or access pictures/videos, but do not have permission to open or access documents, such as cameras, galleries, etc. The permission verification module mainly verifies whether the application successfully obtains the permission to open or access documents. Picture/video permissions; some applications have the permission to open or access documents, but do not have the permission to open or access audio, such as WPS, etc. This permission verification module mainly verifies whether the application successfully obtains the permission to open or access the document. Permissions; some applications have permission to open or access audio, but do not have permission to open or access pictures/videos, such as recording experts. This permission verification module is mainly to verify whether the application has successfully obtained permission to open or access audio. .
- some applications can have permission to open or access audio, pictures/videos, and documents at the same time, such as file managers.
- a management application applies to the user for permission to open or access pictures/videos. Only after the user agrees to the application can the management application access the pictures/videos on the phone; users use non-management applications When an application accesses files on the phone, it does not need to apply for permission from the user.
- the application can obtain the files selected by the user from the file management module by calling the system picker API provided by the operating system.
- the management application in the embodiment of the present application is an application that relies on accessing all files of a certain type or types in an electronic device to achieve its main function.
- an application that relies on accessing a photo album All pictures and video files in the electronic device to achieve its main function which is to browse all pictures and videos in the electronic device;
- non-management applications are one or more categories that do not rely on accessing all the pictures and videos in the electronic device Applications that use files to achieve their main functions, such as the WeChat ⁇ R application.
- WeChat does not rely on accessing the full range of pictures and videos, audios, and documents in electronic devices.
- File access function This function can be realized through the file access module in the file management module.
- the file access module can be used for:
- Directory management function This function can be realized through the directory management module in the file management module.
- Directory management module can be used for:
- Unified metadata management function This function can be realized through the metadata management module in the file management module.
- the metadata management module can be used to: manage and synchronize metadata. Metadata includes metadata of local devices, LAN devices, cloud disks and other devices. In addition, the management of metadata by this module can include deletion and collection of metadata, etc. .
- FIG. 1 and FIG. 2 illustrate the structure shown in FIG. 1 and FIG. 2 as an example, and the solutions provided by the embodiments of the present application will be described in detail with reference to the accompanying drawings.
- Figures 6 to 8 illustrate the method for management applications to obtain files in the mobile phone.
- Figure 9 illustrates the method to cancel the permission of management applications to access files in the mobile phone.
- Figures 10 to 11 illustrate the method for non-management applications to obtain files. Files on your phone.
- Figure 6 shows a set of graphical user interfaces (GUI) of the mobile phone, in which (a) in Figure 6 to (k) in Figure 6 shows that application 1 in the mobile phone accesses the mobile phone method of taking photos, and Application 1 is a management application.
- GUI graphical user interfaces
- the permissions that Application 1 can apply for are reading and writing pictures/videos and audios, and the Application Market only reviews Application 1.
- FIG. 6 is the desktop of the mobile phone.
- Application 1 can be started and a GUI as shown in (b) in Figure 6 will be displayed.
- This GUI can be called an access preparation interface.
- the interface displays: the main interface of Application 1 (xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx as shown in the figure), and the lower right corner of the main interface can include the icon ⁇ +.
- the GUI shown in (c) in Figure 6 can be displayed.
- the interface displays: the main interface of application 1.
- the lower left corner of the main interface of the application 1 may include icons for photo albums and audio.
- the user can click on the icon corresponding to the photo album or audio.
- the interface will not display a new interface; when the mobile phone detects the user clicking on the photo album icon 803,
- a GUI as shown in (d) of Figure 6 can be displayed. This is because when the developer develops Application 1, he wants Application 1 to have the permission to apply for pictures/videos and audios, so (c) in Figure 6 displays the icons for photo albums and audios; however, the application market reviews the application.
- GUI shown in (c) in Figure 6 is an optional interface.
- the mobile phone detects that the user clicks on the icon ⁇ +802, it can directly The GUI shown in (d) in Fig. 6 is displayed.
- the interface displays: the main interface of Application 1 (xxxxxxxxxxxxxxxxxxxxxxx as shown in the figure), and a popup for applying for permission to access pictures in the mobile phone is displayed on the main interface.
- the content of the pop-up box includes: "Application 1" wants to access your photos, access your picture permissions, and can access pictures, videos, etc., please allow authorization. If the user clicks the allowed icon, then Application 1 can obtain the permission to access the pictures of the mobile phone. If the user clicks the disallowed icon, then Application 1 cannot obtain the permission to access the pictures of the mobile phone.
- the interface displays all photos in the photo album of the mobile phone, and classifies the photos, including: all photos, camera, video, screen capture and recording, my collection, etc.
- the interface also displays a pop-up box to protect user privacy.
- the content of the pop-up box includes: sharing privacy protection, which mainly includes the removal of photo location information (such as the location information taken by mobile phones) and the control 1 to control the photo location information, as well as the removal of photo capture. Data (such as the model, parameters, etc. taken by the mobile phone) and controls for controlling the photo shooting data 2. Among them, the user can control whether application 1 can obtain the location information of the photo through control 1.
- the circle in control 1 is located on the left side of control 1, it means that application 1 can obtain the location information of the photo. If the circle in control 1 is located on the control To the right of 1, it means that application 1 cannot obtain the location information of the photo. Similarly, the user can use control 2 to control whether application 1 can obtain the data taken by the photo. If the circle in control 2 is located on the left side of control 2, it means that application 2 can obtain the data taken by the photo. If the circle in control 2 is located The right side of control 2 means that application 1 cannot obtain the data taken by the photo.
- the circle in control 1 displayed on the current interface is located on the left side of control 1, and the circle in control 2 is located on the left side of control 2.
- the interface displays all photos in the photo album of the mobile phone, and classifies the photos, including: all photos, cameras, videos, screenshots and recordings, etc. Users can click on any icon to view the photo they want to access.
- the mobile phone detects that the user clicks on the icon 807 of all photos, the GUI shown in (h) in Figure 6 can be displayed.
- the interface displays all photos in the album, and the user can select and view some photos. Assume that the user selects Picture A and Picture B, then the icon ⁇ appears in the lower right corner of Picture A and Picture B, indicating that the user wants to view these two pictures, and then the user can further click the "OK" icon in the lower right corner of the interface. After the mobile phone detects the user's operation of clicking the confirmed icon 808, the GUI shown in (i) in Figure 6 can be displayed.
- the interface displays picture A, and the bottom of the interface also includes some controls, such as edit, delete, favorite, rename, details, etc. The user can perform further operations on picture A.
- the GUI shown in (k) in Figure 6 can be displayed.
- the interface in addition to displaying picture A and some controls, the interface also displays a pop-up box for applying for permission to edit and delete photos on the phone and create photos on the phone.
- the content of the pop-up box includes: "App 1" wants to edit, delete your photos, and create photos. It has permission to edit, delete, and create photos. It can edit, delete, and create pictures and videos. Wait, please allow authorization. If the user clicks the allowed icon, App 1 can obtain the permission to edit and delete photos on the phone and create photos on the phone; if the user clicks the not allowed icon, App 1 cannot obtain the permission to edit and delete photos on the phone. Photos and permissions to create photos on this phone.
- the phone When the phone detects that the user has clicked on an icon that is not allowed, the pop-up boxes for applying for permission to edit and delete photos on the phone and for applying for permission to create photos automatically disappear, and the interface displays picture A.
- the mobile phone After the mobile phone detects the user's operation of clicking the allowed icon 811, the above-mentioned GUI shown in (j) in Figure 6 can be displayed. At this time, the user can perform further operations on picture A based on these controls.
- the above-mentioned Figure 6 shows a GUI diagram for a management application to access, edit, delete, and create pictures/videos. It can be seen that when a user accesses pictures/videos in a mobile phone through a management application, due to the The application's permission certificate includes the permission to apply for reading and writing pictures/videos. The application can apply to the user's pop-up box for permission to access the pictures/videos on the phone.
- the application After the application obtains the permission to access the pictures/videos on the phone , when the user needs to perform further operations on the accessed pictures, since the permission certificate of the application includes the permission to apply for writing pictures/videos, the application can apply to the user's pop-up box for permissions to edit, delete, and create pictures/videos.
- the timing of pop-up boxes for management applications in the embodiments of this application is based on the needs of the management application, and the files applied for pop-up boxes include a certain type of file, while in the prior art, the pop-up boxes applied for It is all files on the disk, including pictures/videos, audios, and documents.
- the response conditions for the application pop-up box are not limited to those shown in Figure 6.
- the response condition for the application pop-up box to apply for permission to access pictures in the mobile phone can be when the application is started.
- the response condition for the application pop-up box to apply for permission to edit, delete, and create photos can be that when the application's permission to access pictures in the phone is allowed, no restrictions will be imposed.
- the action that triggers the application pop-up box to apply for permissions can be determined by the developer when developing the application. In some possible implementations, the action that triggers the application pop-up box to apply for permissions can be after any other possible step.
- Figure 7 shows another set of GUIs of the mobile phone, in which the method from (a) to (g) in Figure 7 shows how the application 2 in the mobile phone accesses the audio in the mobile phone, and the application 2 is For management applications, it is assumed that when the developer submits Application 2 to the App Market, the permission that Application 2 can apply for is to read and write audio, and the App Market verifies that Application 2 has the permission to apply for reading and writing audio and grants Application 2 the permission to apply for it. Certificate of permission to read and write audio.
- FIG. 7 is the desktop of the mobile phone.
- the application 2 can be started and a GUI as shown in (b) in Figure 7 will be displayed.
- This GUI can be called an access preparation interface.
- the interface displays: the main interface of Application 2 (xxxxxxxxxxxxxxxxxxxxxxxxxxx as shown in the figure).
- the lower right corner of the main interface of Application 2 includes the icon ⁇ +.
- the GUI shown in (c) in Figure 7 can be displayed.
- the interface displays: the main interface of application 2.
- the lower left corner of the main interface of the application 2 includes an audio icon.
- the GUI shown in (d) of Figure 7 can be displayed.
- the GUI shown in (c) in Figure 7 is an optional interface. In other words, when the mobile phone detects that the user clicks on the icon ⁇ +1002, it can directly display the image.
- the interface displays: the main interface of Application 2 (xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx as shown in the figure), and a pop-up box for applying for access to the audio permissions in the mobile phone is displayed on the main interface.
- the content of the pop-up box includes: "Application 2" wants to access your audio and obtain permission to access your audio. It can access songs, recordings, etc. Please allow authorization. If the user clicks the allowed icon, Application 2 can obtain the permission to access the audio of the mobile phone. If the user clicks the disallowed icon, Application 2 cannot obtain the permission to access the audio of the mobile phone.
- the phone When the phone detects that the user clicks on an icon that is not allowed, the pop-up box for obtaining permission to access the audio in the phone automatically disappears, and the main interface of Application 2 is displayed. After the mobile phone detects the user's operation of clicking the allowed icon 1004, the GUI shown in (e) in Figure 7 can be displayed.
- all audio in the mobile phone is displayed, including songs, recordings, other audio, etc.
- the audio currently displayed on the interface is a song, and the user can click on the icon of any song to play the song the user wants to listen to.
- the GUI shown in (f) in Figure 7 can be displayed.
- the figure displays information related to song 1, and an application for obtaining permission to edit, delete audio in the phone, and create audio in the phone is displayed on the interface.
- the content of the pop-up box includes: "App 2" wants to edit, delete your audio, and create audio, and obtains permission to edit, delete, and create audio. It can edit, delete, create songs, record, etc. Please allow authorization. If the user clicks the allowed icon, App 2 can obtain the permission to edit and delete the phone's audio and create audio in the phone; if the user clicks the disallowed icon, Application 2 cannot obtain the permission to edit or delete the phone's audio. Permissions for audio and creating audio in that phone.
- the phone When the phone detects that the user clicks on an icon that is not allowed, the pop-up boxes for applying for permission to edit or delete audio on the phone and applying for permission to create audio automatically disappear, and the interface displays information related to song 1.
- the GUI shown in (f) in Figure 7 above can be displayed. At this time, the user can perform further operations on Song 1, such as secondary creation, adjusting lyrics, setting sound effects, etc.
- the above-mentioned Figure 7 shows a GUI diagram for a management application to access and edit, delete, and create audio. It can be seen that when a user accesses audio in a mobile phone through a management application, due to the permission certificate of the application It includes the permission to apply for reading audio.
- the application can ask the user for permission to access the audio in the mobile phone. When the application obtains the permission to access the audio in the phone, when the user needs to further access the audio.
- the application can apply to the user pop-up box for permission to edit, delete, and create audio.
- the application pop-up box applies for the permission to write audio on the disk. All files, including pictures/videos, audios, and documents.
- Figure 8 shows another set of GUIs of the mobile phone, in which the method from (a) to (g) in Figure 8 shows how the application 3 in the mobile phone accesses the documents in the mobile phone, and the application 3 is For management applications, it is assumed that when the developer submits application 3 to the application market, the permission that application 3 can apply for is to read and write documents, and the application market reviews that application 3 has the permission to apply for reading and writing documents and grants application 3 the permission to apply for it. Certificate of permission to read and write the document.
- FIG. 8 is the desktop of the mobile phone.
- the application 3 can be started and a GUI as shown in (b) in Figure 8 will be displayed.
- the GUI can be called an access preparation interface.
- the figure shows: the main interface of application 3 (xxxxxxxxxxxxxxxxxxxxxxxxxxx as shown in the figure), and the lower right corner of the main interface of application 3 includes the icon ⁇ +.
- the GUI shown in (c) in Figure 8 can be displayed.
- the interface displays: the main interface of application 3.
- the main interface of the application 3 includes a document icon in the lower left corner. After the mobile phone detects the user's click on the icon 1103 of the document, the GUI shown in (d) of Figure 8 can be displayed.
- the GUI shown in (c) in Figure 8 is an optional interface.
- the mobile phone detects that the user clicks on the icon ⁇ +1102, it can directly display the The GUI shown in (d) in 8.
- the interface displays: the main interface of Application 3 (xxxxxxxxxxxxxxxxxxxxxxxxx as shown in the figure), and a pop-up box for applying for permission to access documents in the mobile phone is displayed on the main interface.
- the content of the pop-up box includes: "Application 3" wants to access your document and obtain permission to access your document. It can access word, pdf, etc. Please allow authorization. If the user clicks the allowed icon, Application 3 can obtain the permission to access the documents of the mobile phone. If the user clicks the disallowed icon, Application 3 cannot obtain the permission to access the documents of the mobile phone.
- the interface displays the content of document 1, and the bottom of the interface also includes some controls, such as word count, display directory, deletion, editing, etc.
- the user can perform further operations on document 1.
- the GUI shown in (g) of Figure 8 can be displayed.
- the interface displays the content of document 1, and a pop-up box is displayed on the interface to apply for permission to edit, delete documents in the mobile phone, and create documents in the mobile phone.
- the content of the pop-up box includes: "Application 3" wants to edit, delete your documents, and create documents. It has permission to edit, delete, and create documents. It can edit, delete, create word, pdf, etc. Please allow authorization. If the user clicks the allowed icon, App 3 can obtain permission to edit and delete documents on the phone and Permission to create documents on the phone; if the user clicks an icon that is not allowed, App 3 cannot obtain the permission to edit, delete documents on the phone, or create documents on the phone.
- the phone When the phone detects that the user clicks on an icon that is not allowed, the pop-up box for applying for permission to edit, delete documents on the phone, and create documents on the phone automatically disappears, and the interface displays the content of Document 1.
- the GUI shown in (f) in Figure 8 above can be displayed. At this time, the user can perform further operations on the song document 1, such as changing the document content, etc.
- the above-mentioned Figure 8 shows a GUI diagram for a management application to access, edit, delete, and create documents. It can be seen that when a management application accesses documents in a mobile phone, because the permission certificate of the application contains The application has the permission to apply for reading documents. The application can apply to the user's pop-up box for permission to access the documents in the mobile phone. When the application obtains the permission to access the documents in the mobile phone, when the application needs to further perform further processing on the accessed documents. During operation, since the permission certificate of the application includes the permission that the application has to apply for writing documents, the application can apply for the permission to edit, delete, and create documents through a pop-up box. However, in the prior art, the application uses a pop-up box to apply for all the permissions on the disk. Files, including pictures/videos, audios, documents.
- some applications can apply for permission to access multiple file categories at the same time.
- an application can apply for permission to access audio and documents at the same time without restriction.
- Figures 6 to 8 show GUI diagrams for management applications to access, edit, delete, and create files. It can be seen that when a management application accesses files in the mobile phone, the files requested by the application pop-up box include a certain Class files, the GUI pop-up box shown in Figure 6 applies for the image/video class, the GUI pop-up box shown in Figure 7 applies for the audio class, and the GUI pop-up box shown in Figure 8 applies for the document class , while in the prior art, the application pop-up box applies to all files on the disk, including pictures/videos, audios, and documents.
- Figure 9 shows another set of GUIs of the mobile phone, wherein (a) in Figure 9 to (e) in Figure 9 shows that the user cancels the application in the mobile phone to access pictures/videos, audios and documents in the mobile phone. Methods.
- the GUI is the desktop of the mobile phone, which includes application 1, application 2 and application 3.
- the setting can be started and a GUI as shown in (b) in Figure 9 will be displayed.
- This GUI can be called a setting interface.
- the figure shows the ways in which WLAN, Bluetooth, personal hotspot, etc. can be connected to other devices, as well as applications in mobile phones.
- the mobile phone detects the user's click on the icon 1202 of Application 1, the GUI shown in (c) in Figure 9 can be displayed.
- the figure shows: system application settings, application management, desktop icon management, application dual-opening, permission management, service management, etc.
- permission management is to manage the permissions of applications in mobile phones.
- the mobile phone detects that the user clicks on the rights management icon 1203, the GUI shown in (d) in Figure 9 can be displayed.
- the figure shows multiple applications such as clock, calendar, camera, gallery, application 1, application 2, application 3, etc.
- applications such as clock, calendar, camera, gallery, application 1, application 2, application 3, etc.
- the figure shows: Application 1 reads pictures/videos on the device, and there is an icon ⁇ on the right side of the line of text, indicating that Application 1 has the ability to read and write on the device. permission to write pictures/videos on the device; and Application 1 has the permission to write pictures/videos on the device, and there is an icon ⁇ on the right side of the line of text, indicating that Application 1 has the permission to write pictures/videos on the device. If the user wants to revoke App 1's permission to read or write images/videos on the device, they can set it up again. When the mobile phone detects that the user clicks on the "read pictures/videos on the device" icon 1205, the GUI shown in (f) in Figure 9 can be displayed.
- a pop-up box is displayed in the figure.
- the content of the pop-up box includes: Application 1 reads images/videos on the device. There are two options below this line of text: "Deny” and "Allow”. If the user clicks Allow, it means that they agree to Application 1 reading the pictures/videos on the device; if the user clicks Reject, it means they do not agree to Application 1 reading the pictures/videos on the device. After the mobile phone detects the user's operation of clicking the rejected icon 1206, the GUI shown in (g) in Figure 9 can be displayed.
- the figure shows: Application 1 reads pictures/videos on the device, and there is an icon ⁇ on the right side of the line of text, indicating that Application 1 does not have the reading device. permission to write pictures/videos on the device; and App 1 writes pictures/videos on the device, and there is an icon ⁇ on the right side of the line of text, indicating that App 1 does not have the permission to write pictures/videos on the device.
- Figure 10 shows another set of GUIs of the mobile phone, wherein (a) in Figure 10 to (i) in Figure 10 shows the method for the application 4 in the mobile phone to access the files in the mobile phone, and the application 4 is Non-administrative applications.
- FIG. 10 is the desktop of the mobile phone.
- the application 4 can be started and a GUI as shown in (b) in Figure 10 will be displayed.
- the GUI can be called the main interface of the application 4.
- the figure shows: the main interface of application 4, and the icon ⁇ + is displayed in the upper right corner of the main interface.
- the GUI shown in (c) in Figure 10 can be displayed.
- a pop-up box is displayed on the main interface of application 3, and the pop-up box includes: photo albums, music, documents, shooting, etc.
- the user can click on any icon, and the application 4 displays different interfaces according to the icon clicked by the user.
- the GUI as shown in (d) of Figure 10 can be displayed.
- the GUI shown in (g) of Figure 10 can be displayed.
- the GUI shown in (h) in Figure 10 can be displayed.
- the interface displays: all the photos in the mobile phone, and these photos are arranged in a certain order, for example, they can be arranged according to the shooting time.
- the user can select photos to view. Assuming that the user selects picture A2 and picture B3, numbers will appear in the ⁇ in the lower right corner of picture A2 and picture B3. The numbers indicate the order in which the photos are selected.
- the GUI shown in (e) in Figure 10 can be displayed.
- the interface displays picture A2.
- the user can click on the controls below picture A2, such as label, crop, text, border, rotation, etc. to perform further operations.
- the user wants to view the photo of B3 selected in (d) of Figure 10, he can slide to the left with his hand.
- the GUI shown in (f) in Figure 10 can be displayed.
- the interface displays picture B3.
- the user can click on the controls below picture B3, such as label, crop, text, border, rotation, etc., to perform further operations.
- the GUI shown in (g) in Figure 10 can be displayed.
- a pop-up box is also displayed to apply for permission to edit and delete photos on the phone and create photos on the phone.
- the content of the pop-up box includes: "App 4" wants to edit, delete your photos, and create photos, and obtains permission to edit, delete, and create photos. It can edit, delete, and create pictures, videos, etc. Please allow authorization. If the user clicks on the allowed icon, App 4 can obtain permission to edit and delete photos on the phone and create photos on the phone; if the user clicks on the icon that is not allowed, App 4 cannot obtain permission to edit and delete photos on the phone. Photos and permissions to create photos on this phone.
- the phone When the phone detects that the user clicks on an icon that is not allowed, the pop-up boxes for applying for permission to edit and delete photos on the phone and for applying for permission to create photos automatically disappear, and the interface displays picture B3.
- the mobile phone After the mobile phone detects the user's operation of clicking the allowed icon 1308, the above-mentioned GUI shown in (f) in Figure 10 can be displayed. At this time, the user can perform further operations on picture B3 based on these controls.
- all the audio in the mobile phone is displayed.
- the user can click on any icon to play the audio that the user wants to listen to.
- the user can click on the icon of any song to play the song the user wants to listen to.
- the user can also edit the audio.
- the mobile phone interface will also display a permission to apply for editing, deleting, and creating audio.
- the user clicks the allowed icon the audio can be edited. Further editing.
- Figure 11 shows another set of GUIs of the mobile phone, wherein (a) in Figure 11 to (h) in Figure 11 shows the method for the application 5 in the mobile phone to access the files in the mobile phone, and the application 5 is Non-administrative applications.
- the figure shows: the main interface of application 5.
- the main interface of application 5 includes multiple contacts, such as Zhang San, Li Si, etc.
- Zhang San the GUI shown in (c) in Figure 11 can be displayed.
- buttons are displayed below the chat interface with Zhang San. These controls include: photo album, shooting, video call, location, red envelope, music, voice Input and documentation etc.
- the user can click on any icon, and the application 5 displays different interfaces according to the icon clicked by the user.
- the GUI as shown in (d) of Figure 11 can be displayed.
- the GUI shown in (g) in Figure 11 can be displayed.
- the GUI shown in (h) in Figure 11 can be displayed.
- the interface displays: all the photos in the mobile phone, and these photos are arranged in a certain order, for example, they can be arranged according to the creation time.
- the user can select photos to view. Assuming that the user selects picture A2 and picture B3, numbers will appear in the ⁇ in the lower right corner of picture A2 and picture B3. The numbers indicate the order in which the photos are selected.
- the user can directly send the selected picture, or can edit the selected picture before sending it.
- the mobile phone detects the user's click on the preview icon 1407, it can be displayed as shown in (e) in Figure 11 GUI.
- the interface displays picture A2, and multiple controls are displayed below the interface, such as labels, cropping, text, borders, rotation, etc.
- the user can further edit the picture A2 and send the edited picture. Assume that the user rotates the image A2 and clicks send.
- the GUI shown in (f) in Figure 11 can be displayed.
- the lower interface of the chat interface with Zhang San displays picture A2' (the picture A2' is a rotated picture of picture A2) and picture B3.
- the user wants to view picture A2' he can click picture A2'; if the user wants to view picture B3, he can click picture B3.
- all the audio in the mobile phone is displayed.
- the user can click on any icon to send the audio that the user wants to send.
- the user can click on the icon of any song to send the selected song.
- the user can first edit the selected song and then send the edited song.
- Figure 10 and Figure 11 both show the steps for non-management applications in the mobile phone to access and edit files in the mobile phone.
- Application 4 and Application 5 are accessing and editing files on the mobile phone.
- the interface displays a pop-up box asking for permission to edit, delete, and create files
- the user uses Application 5 to perform further operations on the phone.
- the interface does not display a pop-up box for applying for permission to edit, delete, or create files. This is mainly because the user needs to save the edited file to the phone's memory using App 4, while the user uses App 5. It just sends the edited file to another contact, but does not save the edited file.
- FIG. 12 it is a schematic diagram of a file management and application management method provided by an embodiment of the present application.
- the method may include steps S1510 to S1548.
- the application carries the certificate to register with the application market.
- step S1512 is executed. If the certificate does not include the application permission, step S1518 is executed.
- the certificate carried by the application in the embodiment of this application may include application permissions or may not include application permissions, without limitation.
- the permission applied for in the certificate carried by the application may include one or more permissions.
- the application can carry a certificate for applying for picture/video permissions, or the application can carry a certificate for applying for audio permissions, or the application can carry a certificate for applying for document permissions. certificate.
- the application can carry a certificate that applies for 2 permissions
- the application can carry a certificate that applies for permissions to pictures/videos and audios
- the application can carry a certificate that applies for permissions to pictures/videos and documents
- the application can carry Request certificates for document and audio permissions.
- the certificate carried by the application applies for three permissions, the application can carry certificates that apply for permissions for images/videos, audios, and documents.
- user data can include local data, data synchronized from distributed devices, and data of pluggable devices.
- local data includes application data and public data.
- Public data includes cameras, pictures, videos, audios, documents, downloads, etc. The pictures/videos, audios, documents and other files shown above can be the public data shown in Figure 13.
- files are classified into: pictures/videos, audios, and documents, as shown in Figure 14, which is a schematic diagram of file classification provided by an embodiment of the present application.
- the files in the mobile phone can be divided into three categories: pictures/videos, audios, and documents. These three categories can correspond to three root directories.
- the three root directories are: "Directory 1: Pictures /Video Class", "Directory 2: Audio Class”, "Directory 3: Document Class”.
- "Directory 1: Picture/Video Category” can include photos taken by the camera, pictures (such as pictures in the library, Meitu Xiu Xiu), videos (such as pictures in the library, Meitu Xiu Xiu, etc.), videos from the Internet Downloaded pictures or videos, etc.;
- “Directory 2: Audio category” can include audio (such as music, recordings, etc.), audio downloaded from the Internet, etc.;
- “Directory 3: Document category” can include documents (such as in the file manager documents), documents downloaded from the Internet, etc.
- mixed storage directories can also be set, such as "Directory 4: audio category and document category”, “Directory 5: picture/video category and document category”, and so on.
- files of corresponding types can be stored in different directories.
- Cross-category storage is not allowed and can be restricted by suffix names.
- the camera suffix can be camera
- the picture suffix can be image
- the video suffix can be video
- the audio suffix can be audio
- the document suffix can be document
- the download suffix can be download.
- Directory 1 stores picture/video files. Files with suffixes of camera, image, video, and download can be stored in directory 1.
- Directory 2 stores audio files. Files with suffixes of audio and download can be stored in directory 2.
- Directory 3 stores document files. Files with suffixes of document and download can be stored in directory 3.
- Directory 4 stores audio and document files. Files with the suffix audio, download, and document can be stored in directory 4.
- Directory 5 stores image/video and document files. Directory 5 can store files with the suffix camera. , image, video, download, and document files.
- the set directories include three root directories, which are respectively: "Directory 1: Picture/Video Category", “Directory 2: Audio Category", “Directory 3: Document Category””; and application 1 has the permission to read the picture/video category, then application 1 can create a new subdirectory under directory 1 during the process of accessing directory 1, and it cannot create a new subdirectory outside directory 1, directory 2, and directory 3. Create a new directory, and you cannot create new files outside directory 1, directory 2, and directory 3.
- the application needs to store new files in the file management module, it can store them in the corresponding directory through the interface of the file access framework (FAF).
- FAF file access framework
- application 1 needs to store new pictures in the file management module, it can be stored in the "Directory 1: Picture/Video" shown above through the FAF interface; if application 3 needs to store new documents in the file In the management module, it can also be stored in the "Directory 3: Document Class" shown above through the FAF interface.
- files can also be divided into four categories: picture, video, audio, and document, without limitation.
- the files in the electronic device can all be stored in the file management module.
- each application uses an independent space to save its own files.
- Figure 15 it is a system based on iOS (the iOS is a schematic diagram of the sandbox restrictions of the operating system developed by Apple for the iPhone).
- all files in the electronic device can be stored in the file management module.
- all the files can be obtained from the file management module.
- step S1514 If yes, perform step S1514; if not, perform step S1516.
- the application market's review of whether the permissions applied for in the certificate carried by the application are reasonable can be understood as: the application market reviews whether the permissions applied for in the certificate carried by the application are consistent with the permissions that the application should have.
- an application should have the permission to access or operate pictures/videos. If the application registers with the application market with a certificate applying for permission to access or operate pictures/videos, and the application market reviews and finds that the permissions applied for by the application are reasonable, Then the App Market verifies that the application's permission to access or operate pictures/videos has passed; if the application registers with the App Market with a certificate applying for permission to access or operate audio, the App Market will find after review that the application's permissions are unreasonable. , then the App Market fails to authenticate the application’s application for permission to access or operate audio.
- the permissions that a certain application should have can be written in the file package of the application by the developer when developing the application, and the application market can Obtain the permissions that the application should have from the file package of the application, and review whether the permissions applied for by the application are reasonable based on the obtained permissions that the application should have.
- the application market authenticates the permission applied for by the application.
- the application market may or may not pass the permission applied for by the application; when the certificate carried by the application does not include the application permission, The application market will not review the application. If the application needs to access files on the phone, it can directly access the files on the phone by calling the system picker API.
- the application when the permission applied for by the application market authentication application is not passed, the application can access the files in the file management module by calling the API of the system picker, so that the user can obtain the corresponding files.
- the user accesses files in the mobile phone through application 4, and application 4 can access the pictures/videos, audios, documents, etc. in the mobile phone by calling the system picker API to present them to the user; the above figure In 11, the user accesses files in the mobile phone through application 5.
- Application 5 can access pictures/videos, audios, documents, etc. in the mobile phone by calling the system picker API to present them to the user.
- the electronic device may display a pop-up box to the user to apply for permission to access the file, or it may not display a pop-up box to the user to apply for permission.
- the interface for accessing file permissions This is mainly related to whether the permission certificate corresponding to the application includes the permissions applied for by the application. Specifically, if the application corresponds to If the permission certificate includes the permission applied by the application to access the file, the electronic device can display an interface that asks the user for permission to access the file; if the permission certificate corresponding to the application does not include the permission applied by the application to access the file , the electronic device will not display an interface that asks the user for permission to access the file.
- the electronic device may display an interface for requesting the user for the permission to access the file through a pop-up box.
- the mobile phone can display an interface that asks the user for permission to access pictures/videos, such as the GUI shown in (d) in Figure 6 above.
- the GUI displays a pop-up box: "Application 1" wants to access your photos and obtain permission to access your pictures. It can access pictures, videos, etc. Please allow authorization.
- the mobile phone can display an interface that asks the user for permission to access the audio, such as the GUI shown in (d) in Figure 7 above, and the GUI displays A pop-up box appears: "Application 2" wants to access your audio and obtain permission to access your audio. It can access songs, recordings, etc. Please allow authorization.
- the mobile phone can display a pop-up box asking the user for permission to access the document.
- the GUI displays a pop-up box: "Application 3" wants to access your document and obtain permission to access your document. It can access word, pdf, etc., please allow authorization. .
- the permission applied by the application in steps S1524 and S1526 is the permission applied by the application to access the file.
- S1526 The application registers the applied permission to the permission verification module.
- the application when the user agrees to the permission applied for by the application, the application can register the applied permission to the permission verification module, that is, register the applied permission to access the file in the permission verification module.
- Application 1 applies for permission to access photos on the mobile phone. After the user clicks the allowed icon, Application 1 can register the applied permission to access photos into the permissions in the verification module.
- Application 3 applies for permission to access documents in the mobile phone. After the user clicks the allowed icon, Application 3 can apply for permission to access the documents in the mobile phone. Permissions are registered in the permission verification module.
- the permission verification module verifies whether the application has obtained the corresponding permissions.
- step S1530 If yes, perform step S1530; if not, perform step S1532.
- the application applies for permission to access the file.
- the user may agree to the permission applied for by the application, or may not agree with the permission applied for by the application.
- the application can register the applied permissions in the permission verification module. Although the application registers the applied permissions in the permission verification module, the permission verification will not be able to control the user's behavior.
- the verification module does not know, and the permission verification module does not know whether the permissions registered by the application are true or false. Therefore, the permission verification module can further verify whether the application has obtained the permission to access the corresponding file, and Return or not return the file based on the verification results.
- the permission verification module can verify whether the application has obtained permission to access the pictures/videos, and return the result based on the verification result. Or don't return pictures/videos.
- the mobile phone detects the user's click on the album icon 803
- the permission verification module verifies that Application 1 has obtained the permission to access the pictures/videos in the mobile phone, it can be displayed as shown in Figure 6
- the GUI shown in (e) if the permission verification module verifies that application 1 has not obtained the permission to access pictures/videos in the mobile phone, the main interface of application 1 can be displayed.
- the permission verification module can verify whether the application has obtained the permission to access the audio, and return or not return the audio based on the verification result. As shown in Figure 7 above, after the mobile phone detects the user's click on the audio icon 1003, if the permission verification module verifies that application 2 has obtained the permission to access the audio in the mobile phone, it can be displayed as shown in Figure 7 (e ); if the permission verification module verifies that application 2 has not obtained the permission to access the audio in the mobile phone, the main interface of application 2 can be displayed.
- the permission verification module can verify whether the application has obtained permission to access the document, and return or not return the document based on the verification result.
- the GUI shown in (e) in Figure 8 can be displayed; if the permission verification module After verifying that application 3 has not obtained permission to access the documents in the mobile phone, the main interface of application 3 can be displayed.
- the application pops up a box to apply for permission to edit, delete, and create files.
- the electronic device may display an interface asking the user to apply for permission to edit, delete, or create files, or it may not display the interface.
- the interface for applying for permissions to edit, delete, and create files from the user pop-up box This is mainly related to whether the permission certificate corresponding to the application includes the permissions applied for by the application.
- the electronic device can display an interface for applying to the user for permissions to edit, delete, and create files; if the If the permission certificate corresponding to the application does not include the permissions applied for by the application to edit, delete, or create files, the electronic device will not display an interface that asks the user to apply for permissions to edit, delete, or create files.
- the application can apply to the user pop-up box for permissions to edit, delete, and create files.
- the phone can display an interface that asks the user for permission to edit, delete, and create pictures/videos, as described above.
- the phone can display an interface that asks the user for permission to edit, delete, and create audio, as shown in (g) in Figure 7 above.
- the mobile phone can display an interface that asks the user for permission to edit, delete, or create documents via a pop-up box.
- the permissions applied for by the application in S1538 and S1540 are: the permissions applied for by the application to edit, delete, and create files.
- the application registers the applied permission to the permission verification module.
- Application 1 applies for permissions to edit, delete, and create photos. After the user clicks the allowed icon, Application 1 can edit, delete, and create photos. The permissions are registered in the permission verification module.
- the permission verification module verifies whether the application has obtained the corresponding permissions.
- step S1546 If yes, perform step S1546; if not, perform step S1548.
- the application applies for permissions to edit, delete, and create files.
- the user may agree to the permissions applied for by the application, or may not agree to the permissions applied for by the application.
- the application can register the applied permissions in the permission verification module. Although the application registers the applied permissions in the permission verification module, the permission verification will not be able to control the user's behavior.
- the permission verification module does not know, and the permission verification module does not know whether the permissions registered by the application are true or false. Therefore, the permission verification module can further verify whether the application has obtained the ability to edit, delete, and create corresponding files. Permissions, according to the verification results, the user can perform operations or cannot perform operations.
- the user can change the metadata information of the file in the file management module, so that other applications can learn about the changes in the metadata information of the file from the file management module. , which can solve the current problem in some operating systems that after an application changes metadata information, other applications cannot learn it in time.
- FIG. 16 it is a schematic diagram of metadata distribution of an Android operating system.
- the metadata information of the public data is managed uniformly by the media library. After each application obtains the metadata information of the media library, it generates corresponding metadata and manages it.
- the metadata between applications is not synchronized. (Such as metadata between recycle bin, favorites, photo albums, file managers, etc. are out of sync). Different applications can access files such as pictures and documents on the device, but certain metadata information of the files (such as whether it is a favorite file, whether it is a hidden file, whether it is presented in the recycle bin, etc.) is independently generated and maintained by each application. Metadata Information is not shared between applications. For example, if you collect a photo in the gallery, you cannot see the collected information in the file manager; conversely, important files collected in the file manager cannot be seen in the gallery.
- applications that have applied for corresponding permissions can modify the metadata information of files in the management management module. For example, suppose that after the user accesses photo A in the mobile phone through application 1 and finds that he likes this photo, he can mark photo A as a favorite in the file management module. When another application (this application also has the ability to access pictures/ When accessing photo A in the file management module (video permission), you can learn that photo A has been marked as a collection. Alternatively, after application 1 identifies photo A as a collection in the file management module, it can notify other applications of the collection of photo A that also have permission to access pictures/videos on the phone, so that other applications can also learn about it. Photo A has been collected.
- the file management module stores public data and manages the public data in a unified manner.
- Each application can obtain corresponding data from the file management module, which can reduce the consumption of storage resources; by setting the terminal device's data in the permission configuration Permissions are set to the application market control method, and based on the application category, it is determined whether the application has the permission to directly access and operate public files. When it is determined that the application has the permission to directly access and operate public files, it is based on the files that the application applies to access or operate. The corresponding permissions are granted to the application according to the type.
- the application market listing review mechanism provided by this application can This prevents applications from granting unreasonable permissions to user pop-up applications at the source. Furthermore, it can avoid applications in the prior art from obtaining unreasonable permissions and then randomly adding, deleting, modifying, and checking public files in electronic devices. The resulting file chaos problem.
- an application changes the metadata of the file in the file management module
- other applications can also learn the changed metadata information, which can solve the problem of a certain application changing the metadata information that currently exists in some operating systems. Finally, other applications cannot be informed in time.
- FIG 17 it is a schematic diagram of another file management and application management method provided by the embodiment of the present application.
- the method may include steps S1710 to S1756.
- the application carries the certificate to register with the application market.
- step S1712 is executed. If the certificate does not include the application permission, step S1718 is executed.
- step S1714 If yes, execute step S1714; if not, execute step S1716.
- the application market authenticates the permission applied for by the application.
- the application pops up a box to apply for permission to access the file.
- the permission applied for in steps S1722 and S1724 is: the permission to access the file applied for using the pop-up box.
- the application registers the applied permission to the permission verification module.
- the application pops up a box to apply for permission to edit, delete, and create files.
- the permissions applied for in steps S1736 and S1738 are: the permissions to edit, delete, and create files applied for using the pop-up box.
- the application registers the applied permission to the permission verification module.
- S1743 The user starts accessing files through the application, and the application calls the interface of the file management module to access the files in the file management module.
- the permission verification module verifies whether the application has obtained the corresponding permissions.
- step S1746 If yes, perform step S1746; if not, perform step S1748.
- the corresponding permission in step S1744 is: the permission to access the file.
- the permission verification module verifies whether the application has obtained the corresponding permission to access.
- step S1754 If yes, perform step S1754; if not, perform step S1756.
- S1754 the user has the permission to edit, delete, and create files
- S1756 the user does not have the permission to edit, delete, and create files.
- the corresponding permissions in step S1752 are: permissions to edit, delete, and create files.
- the content shown in Figure 17 is basically the same as that shown in Figure 12.
- the difference lies in the inconsistency in the execution order.
- the main difference is the action of triggering the application pop-up box to apply for permission.
- the action that triggers the application pop-up box to apply for permission to access files is when the user starts the application and uses the application to view files on the phone.
- the application calls the interface in the file management module to access the file, and is triggered in Figure 17
- the application pop-up box applies for permission to access files when the user starts the application.
- the action of triggering the application pop-up box to apply for editing, deleting, and creating files is when the user performs further operations on the accessed files
- the action of triggering the application pop-up box to apply for editing, deleting, and creating files is when the user agrees.
- the application has requested permissions to access the file.
- the action of triggering the application pop-up box to apply for permission can be determined by the developer when developing the application.
- the above-mentioned Figures 12 and 17 respectively show two possible ways. In some possible ways, In the implementation method, the action that triggers the application pop-up box to apply for permission may exist after any of the above steps and is not restricted.
- Figure 18 is a schematic diagram of yet another file management and application management method provided by an embodiment of the present application.
- the method may include steps S1810 to S1870.
- the application market obtains the data package of the first application and the permission applied for by the first application submitted by the developer of the first application.
- S1820 The application market reviews whether the permission applied for by the first application is reasonable.
- the application market configures a permission configuration file for the first application based on the review result.
- the permission configuration file is used to indicate permissions for file types that the first application that has passed the review by the application market can apply for.
- S1840 The electronic device installs a first application through the application market, and the first application corresponds to a permission configuration file.
- the electronic device displays a first interface, and the first interface is used to request the user to grant the first permission.
- the electronic device in the embodiment of the present application may be the above-mentioned mobile phone, and the first application may be any one of the above-mentioned Application 1, Application 2, and Application 3. If the first application is Application 1, then the first The interface may be the GUI shown in (d) in Figure 6; if the first application is Application 2, the first interface may be the GUI shown in (d) in Figure 7; if the first application If the application is Application 3, the first interface may be the GUI shown in (d) in Figure 8 .
- the application market listing review mechanism provided by this application can filter out some unreasonable application permissions for users.
- the electronic device installs the application through the application market and reviews it.
- the electronic device can display a request to the user to grant the third permission.
- the first interface of a permission and when the user agrees to grant the first permission, The first application can obtain the first permission.
- the first application can only have the first permission if it passes the application market review and the user agrees to grant the requested first permission, and then the user can apply for the first permission.
- Files in electronic devices perform operations with corresponding permissions.
- This application provides a method by which applications The mechanism for the market to review whether the permissions applied for by applications to be put on the shelves are reasonable can prevent the first application from granting unreasonable permissions to users in the pop-up box. Furthermore, it can prevent applications in the existing technology from obtaining some unreasonable permissions.
- Reasonable permissions lead to random additions, deletions, modifications, and searches of public files in electronic devices, resulting in file chaos.
- the method further includes: if the permission configuration file does not include the first permission, the electronic device does not display the first interface.
- the electronic device when the permission configuration file does not include the first permission applied for by the first application, the electronic device does not display the first interface.
- the application market configures a permission configuration file for the first application based on the review results.
- the permission configuration file includes the first permission requested by the first application
- the electronic device may not display the request to the user.
- the first interface that grants the first permission the first application will not have the first permission, and the user will not be able to operate the files in the electronic device with corresponding permissions. This is different from the existing technology where the application developer decides on its own to provide the user with the first permission.
- this application provides a mechanism for the application market to review whether the permissions applied for by the application to be put on the shelves are reasonable, which can avoid the first issue from the source.
- the application grants some unreasonable permissions to the user's pop-up application.
- it can avoid the file chaos caused by the application in the prior art obtaining some unreasonable permissions and then randomly adding, deleting, modifying and checking public files in the electronic device. elephant problem.
- the method further includes: the electronic device installs a second application through the application market; when the second application wants to access files in the electronic device, the The second application accesses files in the electronic device through a file selector provided by the operating system of the electronic device.
- the second application in the embodiment of the present application can be a non-management application.
- the non-management application accesses files in the electronic device, it can access the files in the electronic device through the file selector provided by the operating system of the electronic device.
- the specific process can be Refer to the GUI shown in FIG. 10 or FIG. 11 and the relevant content of step S1518 in FIG. 12 , which will not be described again here.
- an electronic device installs a second application through the application market.
- the electronic device can be accessed through the file selector provided by the operating system of the electronic device.
- files in the electronic device that is, the second application can access the target file that the user wants to access through the interface provided by the file selector.
- the second application can freely access or operate files in the electronic device, thereby avoiding the problem of file chaos caused by the second application in the prior art by randomly adding, deleting, modifying, and checking public files in the electronic device.
- the second application accesses files in the electronic device through the file selector, specifically including:
- the electronic device displays a second interface, the second interface including one or more candidate files provided by the file selector;
- the electronic device receives a second operation by the user to determine one or more target files from the one or more candidate files;
- the second application obtains permission to access the one or more target files.
- the second interface in the embodiment of the present application may be the GUI shown in (d) in Figure 10 or the GUI shown in (d) in Figure 11 .
- the interface displays: all photos in the mobile phone. The user can select photos to view. Assuming that the user selects picture A2 and picture B3, numbers will appear in the ⁇ in the lower right corner of picture A2 and picture B3. The numbers indicate the order in which the photos are selected.
- the GUI shown in (e) in Figure 10 can be displayed.
- the second application after the second application obtains permission to access one or more target files, the second application can select selector to access files on the electronic device.
- an electronic device installs a second application through the application market.
- the electronic device displays the first file including one or more candidate files provided by the file selector.
- Second interface the user can allow the second application to access the target file selected by the user among the candidate files, that is, the second application can access the target file selected by the user among the candidate files through the interface provided by the file selector, but cannot access any candidate file. .
- the second application in the application randomly adds, deletes, modifies and checks public files in electronic devices, resulting in file chaos.
- the first application is a management application, and the management application relies on accessing a large number of one or more types of files in the electronic device to achieve its main functions.
- the second application is a non-management application
- the non-management application is an application that does not rely on accessing a large number of one or more types of files in the electronic device to achieve its main function.
- Management applications in the embodiments of this application are applications that rely on accessing a large number of one or more types of files in an electronic device to achieve their main functions.
- a file manager application relies on accessing a large number of files in an electronic device.
- Applications that batch documents, pictures, video and audio files to achieve their file management functions. Therefore, file manager applications are management applications; photo album applications rely on accessing large batches of picture and video files in electronic devices to achieve It is an application that manages pictures/videos. Therefore, the photo album application is also a management application.
- the non-management application in the embodiment of this application is an application that does not rely on accessing a large number of one or more types of files in an electronic device to achieve its main function.
- the WeChat application is a social application, and its main function is Instant messaging does not rely on accessing all pictures and one or more categories of video, audio, and document files in electronic devices to achieve its main functions. Therefore, WeChat applications are non-management applications.
- the files in the electronic device are stored in the file management module, and the method further includes:
- the first application accesses a target file through the first interface of the file management module, and the file type of the target file is the same as the file type applied for by the first permission.
- the files in the electronic device are stored in the file management module.
- the first application can access the target file through the first interface of the file management module, and the file type of the target file is consistent with the first permission applied for.
- the file types are the same. Since the files in the electronic device are stored in the file management module, when the first application wants to access the files on the electronic device, it can access them through the first interface of the file management module. This is different from each other in the prior art. Compared with independently storing corresponding files, the solution of this application can reduce the waste of storage resources.
- the permission configuration file is used to indicate permissions for file types that the first application that has been approved by the application market can apply for, including any of the following:
- the permissions for the file types that the first application can apply for included in the permission profile configured by the application market for the first application may include permissions to access or operate picture/video files, access or operation Any of the permissions for audio files and the permissions to access or operate document files.
- the first application can apply for specific types of operations on specific types of files required to perform the current function as required.
- Permissions, and then users grant application permissions on demand, and applications in the existing technology apply to perform any type of operations (reading, writing, editing, etc.) on any type of files (documents, pictures, audios, videos, etc.) in the storage space.
- the solution provided by this application can avoid the problem of file chaos caused by the application performing any type of operation on any type of file.
- the permissions to access or operate picture/video files include: permissions to read or edit, delete, and create picture/video files;
- the permissions to access or operate audio files include the permissions to read or edit, delete, and create audio files;
- the permissions to access or operate document files include permissions to read or edit, delete, and create document files.
- files in the electronic device are stored in corresponding preset directories according to file types.
- the default directory in the embodiment of this application may be the root directory mentioned above, such as "Directory 1: Picture/Video Category”, “Directory 2: Audio Category”, “Directory 3: Document Category”.
- files in electronic devices are stored in corresponding preset directories according to file types.
- the corresponding file can be quickly found.
- the first application does not have the permission to create a new directory or a new file outside the preset directory that already exists in the electronic device.
- the first application does not have the permission to create a new directory or a new file outside the preset directory that already exists in the electronic device. In other words, the first application cannot create a new directory or a new file in the electronic device. Creating a new directory or a new file outside the existing default directory can ensure the orderliness of files in the electronic device.
- the files in the electronic device are stored in the file management module, and the method further includes:
- the electronic device changes the metadata information of the target file stored in the file management module through the first application, and the file type of the target file is the same as the file type applied for by the first permission;
- the second application obtains the metadata information of the target file modified by the electronic device through the first application, and the second application is different in the first application.
- the first application can change the metadata information of the target file stored in the file management module.
- the second application can obtain the information obtained by the electronic device through the third application.
- One application changes the metadata information of the target file.
- the first application changes the metadata information of the target file in the file management module.
- the second application can also learn from the file management module. , thereby realizing the sharing of file metadata information among various applications, which can solve the problem that currently exists in some operating systems that after an application changes the metadata information of a file, other applications cannot learn it in time.
- the application market reviews whether the permission applied for by the first application is reasonable, including:
- the application market reviews whether the permission applied for by the first application is reasonable based on the application type of the first application.
- Application types in the embodiments of this application may include management applications and non-management applications.
- management applications and non-management applications please refer to the contents introduced above.
- the application market reviews whether the permissions applied for by the first application are reasonable based on the application type of the first application. If the first application is a management application, the application market can further review whether the permissions applied for by the first application are reasonable. Reasonably configure a permission profile for the first application, so that the first application can access or operate files with corresponding permissions according to the permission profile; if the first application is a non-management application, the application market may not grant the permissions applied for by the first application.
- Reasonableness review can directly deny the permission applied by the first application, so that the first application can access or operate the files selected by the user; through such an review mechanism, the permissions of the application can be distinguished, and the permissions of the application can be distinguished from the existing Compared with the solution in which application developers decide on their own what permissions to request from users and the application obtains the corresponding permissions once granted by the user, the application market listing review mechanism provided by this application can prevent applications from obtaining some unreasonable permissions in the existing technology.
- the electronic device includes corresponding hardware and/or software modules that perform each function.
- the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is performed by hardware or computer software driving the hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions in conjunction with the embodiments for each specific application, but such implementations should not be considered to be beyond the scope of this application.
- This embodiment can divide the electronic device into functional modules according to the above method examples.
- each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module.
- the above integrated modules can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is schematic and is only a logical function division. In actual implementation, there may be other division methods.
- Figure 19 shows a possible composition diagram of the electronic device involved in the above embodiment.
- the electronic device 1900 may include: an acquisition module 1910 , audit module 1920, configuration module 1930, installation module 1940, request module 1950, display module 1960.
- the acquisition module 1910 can be used to support the electronic device 1900 to perform the above steps S1810 or S1870, etc., and/or other processes for the technology described herein.
- the audit module 1920 may be used to support the electronic device 1900 to perform the above steps S1820 and the like, and/or other processes for the technology described herein.
- the configuration module 1930 may be used to support the electronic device 1900 to perform the above steps S1830 and so on, and/or be used for the technology described herein. other processes.
- the installation module 1940 may be used to support the electronic device 1900 to perform the above steps S1840 and the like, and/or other processes for the technology described herein.
- the request module 1950 may be used to support the electronic device 1900 to perform the above steps S1850 and the like, and/or other processes for the technology described herein.
- the display module 1960 may be used to support the electronic device 1900 to perform the above steps S1860 and the like, and/or other processes for the technology described herein.
- the electronic device provided in this embodiment is used to execute the above-mentioned method of the present application, and therefore can achieve the same effect as the above-mentioned implementation method.
- the electronic device may include a processing module, a storage module, and a communication module.
- the processing module can be used to control and manage the actions of the electronic device. For example, it can be used to support the electronic device to execute the steps performed by each of the above units.
- the storage module can be used to support electronic devices to execute stored program codes and data, etc.
- the communication module can be used to support communication between electronic devices and other devices.
- the processing module may be a processor or a controller. It may implement or execute the various illustrative logical blocks, modules, and circuits described in connection with this disclosure.
- a processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc.
- the storage module may be a memory.
- the communication module can specifically be a radio frequency circuit, a Bluetooth chip, a Wi-Fi chip and other devices that interact with other electronic devices.
- the electronic device involved in this embodiment may be a device with the structure shown in Figure 1 .
- Figure 20 shows another possible composition diagram of the electronic device 1400 involved in the above embodiment.
- the electronic device 1400 may include a communication unit 1410, an input unit 1420, a processing unit 1430, an output unit (or It can also be called a display unit 1440, a peripheral interface 1450, a storage unit 1460, a power supply 1470, a video decoder 1480 and an audio decoder 1490.
- the communication unit 1410 is used to establish a communication channel so that the electronic device 1400 can connect to a remote server through the communication channel and download media data from the remote server.
- the communication unit 1410 may include communication modules such as a WLAN module, a Bluetooth module, an NFC module, a baseband module, and a radio frequency (Radio Frequency, RF) circuit corresponding to the communication module, for wireless local area network communication, Bluetooth communication, NFC communication, infrared communication and/or cellular communication system communication, such as wideband code division multiple access (W-CDMA) and/or high speed downlink packet access (HSDPA).
- the communication module 1410 is used to control communication of various components in the electronic device, and can support direct memory access.
- the input unit 1420 may be used to implement user interaction with the electronic device and/or input of information into the electronic device.
- the input unit may be a touch panel, other human-computer interaction interfaces, such as physical input keys, microphones, etc., or other external information acquisition devices, such as cameras, etc.
- the processing unit 1430 is the control center of the electronic device and can use various interfaces and lines to connect various parts of the entire electronic device by running or executing software programs and/or modules stored in the storage unit, and calling software programs stored in the storage unit. Data to perform various functions of the electronic device and/or to process data.
- the above steps S1810, S1820, S1830, S1840, S1850, S1870, etc. can be implemented by the processing unit 1430.
- the output unit 1440 includes, but is not limited to, an image output unit and a sound output unit.
- the image output unit is used to output text, pictures and/or videos.
- the touch panel used in the input unit 1420 can also be used as a display panel of the output unit 1440. For example, when the touch panel detects a touch or a close gesture operation on the touch panel, it is transmitted to the processing unit to determine the type of the touch event, and then the processing unit provides corresponding visual output on the display panel according to the type of the touch event.
- the input unit 1420 and the output unit 1440 are used as two independent components to implement the input and output functions of the electronic device, in some embodiments, the touch panel and the display panel can be integrated into one.
- the image output unit can display various graphical user interfaces as virtual control components, including but not limited to windows, scrolls, icons and clipboards, for users to operate through touch.
- the above step S1860 can be implemented through the output unit 1440.
- the storage unit 1460 can be used to store software programs and modules, and the processing unit executes the software programs stored in the storage unit and Modules to perform various functional applications of electronic devices and implement data processing.
- This embodiment also provides a computer storage medium that stores computer instructions.
- the electronic device When the computer instructions are run on an electronic device, the electronic device causes the electronic device to execute the above related method steps to implement the method in the above embodiment.
- This embodiment also provides a computer program product.
- the computer program product When the computer program product is run on a computer, it causes the computer to perform the above related steps to implement the method in the above embodiment.
- inventions of the present application also provide a device.
- This device may be a chip, a component or a module.
- the device may include a connected processor and a memory.
- the memory is used to store computer execution instructions.
- the processor can execute computer execution instructions stored in the memory, so that the chip executes the methods in each of the above method embodiments.
- the electronic equipment, computer storage media, computer program products or chips provided in this embodiment are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the corresponding methods provided above. The beneficial effects of the method will not be repeated here.
- the disclosed devices and methods can be implemented in other ways.
- the device embodiments described above are only illustrative.
- the division of modules or units is only a logical function division. In actual implementation, there may be other division methods.
- multiple units or components may be combined or can be integrated into another device, or some features can be ignored, or not implemented.
- the coupling or direct coupling or communication connection between each other shown or discussed may be through some interfaces, and the indirect coupling or communication connection of the devices or units may be in electrical, mechanical or other forms.
- a unit described as a separate component may or may not be physically separate.
- a component shown as a unit may be one physical unit or multiple physical units, that is, it may be located in one place, or it may be distributed to multiple different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
- each functional unit in each embodiment of the present application can be integrated into one processing unit, each unit can exist physically alone, or two or more units can be integrated into one unit.
- the above integrated units can be implemented in the form of hardware or software functional units.
- Integrated units may be stored in a readable storage medium if they are implemented in the form of software functional units and sold or used as independent products.
- the technical solutions of the embodiments of the present application are essentially or contribute to the existing technology, or all or part of the technical solution can be embodied in the form of a software product, and the software product is stored in a storage medium , including several instructions to cause a device (which can be a microcontroller, a chip, etc.) or a processor to execute all or part of the steps of the methods of various embodiments of the present application.
- the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program code.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Computer Hardware Design (AREA)
- General Health & Medical Sciences (AREA)
- Health & Medical Sciences (AREA)
- Bioethics (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Stored Programmes (AREA)
Abstract
本申请实施例提供了一种文件管理、应用管理的方法和电子设备,该方法包括:电子设备通过应用市场安装第一应用,所述第一应用对应有权限配置文件,所述权限配置文件用于指示所述应用市场审核通过的所述第一应用能够申请的文件类型的权限;在所述第一应用欲访问所述电子设备中的文件时,所述第一应用请求申请第一权限;若所述权限配置文件中包括所述第一权限,所述电子设备显示第一界面,所述第一界面用于向用户请求授予所述第一权限;响应于用户同意授予所述第一权限的第一操作,所述第一应用获取到所述第一权限。本申请提供的方案,可以避免现有技术中应用获取到一些不合理的权限对电子设备中的公共文件随意地进行增删改查而导致的文件乱象问题。
Description
本申请要求于2022年8月31日提交中国专利局、申请号为202211057387.5、申请名称为“一种文件管理、应用管理的方法和电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请实施例涉及数据管理领域,尤其涉及一种文件管理、应用管理的方法和电子设备。
随着物联网技术和软件技术的迅猛发展,智能终端设备成为新时代日常生活中不可或缺的一部分,包括智能手机、平板、PC等设备。同时,智能终端设备承载了越来越多的用户数据,包括拍摄的照片和视频、日常办公的重要文档,以及各种社交聊天软件的聊天记录等众多信息。如何管理智能终端设备上的公共数据便成为一个重要的课题。
发明内容
本申请实施例提供一种文件管理、应用管理的方法和电子设备,可以避免文件乱象问题。
第一方面,提供了一种文件管理的方法,所述方法包括:电子设备通过应用市场安装第一应用,所述第一应用对应有权限配置文件,所述权限配置文件用于指示所述应用市场审核通过的所述第一应用能够申请的文件类型的权限;在所述第一应用欲访问所述电子设备中的文件时,所述第一应用请求申请第一权限;若所述权限配置文件中包括所述第一权限,所述电子设备显示第一界面,所述第一界面用于向用户请求授予所述第一权限;响应于用户同意授予所述第一权限的第一操作,所述第一应用获取到所述第一权限。
本申请实施例提供的方案,在电子设备通过应用市场安装该应用市场审核通过后的第一应用的情况下,当第一应用欲访问电子设备中的文件时,可以请求申请第一权限,且在权限配置文件中包括第一权限时,该电子设备才可显示向用户请求授予第一权限的第一界面,且当用户同意授予第一权限时,该第一应用即可获取到第一权限,换句话说,第一应用只有应用市场审核通过且用户同意授予所申请的第一权限的情况下,才可以具有第一权限,进而用户可以对该电子设备中的文件进行相应权限的操作,与现有技术中应用开发者自行决定向用户请求授予哪些权限且用户一旦授予则应用就获得相应权限的方案相比,本申请提供了一种由应用市场审核要上架的应用想要申请的权限是否合理的机制,可以从源头上避免第一应用向用户弹框申请授予一些不合理的权限,进一步地,可以避免现有技术中应用获取到一些不合理的权限随之对电子设备中的公共文件随意地进行增删改查而导致的文件乱象问题。
结合第一方面,在一些可能的实现方式中,所述方法还包括:若所述权限配置文件中不包括所述第一权限,所述电子设备不显示所述第一界面。
本申请实施例提供的方案,应用市场根据审核结果为第一应用配置了权限配置文件,在权限配置文件中不包括第一应用所请求申请的第一权限时,该电子设备可以不显示向用户请求授予第一权限的第一界面,第一应用也就不会具有第一权限,进而用户不可以对该电子设备中的文件进行相应权限的操作,与现有技术中应用开发者自行决定向用户请求授予哪些权限且用户一旦授予则应用就获得相应权限的方案相比,本申请提供了一种由应用市场审核要上架的应用想要申请的权限是否合理的机制,可以从源头上避免第一应用向用户弹框申请授予一些不合理的权限,进一步地,可以避免现有技术中应用获取到一些不合理的权限随之对电子设备中的公共文件随意地进行增删改查而导致的文件乱象问题。
结合第一方面,在一些可能的实现方式中,所述方法还包括:所述电子设备通过所述应用市场安装第二应用;在所述第二应用欲访问所述电子设备中的文件时,所述第二应用通过所述电子设备的操
作系统提供的文件选择器访问所述电子设备中的文件。
本申请实施例提供的方案,电子设备通过应用市场安装第二应用,当第二应用想要访问该电子设备中的文件时,可以通过该电子设备的操作系统提供的文件选择器访问该电子设备中的文件,即,第二应用可以通过文件选择器提供的接口访问用户想要访问的目标文件,通过这样的方式,既可以保证第二应用可以访问到该电子设备中的文件,又可以限制第二应用对电子设备中的文件进行随意访问或随意操作,从而可以避免现有技术中第二应用对电子设备中的公共文件随意地进行增删改查而导致的文件乱象问题。
结合第一方面,在一些可能的实现方式中,所述第二应用通过所述文件选择器访问所述电子设备中的文件,具体包括:所述电子设备显示第二界面,所述第二界面包括所述文件选择器提供的一个或多个候选文件;所述电子设备接收用户从所述一个或多个候选文件中确定一个或多个目标文件的第二操作;响应于所述第二操作,所述第二应用获取访问所述一个或多个目标文件的权限。
本申请实施例提供的方案,电子设备通过应用市场安装第二应用,当第二应用想要访问该电子设备中的文件时,电子设备显示包括文件选择器提供的一个或多个候选文件的第二界面,用户可以允许第二应用访问候选文件中用户所选择的目标文件,即,第二应用可以通过文件选择器提供的接口访问候选文件中用户所选择的目标文件,而不能访问任意候选文件。通过这样的方式,既可以保证第二应用可以访问到用户从该电子设备中选择访问的文件,又可以限制第二应用对电子设备中的文件进行随意访问或随意操作,从而可以避免现有技术中第二应用对电子设备中的公共文件随意地进行增删改查而导致的文件乱象问题。
结合第一方面,在一些可能的实现方式中,所述第一应用为管理类应用,所述管理类应用为依赖于访问所述电子设备中的大批量的一类或多类的文件以实现其主要功能的应用;所述第二应用为非管理类应用,所述非管理类应用为不依赖于访问所述电子设备中的大批量的一类或多类的文件以实现其主要功能的应用。
结合第一方面,在一些可能的实现方式中,所述电子设备中的文件存储于文件管理模块中,所述方法还包括:所述第一应用通过所述文件管理模块的第一接口访问目标文件,所述目标文件的文件类型与所述第一权限所申请的文件类型相同。
本申请实施例提供的方案,电子设备中的文件存储于文件管理模块中,第一应用可以通过该文件管理模块的第一接口访问目标文件,且目标文件的文件类型与第一权限所申请的文件类型相同,由于电子设备中的文件存储于文件管理模块中,当第一应用想要访问该电子设备上的文件时,均可以通过文件管理模块的第一接口访问,与现有技术中各个应用独立存储相应的文件相比,本申请的方案可以减少存储资源的浪费。
结合第一方面,在一些可能的实现方式中,所述权限配置文件用于指示所述应用市场审核通过的所述第一应用能够申请的文件类型的权限,包括以下任一项:访问或操作图片/视频类文件的权限、访问或操作音频类文件的权限、访问或操作文档类文件的权限。
本申请实施例提供的方案,应用市场为第一应用配置的权限配置文件中所包括的该第一应用能够申请的文件类型的权限可以包括访问或操作图片/视频类文件的权限、访问或操作音频类文件的权限、访问或操作文档类文件的权限中的任一个,第一应用在运行的过程中,可以按照需求申请其执行当前功能所需的对特定类型的文件进行特定类型的操作的权限,进而用户按需授予应用权限,与现有技术中应用申请对存储空间中任意类型的文件(文档、图片、音频、视频等)进行任意类型的操作(读取、写入、编辑等)的权限的方案相比,本申请提供的方案可以避免由于应用对任意类型的文件进行任意类型的操作而导致的文件乱象问题。
结合第一方面,在一些可能的实现方式中,所述访问或操作图片/视频类文件的权限包括:读取或编辑、删除、创建图片/视频类文件的权限;所述访问或操作音频类文件的权限包括读取或编辑、删除、创建音频类文件的权限;所述访问或操作文档类文件的权限包括读取或编辑、删除、创建文档类文件的权限。
结合第一方面,在一些可能的实现方式中,所述电子设备中的文件按照文件类型存储于对应预设目录中。
本申请实施例提供的方案,电子设备中的文件按照文件类型存储于对应预设目录中,当应用需要
获取某一类型的文件时,可以快速查找到相应文件。
结合第一方面,在一些可能的实现方式中,所述第一应用不具备在所述电子设备中已存在的预设目录外创建新的目录或新的文件的权限。
本申请实施例提供的方案,第一应用不具备在所述电子设备中已存在的预设目录外创建新的目录或新的文件的权限,换句话说,第一应用不可以在电子设备中已存在的预设目录外创建新的目录或新的文件,可以保证电子设备中的文件的有序性。
结合第一方面,在一些可能的实现方式中,所述电子设备中的文件存储于文件管理模块中,所述方法还包括:所述电子设备通过所述第一应用对存储于所述文件管理模块中的目标文件的元数据信息进行更改,所述目标文件的文件类型与所述第一权限所申请的文件类型相同;在所述电子设备通过第二应用访问所述目标文件时,所述第二应用获取所述电子设备通过所述第一应用更改后的所述目标文件的元数据信息,所述第二应用不同于所述第一应用。
本申请实施例提供的方案,第一应用可以对存储于文件管理模块中的目标文件的元数据信息进行更改,当电子设备通过第二应用访问目标文件时,第二应用可以获取电子设备通过第一应用更改后的目标文件的元数据信息,通过这样的方式,第一应用对文件管理模块中的目标文件的元数据信息进行更改这一情况,第二应用也可以从文件管理模块中了解到,从而实现文件的元数据信息在各应用之间共享,可以解决目前一些操作系统中存在的某一应用改动文件的元数据信息后,其它应用无法及时获知的问题。
第二方面,提供了一种应用管理的方法,所述方法包括:应用市场获取第一应用的数据包,以及所述第一应用的开发者提交的所述第一应用所申请的权限;所述应用市场审核所述第一应用所申请的权限是否合理;所述应用市场根据审核结果,为所述第一应用配置权限配置文件,所述权限配置文件用于指示所述应用市场审核通过的所述第一应用能够申请的文件类型的权限。
本申请实施例提供的方案,应用市场在获取第一应用的数据包和第一应用的开发者提交的第一应用所申请的权限后,可以对第一应用所申请的权限是否合理进行审核,并根据审核结果为该第一应用配置用于指示应用市场审核通过的第一应用能够申请的文件类型的权限的权限配置文件,通过这样的审核机制可以为用户过滤掉一些不合理的申请权限,无需用户自主区分是否授予第一应用申请的权限,特别是对于一些恶意应用,应用市场可以提前将一些不合理的申请权限过滤掉,与现有技术中应用开发者自行决定向用户请求授予哪些权限且用户一旦授予则应用就获得相应权限的方案相比,本申请提供的应用市场上架审核机制可以防止用户无法区分并授予恶意应用一些不合理的权限而导致该恶意应用对电子设备上的文件进行随意增删改查进而引起的公共文件乱象问题。
结合第二方面,在一些可能的实现方式中,所述应用市场审核所述第一应用所申请的权限是否合理,包括:
所述应用市场根据所述第一应用的应用类型审核所述第一应用所申请的权限是否合理。
本申请实施例提供的方案,应用市场根据第一应用的应用类型审核第一应用所申请的权限是否合理,若第一应用为管理类应用,应用市场可以进一步审核第一应用所申请的权限是否合理并为第一应用配置权限配置文件,这样第一应用可以根据权限配置文件访问或操作相应权限的文件;若第一应用为非管理类应用,应用市场可以不对第一应用所申请的权限的合理性进行审核,可以直接拒绝第一应用所申请的权限,这样第一应用可以对用户所选择的文件进行访问或操作;通过这样的审核机制可以对应用所具有的权限进行区分,与现有技术中应用开发者自行决定向用户请求授予哪些权限且用户一旦授予则应用就获得相应权限的方案相比,本申请提供的应用市场上架审核机制可以避免现有技术中应用获取到一些不合理的权限而对电子设备上的文件进行随意增删改查进而引起的公共文件乱象问题。
结合第二方面,在一些可能的实现方式中,所述应用类型包括管理类应用和非管理类应用,所述管理类应用为依赖于访问所述电子设备中的大批量的一类或多类的文件以实现其主要功能的应用,所述非管理类应用为不依赖于访问所述电子设备中的大批量的一类或多类的文件以实现其主要功能的应用。
第三方面,提供了一种装置,该装置包含在电子设备中,该装置具有实现上述方面及上述方面的可能实现方式中电子设备行为的功能。功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括一个或多个与上述功能相对应的模块或单元。
第四方面,提供了一种电子设备,包括:一个或多个处理器;存储器;一个或者多个应用程序;以及一个或多个计算机程序。其中,一个或多个计算机程序被存储在存储器中,一个或多个计算机程序包括指令。当指令被电子设备执行时,使得电子设备执行上述第一方面任一项或第二方面任一项可能的实现中的方法。
第五方面,提供了一种芯片系统,包括至少一个处理器,当程序指令在所述至少一个处理器中执行时,使得上述第一方面任一项或第二方面任一项可能的实现中的方法在所述电子设备上的功能得以实现。
第六方面,提供了一种计算机存储介质,包括计算机指令,当计算机指令在电子设备上运行时,使得电子设备执行上述第一方面任一项或第二方面任一项可能的实现中的方法。
第七方面,提供了一种计算机程序产品,当计算机程序产品在电子设备上运行时,使得电子设备执行上述第一方面任一项或第二方面任一项可能的设计中的方法。
图1为本申请实施例提供的一种电子设备的硬件结构示意图。
图2为本申请实施例提供的一种电子设备的软件结构示意图。
图3为本申请实施例提供的一种公共数据访问入口的示意图。
图4为本申请实施例提供的一种应用访问手机中的文件的示意图。
图5为本申请实施例提供的另一种应用访问文件的示意图。
图6为本申请实施例提供的一组GUI的示意图。
图7为本申请实施例提供的另一组GUI的示意图。
图8为本申请实施例提供的又一组GUI的示意图。
图9为本申请实施例提供的再一组GUI的示意图。
图10为本申请实施例提供的再一组GUI的示意图。
图11为本申请实施例提供的再一组GUI的示意图。
图12为本申请实施例提供的一种文件管理、应用管理的方法示意图。
图13为本申请实施例提供的一种数据分类的示意图。
图14为本申请实施例提供的一种文件分类的示意图。
图15为一种基于iOS沙箱限制的示意图。
图16为一种安卓操作系统的元数据分布的示意图。
图17为本申请实施例提供的另一种文件管理、应用管理的方法示意图。
图18为本申请实施例提供的又一种文件管理、应用管理的方法的示意图。
图19为本申请实施例提供的一种电子设备的示意性框图。
图20为本申请实施例提供的另一种电子设备的示意性框图。
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。其中,在本申请实施例的描述中,除非另有说明,“/”表示或的意思,例如,A/B可以表示A或B;本文中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,在本申请实施例的描述中,“多个”是指两个或多于两个。
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。
本申请提供的方案可以应用于手机、平板电脑、个人计算机(personal computer,PC)可穿戴设备、车载设备、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、个人数字助理(personal digital assistant,PDA)等电子设备上,本申请实施例对电子设备的具体类型不作任何限制。
示例性的,图1示出了电子设备100的结构示意图。电子设备100可以包括处理器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等。
可以理解的是,本申请实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
其中,控制器可以是电子设备100的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成
至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。
在一些实施例中,电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。
电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。
ISP用于处理摄像头193反馈的数据。摄像头193用于捕获静态图像或视频。视频编解码器用于对数字视频压缩或解压缩。
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行电子设备100的各种功能应用以及数据处理。
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。
电子设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本申请实施例以分层架构的安卓系统为例,示例性说明电子设备100的软件结构。
图2是本申请实施例的电子设备100的软件结构框图。分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将安卓系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(android runtime)和系统库,以及内核层。应用程序层可以包括一系列应用程序包。
如图2所示,应用程序包可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等应用程序。
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。
如图2所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,
图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。
电话管理器用于提供电子设备100的通信功能。例如通话状态的管理(包括接通,挂断等)。
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。
通知管理器使应用程序可以在弹框中显示通知信息,如下文图6中的(d)所示的GUI、图6中的(k)所示的GUI、图7中的(d)所示的GUI、图7中的(g)所示的GUI、图8中的(d)所示的GUI、图8中的(g)所示的GUI可以显示用于通知用户相应的信息。
安卓运行时包括核心库和虚拟机。安卓运行时负责安卓系统的调度和管理。
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(media libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。
为了便于理解,下文将结合附图介绍与本申请相关的背景技术。
随着物联网技术和软件技术的迅猛发展,智能终端设备成为新时代日常生活中不可或缺的一部分,包括智能手机、平板、PC等设备。同时,智能终端设备承载了越来越多的用户数据,包括拍摄的照片和视频、日常办公的重要文档,以及各种社交聊天软件的聊天记录等众多信息。如何管理智能终端设备上的公共数据便成为一个重要的课题。
目前智能终端设备对公共数据的访问权限过于开放,众多应用都可以轻松地在终端设备上任意新增或删除数据,导致公共数据杂乱无章,管理混乱。
例如,对于装载Windows操作系统的设备,其对公共数据的管理基本是靠应用及用户自觉维护,系统不提供统一管理方式。具体地,该类终端设备上的文件均以目录树的形式直接展示给用户,用户可访问终端设备上的任何文件,且可以在终端设备上任意增加、删除、改动、查找(简称为增删改查)各个文件;各个应用也可以根据自己意愿在任何地方增删改查各个文件;导致公共数据混乱,降低用户体验。
对于装载有安卓操作系统的终端设备,各个应用也按照自己的意愿随意增删改查公共文件,造成公共数据混乱。
如图3所示,为本申请实施例提供的一种公共数据访问入口的示意图。
该操作系统对公共数据的访问提供了多种访问入口:经媒体库访问、经系统选择器(system picker)访问和直接通过文件(file)接口进行访问。经媒体库访问和system picker访问的公共数据,都会经过媒体库,因此媒体库可以对公共数据进行统一权限拦截,以管控公共数据的纯净有序。但经file接口(如open、read、write)访问的公共数据不经过媒体库,可由应用按照自己的意愿随意增删改查公共文件,因此造成公共数据乱象问题。
换句话说,现有技术中,应用权限的管理由用户自主进行。用户同意授予应用其申请的某项权限,则该应用就具有了该项权限。然而用户往往很难区分授予该应用该项权限是否合理,即是否应当授予应用该项权限。例如,某些恶意应用会向用户弹窗申请大量的权限,用户一旦授予该恶意应用可以对电子设备上的文件进行随意增删改查,导致公共文件乱象。
为了解决该问题,本申请实施例提供了一种应用市场上架审核机制。在应用要上架应用市场时,如果应用想要获取对某个或某几个类型的大批量文件的某个或某几个类型的权限(比如,对大批全量图片和视频的读取和编辑权限,对大批量音频的读取权限),则应用开发者需要向应用市场提交应用所申请的权限,应用市场审核该应用所申请的权限是否合理。比如,文件管理器应用申请获取对大批量文档、图片、视频和音频的访问和编辑权限是合理的,相册应用申请获取对大批量文档的访问和编辑权限是不合理的,但相册应用申请获取对大批量图片和视频的访问和编辑权限就是合理的。
应用市场审核通过后,授予应用权限证书,权限证书用于标识应用能够申请的权限。权限证书可以携带在应用的安装包中。用户的电子设备中安装了应用后,在应用运行过程中,应用申请某项权限,电子设备根据该应用对应的权限证书中是否包括该应用此次申请的该项权限,确定是否显示请求用户
授予该项权限的弹窗。
具体而言,如果该应用对应的权限证书中不包括该应用此次申请的该项权限,则电子设备不显示请求用户授予该项权限的弹窗;如果该应用对应的权限证书中包括该应用此次申请的该项权限,则电子设备显示请求用户授予该项权限的弹窗,进而用户点击同意后,该应用才能够获取此次申请的该项权限。
现有技术中,应用申请存储空间权限时,申请的可能是对存储空间中任意类型的文件(文档、图片、音频、视频等)进行任意类型的操作(读取、写入、编辑等)的权限。用户一旦授予应用存储空间权限,则该应用就能够对任意类型的文件进行任意类型的操作,从而导致文件乱象。
为了解决该问题,本申请实施例还提供了一种文件权限管理机制。从文件类型、操作类型维度,将存储空间权限划分为更加细粒度的多种权限。应用运行过程中,按需申请其执行当前功能所需的对特定类型的文件进行特定类型的操作的权限,进而用户按需授予应用权限。
基于此,本申请实施例提供一种文件管理、应用管理的方法,通过在权限配置中将终端设备的权限设置为应用市场管控方式,应用市场基于应用类型确定应用是否具有直接访问公共数据的权限,在确定该应用具有直接访问公共数据的权限时,应用市场根据该应用所申请访问的文件类型授予该应用相应的合理的访问权限,从而应用可以基于被授权的权限访问相应的文件,可以避免公共数据混乱。
如图4所示,为本申请实施例提供的一种应用访问手机中的文件的示意图。
其中,应用市场用于审核应用所申请的权限,例如,应用市场审核某一应用是否具有申请图片/视频、音频、文档等的权限。
应用用于访问本地设备、局域网内设备、云盘等设备上的文件。
文件管理模块是应用访问文件的主要功能模块,可以提供应用访问数据的接口,校验应用申请的权限,以及管理本地设备、局域网设备及云盘上的文件。其中,本地设备上的文件包括存放在该本地设备上的图片/视频、音频、文档等,局域网设备上的文件包括存放在该局域网设备上的图片/视频、音频、文档等,云盘上的文件包括存放在该云盘上的图片/视频、音频、文档等。
本申请实施例中,当某一新开发的应用携带申请权限的证书上架时,应用市场可以先对该新开发的应用所申请的权限进行审核,审核该新开发的应用所申请的权限与该新开发的应用应当具备的权限是否一致,当确定该新开发的应用所申请的权限与其应当具备的权限一致时,应用市场可以认证该新开发的应用所申请的权限通过;当确定该新开发的应用所申请的权限与其应当具备的权限不一致时,应用市场可以认证该新开发的应用所申请的权限不通过。在应用市场认证该新开发的应用所申请的权限通过的情况下,当用户打开或访问图片/视频或音频或文档时,文件管理模块再审核该新开发的应用是否已经获取到访问相应文件的权限,例如,有的应用可能仅具有访问图片/视频的权限,有的应用可能仅具有访问音频的权限,有的应用可能仅具有访问文档的权限等,此时文件管理模块审核的是该新开发的应用所申请访问的文件与应用市场认证通过的权限是否一致。文件管理模块在确认该新开发的应用已经获取到访问相应文件的权限后,文件管理模块可以返回用户所访问的文件。
如图5所示,为本申请实施例提供的另一种应用访问文件的示意图。其中,图中所示的模块主要可用于实现以下功能:权限校验功能、文件访问功能、目录管理功能、统一元数据管理功能。
1、权限校验功能:该功能可以通过应用市场,文件管理模块中的校验权限模块实现。
(1)应用市场模块可以用于审核应用是否具有申请图片/视频、音频、文档等的权限。示例性地,有的应用不应当具有申请图片/视频、音频、文档等的权限,该类应用可以称为非管理类应用,如
等;有的应用可以具有申请图片/视频、音频、文档等的权限,该类应用可以称为管理类应用,如相机、图库、文件管理器等。
(2)校验权限模块可以用于校验应用在打开或访问图片/视频、音频、文档时是否已经获取到对应的权限。示例性地,有的应用有打开或访问图片/视频的权限,并不具有打开或访问文档的权限,如相机、图库等,该权限校验模块主要是校验应用是否成功获取到打开或访问图片/视频的权限;有的应用有打开或访问文档的权限,并不具有打开或访问音频的权限,如WPS等,该权限校验模块主要是校验应用是否成功获取到打开或访问文档的权限;有的应用有打开或访问音频的权限,并不具有打开或访问图片/视频的权限,如录音专家等,该权限校验模块主要是校验应用是否成功获取到打开或访问音频的权限。
当然,在一些可能的实现方式中,有的应用可以同时有打开或访问音频、图片/视频以及文档的权限,如文件管理器等。
综上,用户利用管理类应用访问手机中的文件的时候,需要向用户申请权限,且在用户同意所申请的权限后,即该管理类应用成功获取到访问手机中的文件的权限后,应用才可以访问相应权限的文件,如某一管理类应用向用户申请打开或访问图片/视频的权限,用户同意申请后,该管理类应用才可以访问手机中的图片/视频;用户利用非管理类应用访问手机中的文件的时候,无需向用户申请权限,应用通过调用操作系统提供的system picker的API可以从文件管理模块获取用户所选择的文件。
需要说明的是,本申请实施例中的管理类应用为:依赖于访问电子设备中的全量的某一类或某几类的文件以实现其主要功能的应用,如相册这一应用依赖于访问电子设备中的全量图片和视频类的文件以实现其主要功能,即浏览电子设备中全量的图片和视频;非管理类应用为不依赖于访问电子设备中的全量的某一类或某几类的文件以实现其主要功能的应用,如微信○R这一应用,微信作为社交类应用,不依赖于访问电子设备中的全量图片和视频类、音频类、文档类中的某一类或某几类的文件以实现其主要功能(即时通讯),而是通过调用操作系统提供的system picker的API从文件管理模块中获取用户所选择的文件,比如通过调用system picker的API获取用户所选择的要发送给聊天对象的图片。
2、文件访问功能:该功能可以通过文件管理模块中的文件访问模块实现。
文件访问模块可以用于:
(1)提供应用访问文件的API;
(2)将公共数据存放为文件管理模块的沙箱数据,其他应用通过文件访问模块提供的API可以从文件管理模块中获取想要的数据。
3、目录管理功能:该功能可以通过文件管理模块中的目录管理模块实现。
目录管理模块可以用于:
(1)设置对外开放的目录并暴露对应的API,即设置图片/视频类、音频类、文档类这三大类目录,且对于不同的类型可以提供不同的API;
(2)检验存放的文件是否符合目录的规划,即检验图片/视频这类文件是否存放在图片/视频类这一目录,检验音频这类文件是否存放在音频类这一目录,检验文档这类文件是否存放在文档类这一目录。
4、统一元数据管理功能:该功能可以通过文件管理模块中的元数据管理模块实现。
元数据管理模块可以用于:管理和同步元数据,元数据包括本地设备、局域网设备、云盘等设备的元数据,此外,该模块对于元数据的管理可以包括对于元数据的删除、收藏等。
为了便于理解,本申请以下实施例将以主设备为具有图1和图2所示结构的手机为例,结合附图对本申请实施例提供的方案进行具体阐述。其中,图6~图8示意了管理类应用获取手机中的文件的方法,图9示意了取消管理类应用访问手机中的文件的权限的方法,图10~图11示意了非管理类应用获取手机中的文件的方法。
图6示出了手机的一组图形用户界面(graphical user interface,GUI),其中,从图6中的(a)到图6中的(k)示出了手机中的应用1访问手机中的照片的方法,且应用1为管理类应用,假设开发者在开发应用1的时候向应用市场提交该应用1可以申请的权限为读写图片/视频和音频,而应用市场审核该应用1仅具备申请读写图片/视频的权限并授予该应用1能够申请读写图片/视频的权限的证书。
参见图6中的(a)所示的GUI,该GUI为手机的桌面。当手机检测到用户点击桌面上的应用1的图标801的操作后,可以启动该应用1,显示如图6中的(b)所示的GUI,该GUI可以称为访问准备界面。
参见图6中的(b)所示的GUI,界面显示:应用1的主界面(如图中所示的xxxxxxxxxxxxxxxxxxxxxxx),且主界面的右下角可以包括图标○+,当手机检测到用户点击该图标○+802的操作后,可以显示如图6中的(c)所示的GUI。
参见图6中的(c)所示的GUI,界面显示:应用1的主界面。此外,该应用1的主界面的左下角可以包括相册和音频的图标。用户可以点击相册或音频所对应的图标,当手机检测到用户点击该音频的图标803的操作后,界面不会显示新的界面;当手机检测到用户点击该相册的图标803的操作后,
可以显示如图6中的(d)所示的GUI。这是因为开发者在开发该应用1的时候,想要该应用1具有申请图片/视频和音频的权限,所以图6中的(c)中显示相册和音频的图标;但是应用市场审核该应用1仅具备申请图片/视频的权限,并不具备申请音频的权限,从而应用市场可以授予该应用1能够申请图片/视频的权限的证书。因此,当用户点击音频的图标,手机界面不会显示新的界面,当用户点击相册的图标,可以显示新的界面,如图6中的(d)所示的GUI。
需要说明的是,在一些可能的实现方式中,图6中的(c)所示的GUI为可选界面,换句话说,当手机检测到用户点击该图标○+802的操作后,可以直接显示图6中的(d)所示的GUI。
参见图6中的(d)所示的GUI,界面显示:应用1的主界面(如图中所示的xxxxxxxxxxxxxxxxxxxxxxx),且在主界面之上显示一个申请获取访问手机中的图片的权限的弹框,该弹框内容包括:“应用1”想访问您的照片,访问你的图片权限,可以访问图片、视频等,请允许授权。若用户点击允许的图标,则应用1可以获取访问该手机的图片的权限,若用户点击不允许的图标,则应用1不能获取访问该手机的图片的权限。当手机检测到用户点击不允许的图标的操作后,该申请访问手机中的图片的权限的弹框自动消失,界面显示应用1的主界面。当手机检测到用户点击允许的图标804的操作后,可以显示如图6中的(e)所示的GUI。
参见图6中的(e)所示的GUI,界面显示该手机的相册内的所有照片,并对照片进行了分类,包括:全部照片、相机、视频、截屏录屏、我的收藏等。同时界面还显示一个保护用户隐私的弹框,该弹框的内容包括:分享隐私保护,主要包括去除照片位置信息(如手机拍摄的定位信息)和控制照片位置信息的控件1,以及去除照片拍摄数据(如手机拍摄的型号、参数等)和控制照片拍摄数据的控件2。其中,用户通过控件1可以控制应用1是否可以获取照片的位置信息,若控件1中的圆圈位于控件1的左侧,则表示应用1能够获取照片的位置信息,若控件1中的圆圈位于控件1的右侧,则表示应用1不能获取照片的位置信息。类似地,用户通过控件2可以控制应用1是否可以获取照片拍摄的数据,若控件2中的圆圈位于控件2的左侧,则表示应用2能够获取照片拍摄的数据,若控件2中的圆圈位于控件2的右侧,则表示应用1不能获取照片拍摄的数据。当前界面显示的控件1中的圆圈位于控件1的左侧,控件2中的圆圈位于控件2的左侧。当手机检测到用户滑动控件1的圆圈805至控件1的右侧,以及滑动控件2的圆圈805至控件2的右侧的操作后,则可以显示如图6中的(f)所示的GUI。
参见图6中的(f)所示的GUI,可以看出,控件1的圆圈位于控件1的右侧,控件2的圆圈位于控件2的右侧,表示应用1不能获取照片的位置信息和照片拍摄的数据。当手机检测到用户点击确定的图标806的操作后,可以显示如图6中的(g)所示的GUI。
参见图6中的(g)所示的GUI,界面显示该手机的相册内的所有照片,并对照片进行了分类,包括:全部照片、相机、视频、截屏录屏等。用户可以点击任一图标,以查看想要访问的照片。当手机检测到用户点击全部照片的图标807的操作后,可以显示如图6中的(h)所示的GUI。
参见图6中的(h)所示的GUI,界面显示相册内的全部照片,用户可以从中选择查看部分照片。假设用户选择了图片A和图片B,则图片A和图片B的右下角出现图标○√,表示用户想要查看这两张图片,然后用户可以进一步点击界面的右下角的图标“确定”。当手机检测到用户点击确定的图标808的操作后,可以显示如图6中的(i)所示的GUI。
参见图6中的(i)所示的GUI,图中显示图片A和图片B,此时用户可以分别点击图片A、图片B对图片进行查看。当手机检测到用户点击图片A的图标809的操作后,可以显示如图6中的(j)所示的GUI。
参见图6中的(j)所示的GUI,界面显示图片A,且界面的下方还包括一些控件,如编辑、删除、收藏、重命名、详情等。用户可以对图片A进行进一步的操作,当手机检测到用户点击编辑的图标810的操作后,可以显示如图6中的(k)所示的GUI。
需要说明的是,由于应用市场审核该应用1具备申请写入图片/视频的权限并授予该应用1能够申请写入图片/视频的权限的证书,因此,当手机检测到用户点击编辑的图标810的操作后,可以显示如图6中的(k)所示的GUI。
参见图6中的(k)所示的GUI,界面除了显示图片A和一些控件外,还显示一个申请获取编辑、删除手机中的照片的权限以及在该手机中创建照片的权限的弹框,该弹框内容包括:“应用1”想编辑、删除您的照片,以及创建照片,获取编辑、删除、创建照片权限,可以编辑、删除、创建图片、视频
等,请允许授权。若用户点击允许的图标,则应用1可以获取编辑、删除该手机的照片的权限以及在该手机中创建照片的权限;若用户点击不允许的图标,则应用1不能获取编辑、删除该手机的照片的权限以及在该手机中创建照片的权限。当手机检测到用户点击不允许的图标的操作后,该申请编辑、删除手机中的照片的权限以及申请创建照片的权限的弹框自动消失,界面显示图片A。当手机检测到用户点击允许的图标811的操作后,可以显示上述如图6中的(j)所示的GUI。此时,用户可以基于这些控件对图片A进行进一步操作。
本申请实施例中,上述图6示出了管理类应用访问和编辑、删除、创建图片/视频的GUI图,可以看出,当用户通过管理类应用访问手机中的图片/视频时,由于该应用的权限证书中包含具备申请读写图片/视频的权限,应用可以向用户弹框申请访问该手机中的图片/视频权限,在应用获取到访问该手机中的图片/视频的权限的情况下,当用户需对访问的图片进行进一步操作时,由于该应用的权限证书中包含具备申请写入图片/视频的权限,应用可以向用户弹框申请编辑、删除、创建图片/视频的权限,换句话说,本申请实施例中的管理类应用弹框的时机是基于该管理类应用的需求而弹框,且弹框申请的文件包括某一类文件,而现有技术中应用弹框申请的是磁盘上的全部文件,包括图片/视频、音频、文档。
当然,在一些可能的实现方式中,应用申请弹框的响应条件不局限于上述图6所示出的,例如,应用弹框申请访问该手机中的图片权限的响应条件可以是该应用启动时,应用弹框申请编辑、删除、创建照片的权限的响应条件可以是该应用访问该手机中的图片权限被允许时,不予限制。
需要说明的是,触发应用弹框申请权限的动作可以由开发者开发应用时而定,在一些可能的实现方式中,触发应用弹框申请权限的动作可以在其它任一可能的步骤之后。
图7示出了手机的又一组GUI,其中,从图7中的(a)到图7中的(g)示出了手机中的应用2访问手机中的音频的方法,且应用2为管理类应用,假设开发者在开发应用2的时候向应用市场提交该应用2可以申请的权限为读写音频,以及应用市场审核该应用2具备申请读写音频的权限并授予该应用2能够申请读写音频的权限的证书。
参见图7中的(a)所示的GUI,该GUI为手机的桌面。当手机检测到用户点击桌面上的应用2的图标1001的操作后,可以启动该应用2,显示如图7中的(b)所示的GUI,该GUI可以称为访问准备界面。
参见图7中的(b)所示的GUI,界面显示:应用2的主界面(如图中所示的xxxxxxxxxxxxxxxxxxxxxxx),此外,该应用2的主界面的右下角包括图标○+。当手机检测到用户点击该图标○+1002的操作后,可以显示如图7中的(c)所示的GUI。
参见图7中的(c)所示的GUI,界面显示:应用2的主界面。此外,该应用2的主界面的左下角包括音频这一图标。当手机检测到用户点击该音频的图标1003的操作后,可以显示如图7中的(d)所示的GUI。
类似地,在一些可能的实现方式中,图7中的(c)所示的GUI为可选界面,换句话说,当手机检测到用户点击该图标○+1002的操作后,可以直接显示图7中的(d)所示的GUI。
参见图7中的(d)所示的GUI,界面显示:应用2的主界面(如图中所示的xxxxxxxxxxxxxxxxxxxxxxx),且在主界面之上显示一个申请获取访问手机中的音频权限的弹框,该弹框内容包括:“应用2”想访问您的音频,获取访问你的音频权限,可以访问歌曲、录音等,请允许授权。若用户点击允许的图标,则应用2可以获取访问该手机的音频的权限,若用户点击不允许的图标,则应用2不能获取访问该手机的音频的权限。当手机检测到用户点击不允许的图标的操作后,获取访问手机中的音频的权限的弹框自动消失,界面显示应用2的主界面。当手机检测到用户点击允许的图标1004的操作后,可以显示如图7中的(e)所示的GUI。
参见图7中的(e)所示的GUI,图中显示手机内的所有音频,包括歌曲、录音、其他音频等。当前界面显示的音频是歌曲,用户可以点击任一歌曲的图标,以播放用户想要听的歌曲。当手机检测到用户点击歌曲1的图标1005的操作后,可以显示如图7中的(f)所示的GUI。
参见图7中的(f)所示的GUI,图中显示与歌曲1的相关信息,且界面的右下角显示更多这一控件,用户可以点击控件“更多”对歌曲1进行进一步操作。当手机检测到用户点击更多这一控件1006的操作后,可以显示如图7中的(g)所示的GUI。
参见图7中的(g)所示的GUI,图中显示与歌曲1的相关信息,且在该界面之上显示一个申请获取编辑、删除手机中的音频权限以及在该手机中创建音频的权限的弹框,该弹框内容包括:“应用2”想编辑、删除您的音频,以及创建音频,获取编辑、删除、创建音频权限,可以编辑、删除、创建歌曲、录音等,请允许授权。若用户点击允许的图标,则应用2可以获取编辑、删除该手机的音频的权限以及在该手机中创建音频的权限;若用户点击不允许的图标,则应用2不能获取编辑、删除该手机的音频的权限以及在该手机中创建音频的权限。当手机检测到用户点击不允许的图标的操作后,该申请编辑、删除手机中的音频的权限以及申请创建音频的权限的弹框自动消失,界面显示与歌曲1的相关信息。当手机检测到用户点击允许的图标1007的操作后,可以显示如上述图7中的(f)所示的GUI。此时,用户可以对该歌曲1进行进一步操作,如二次创作、调整歌词、设置音效等等。
本申请实施例中,上述图7示出了管理类应用访问和编辑、删除、创建音频的GUI图,可以看出,当用户通过管理类应用访问手机中的音频时,由于该应用的权限证书中包含具备申请读取音频的权限,应用可以向用户弹框申请访问该手机中的音频权限,在应用获取到访问该手机中的音频的权限的情况下,当用户需对访问的音频进行进一步操作时,由于该应用的权限证书中包含该应用具备申请写入音频的权限,应用可以向用户弹框申请编辑、删除、创建音频的权限,而现有技术中应用弹框申请的是磁盘上的全部文件,包括图片/视频、音频、文档。
图8示出了手机的再一组GUI,其中,从图8中的(a)到图8中的(g)示出了手机中的应用3访问手机中的文档的方法,且应用3为管理类应用,假设开发者在开发应用3的时候向应用市场提交该应用3可以申请的权限为读写文档,以及应用市场审核该应用3具备申请读写文档的权限并授予该应用3能够申请读写文档的权限的证书。
参见图8中的(a)所示的GUI,该GUI为手机的桌面。当手机检测到用户点击桌面上的应用3的图标1101的操作后,可以启动该应用3,显示如图8中的(b)所示的GUI,该GUI可以称为访问准备界面。
参见图8中的(b)所示的GUI,图中显示:应用3的主界面(如图中所示的xxxxxxxxxxxxxxxxxxxxxxx),该应用3的主界面的右下角包括图标○+。当手机检测到用户点击该图标○+1102的操作后,可以显示如图8中的(c)所示的GUI。
参见图8中的(c)所示的GUI,界面显示:应用3的主界面。此外,该应用3的主界面的左下角包括文档这一图标。当手机检测到用户点击该文档的图标1103的操作后,可以显示如图8中的(d)所示的GUI。
类似地,在一些可能的实现方式中,图8中的(c)所示的GUI为可选界面,换句话说,当手机检测到用户点击该图标○+1102的操作后,可以直接显示图8中的(d)所示的GUI。
参见图8中的(d)所示的GUI,界面显示:应用3的主界面(如图中所示的xxxxxxxxxxxxxxxxxxxxxxx),且在主界面之上显示一个申请获取访问手机中的文档权限的弹框,该弹框内容包括:“应用3”想访问您的文档,获取访问你的文档权限,可以访问word、pdf等,请允许授权。若用户点击允许的图标,则应用3可以获取访问该手机的文档的权限,若用户点击不允许的图标,则应用3不能获取访问该手机的文档的权限。当手机检测到用户点击不允许的图标的操作后,该获取访问手机中的文档的权限的弹框自动消失,界面显示应用3的主界面。当手机检测到用户点击允许的图标1104的操作后,可以显示如图8中的(e)所示的GUI。
参见图8中的(e)所示的GUI,图中显示手机内的所有文档,用户可以点击任一图标,以浏览用户想要查看的文档。当手机检测到用户点击文档1的图标1105的操作后,可以显示如图8中的(f)所示的GUI。
参见图8中的(f)所示的GUI,界面显示文档1的内容,且界面的下方还包括一些控件,如字数统计、显示目录、删除、编辑等。用户可以对文档1进行进一步地操作,当手机检测到用户点击编辑的图标1106的操作后,可以显示如图8中的(g)所示的GUI。
参见图8中的(g)所示的GUI,界面显示文档1的内容,且在该界面之上显示一个申请获取编辑、删除手机中的文档权限以及在该手机中创建文档的权限的弹框,该弹框内容包括:“应用3”想编辑、删除您的文档,以及创建文档,获取编辑、删除、创建文档权限,可以编辑、删除、创建word、pdf等,请允许授权。若用户点击允许的图标,则应用3可以获取编辑、删除该手机的文档的权限以及在
该手机中创建文档的权限;若用户点击不允许的图标,则应用3不能获取编辑、删除该手机的文档的权限以及在该手机中创建文档的权限。当手机检测到用户点击不允许的图标的操作后,该申请编辑、删除手机中的文档的权限以及在该手机中创建文档的权限的弹框自动消失,界面显示文档1的内容。当手机检测到用户点击允许的图标1107的操作后,可以显示如上述图8中的(f)所示的GUI。此时,用户可以对该歌曲文档1进行进一步操作,如更改文档内容等。
本申请实施例中,上述图8示出了管理类应用访问和编辑、删除、创建文档的GUI图,可以看出,当管理类应用访问手机中的文档时,由于该应用的权限证书中包含该应用具有申请读取文档的权限,应用可以向用户弹框申请访问该手机中的文档权限,在应用获取到访问该手机中的文档的权限的情况下,当应用需对访问的文档进行进一步操作时,由于该应用的权限证书中包含该应用具有申请写入文档的权限,应用可以弹框申请编辑、删除、创建文档的权限,而现有技术中应用弹框申请的是磁盘上的全部文件,包括图片/视频、音频、文档。
可以理解的是,在一些实施例中,一些应用可以同时申请访问多个文件类别的权限,如应用可以同时申请访问音频和文档的权限,不予限制。
综上,图6~图8示出了管理类应用访问和编辑、删除、创建文件的GUI图,可以看出,当管理类应用访问手机中的文件时,应用弹框申请的文件包括某一类文件,如图6所示的GUI中弹框申请的是图片/视频类,图7所示的GUI中弹框申请的是音频类,图8所示的GUI中弹框申请的是文档类,而现有技术中应用弹框申请的是磁盘上的全部文件,包括图片/视频、音频、文档。
图9示出了手机的再一组GUI,其中,从图9中的(a)到图9中的(e)示出了用户取消手机中的应用访问手机中的图片/视频、音频、文档的方法。
参见图9中的(a)所示的GUI,该GUI为手机的桌面,其中,包括应用1、应用2以及应用3。当手机检测到用户点击桌面上的设置的图标1201的操作后,可以启动该设置,显示如图9中的(b)所示的GUI,该GUI可以称为设置界面。
参见图9中的(b)所示的GUI,图中显示:WLAN、蓝牙、个人热点等可以与其它设备连接的方式,以及手机中的应用等。当手机检测到用户点击应用1的图标1202的操作后,可以显示如图9中的(c)所示的GUI。
参见图9中的(c)所示的GUI,图中显示:系统应用设置、应用管理、桌面图标管理、应用双开、权限管理、服务管理等。其中,权限管理是对于手机中的应用的权限进行管理。当手机检测到用户点击权限管理的图标1203的操作后,可以显示如图9中的(d)所示的GUI。
参见图9中的(d)所示的GUI,图中显示:时钟、日历、相机、图库、应用1、应用2、应用3等多个应用。当手机检测到用户点击应用1的图标1204的操作后,可以显示如图9中的(e)所示的GUI。
参见图9中的(e)所示的GUI,图中显示:应用1读取设备上的图片/视频,且在该行文字的右侧有一个图标○√,表示应用1具备读写设备上的图片/视频的权限;以及应用1写入设备上的图片/视频,且在该行文字的右侧有一个图标○√,表示应用1具备写入设备上的图片/视频的权限。若用户想要取消应用1读取或写入设备上的图片/视频的权限,则可以重新进行设置。当手机检测到用户点击“读取设备上的图片/视频”的图标1205的操作后,可以显示如图9中的(f)所示的GUI。
参见图9中的(f)所示的GUI,图中显示一个弹框,该弹框中的内容包括:应用1读取设备上的图片/视频,在这行文字的下方有两个选项:“拒绝”和“允许”。若用户点击允许,表示同意应用1读取设备上的图片/视频;若用户点击拒绝,表示不同意应用1读取设备上的图片/视频。当手机检测到用户点击拒绝的图标1206的操作后,可以显示如图9中的(g)所示的GUI。
参见图9中的(g)所示的GUI,图中显示:应用1读取设备上的图片/视频,且在该行文字的右侧有一个图标○×,表示应用1不具备读取设备上的图片/视频的权限;以及应用1写入设备上的图片/视频,且在该行文字的右侧有一个图标○×,表示应用1不具备写入设备上的图片/视频的权限。
需要说明的是,当用户点击拒绝应用1读取设备上的图片/视频时,相应地该应用1具备写入设备上的图片/视频的权限自动也取消。
还需要说明的是,若在图9中的(e)所示的GUI,用户点击的是写入设备上的图片/视频,则对于该应用1写入设备上的图片/视频的权限的更改不影响该应用1读取设备上的图片/视频的权限,换句话
说,当用户选择拒绝该应用1写入设备上的图片/视频的权限时,该应用1仍然可以保留读取设备上的图片/视频的权限。
类似地,对于应用2和应用3,也可以根据类似地操作取消相应的权限,在此不再赘述。
图10示出了手机的再一组GUI,其中,从图10中的(a)到图10中的(i)示出了手机中的应用4访问手机中的文件的方法,且应用4为非管理类应用。
参见图10中的(a)所示的GUI,该GUI为手机的桌面。当手机检测到用户点击桌面上的应用4的图标1301的操作后,可以启动该应用4,显示如图10中的(b)所示的GUI,该GUI可以称为应用4的主界面。
参见图10中的(b)所示的GUI,图中显示:应用4的主界面,且在主界面的右上角显示图标○+。当手机检测到用户点击该图标1302的操作后,可以显示如图10中的(c)所示的GUI。
参见图10中的(c)所示的GUI,可以看出,在应用3的主界面之上显示一个弹框,该弹框内包括:相册、音乐、文档以及拍摄等。用户可以点击任一图标,应用4根据用户点击的图标显示不同的界面。
示例性地,当手机检测到用户点击相册的图标1303的操作后,可以显示如图10中的(d)所示的GUI。当手机检测到用户点击音乐的图标1304的操作后,可以显示如图10中的(g)所示的GUI。当手机检测到用户点击文档的图标1305的操作后,可以显示如图10中的(h)所示的GUI。
参见图10中的(d)所示的GUI,界面显示:手机中的全部照片,且这些照片按照一定的顺序排列,如可以按照拍摄时间排列。用户可以从中选择照片进行查看,假设用户选择了图片A2和图片B3,则图片A2的右下角和图片B3的右下角的○中均会出现数字,数字表示选择照片的顺序。当手机检测到用户点击下一步的图标1306的操作后,可以显示如图10中的(e)所示的GUI。
参见图10中的(e)所示的GUI,界面显示图片A2,此外用户可以点击图片A2下方的控件,如标签、裁剪、文字、边框、旋转等进行进一步地操作。若用户想要查看在图10中的(d)中选择的B3的照片,则可以用手向左滑动。当手机检测到用户按照图中所示的方向滑动的操作后,可以显示如图10中的(f)所示的GUI。
参见图10中的(f)所示的GUI,界面显示图片B3,此外用户可以点击图片B3下方的控件,如标签、裁剪、文字、边框、旋转等进行进一步地操作。当手机检测到用户点击旋转的图标1307的操作后,可以显示如图10中的(g)所示的GUI。
参见图10中的(g)所示的GUI,图中显示图片B3和一些控件外,还显示一个申请获取编辑、删除手机中的照片的权限以及在该手机中创建照片的权限的弹框,该弹框内容包括:“应用4”想编辑、删除您的照片,以及创建照片,获取编辑、删除、创建照片权限,可以编辑、删除、创建图片、视频等,请允许授权。若用户点击允许的图标,则应用4可以获取编辑、删除该手机的照片的权限以及在该手机中创建照片的权限;若用户点击不允许的图标,则应用4不能获取编辑、删除该手机的照片的权限以及在该手机中创建照片的权限。当手机检测到用户点击不允许的图标的操作后,该申请编辑、删除手机中的照片的权限以及申请创建照片的权限的弹框自动消失,界面显示图片B3。当手机检测到用户点击允许的图标1308的操作后,可以显示上述如图10中的(f)所示的GUI。此时,用户可以基于这些控件对图片B3进行进一步操作。
参见图10中的(h)所示的GUI,图中显示手机内的所有音频,用户可以点击任一图标,以播放用户想要听的音频。当前界面显示的歌曲,用户可以点击任一歌曲的图标,以播放用户想要听的歌曲。此外,用户还可以对音频进行编辑,类似地,若用户想要对音频进行编辑,手机界面也会显示一个申请编辑、删除、创建音频的权限,当用户点击允许的图标后,可以对音频进行进一步编辑。
参见图10中的(i)所示的GUI,图中显示手机内的所有文档,用户可以点击任一图标,以浏览用户想要查看的文档。此外,用户还可以对文档进行编辑,类似地,若用户想要对文档进行编辑,手机界面也会显示一个申请编辑、删除、创建文档的权限,当用户点击允许的图标后,可以对文档进行进一步编辑。
图11示出了手机的再一组GUI,其中,从图11中的(a)到图11中的(h)示出了手机中的应用5访问手机中的文件的方法,且应用5为非管理类应用。
参见图11中的(a)所示的GUI,该GUI为手机的桌面。当手机检测到用户点击桌面上的应用5
的图标1401的操作后,可以启动该应用5,显示如图11中的(b)所示的GUI,该GUI可以称为应用5的主界面。
参见图11中的(b)所示的GUI,图中显示:应用5的主界面,该应用5的主界面包括多个联系人,如张三、李四等。当手机检测到用户点击联系人张三的图标1402的操作后,可以显示如图11中的(c)所示的GUI。
参见图11中的(c)所示的GUI,可以看出,在与张三的聊天的界面的下方显示多个控件,这些控件包括:相册、拍摄、视频通话、位置、红包、音乐、语音输入以及文档等。用户可以点击任一图标,应用5根据用户点击的图标显示不同的界面。
示例性地,当手机检测到用户点击相册的图标1403的操作后,可以显示如图11中的(d)所示的GUI。当手机检测到用户点击音乐的图标1404的操作后,可以显示如图11中的(g)所示的GUI。当手机检测到用户点击文档的图标1405的操作后,可以显示如图11中的(h)所示的GUI。
参见图11中的(d)所示的GUI,界面显示:手机中的全部照片,且这些照片按照一定的顺序排列,如可以按照创建时间排列。用户可以从中选择照片进行查看,假设用户选择了图片A2和图片B3,则图片A2的右下角和图片B3的右下角的○中均会出现数字,数字表示选择照片的顺序。用户可以直接将所选择的图片进行发送,也可以对所选择的图片进行编辑后再发送,当手机检测到用户点击预览的图标1407的操作后,可以显示如图11中的(e)所示的GUI。
参见图11中的(e)所示的GUI,界面显示图片A2,以及界面下方显示多个控件,如标签、裁剪、文字、边框、旋转等。用户可以对该图片A2进行进一步地编辑,并将编辑后的图片进行发送。假设用户对该图片A2进行了旋转,并点击了发送,当手机检测到用户点击发送的图标1408的操作后,可以显示如图11中的(f)所示的GUI。
参见图11中的(f)所示的GUI,在与张三的聊天的界面的下方界面显示图片A2’(该图片A2’为对图片A2进行旋转后的图片)和图片B3。示例性地,若用户想要查看图片A2’,则可以点击图片A2’;若用户想要查看图片B3,则可以点击图片B3。
参见图11中的(g)所示的GUI,图中显示手机内的所有音频,用户可以点击任一图标,以发送用户想要发送的音频。当前界面显示的歌曲,用户可以点击任一歌曲的图标,将所选择的歌曲进行发送。当然,在一些可能的实现方式中,用户可以先对所选择的歌曲进行编辑,将编辑后的歌曲进行发送。
参见图11中的(h)所示的GUI,图中显示手机内的所有文档,用户可以点击任一图标,以发送用户想要发送的文档。当然,在一些可能的实现方式中,用户可以先对所选择的文档歌曲进行编辑,将编辑后的文档进行发送。
综上所述,图10和图11均示出了手机中的非管理类应用访问和编辑手机中的文件的步骤,与上述图6~图8不同的是,应用4和应用5在访问手机中的文件的时候,并未向手机申请获取访问手机中的文件的权限,当用户打开应用4或应用5的时候,可以直接查看手机中的文件,且可以对所查看的文件进行进一步地编辑。然而在图10中用户利用应用4在对手机中的文件进行进一步操作的时候,界面显示一个申请编辑、删除、创建文件的权限的弹框,而在图11中用户利用应用5在对手机中的文件进行进一步操作的时候,界面并未显示申请编辑、删除、创建文件的权限的弹框,主要是因为用户利用应用4需要将编辑后的文件保存至手机的内存中,而用户利用应用5是将编辑后的文件发送至另一联系人而已,并未将编辑后的文件进行保存。
此外,从图10和图11还可以看出,用户利用不同的应用获取手机中的文件的过程中,手机界面显示的文件的排序是一致的,这是因为不同的应用均是通过统一的system picker的API从文件管理模块中获取文件的。例如,图10和图11中用户分别利用应用4和应用5获取手机中的图片的过程中,界面显示的全部照片的排序是一致的,如图10中的(d)所示的GUI中,界面显示的全部照片按照A1、A2、A3、A4、B1、B2、B3、B4、……、I1、I2、I3、I4的顺序排列,图11中的(d)所示的GUI中,界面显示的全部照片也是按照A1、A2、A3、A4、B1、B2、B3、B4、……、I1、I2、I3、I4的顺序排列的。
再例如,图10和图11中用户分别利用应用4和应用5获取手机中的音频的过程中,界面显示的歌曲的排序是一致的,如图10中的(h)所示的GUI中,界面显示的歌曲按照歌曲1、歌曲2、歌曲3、
歌曲4、歌曲5、歌曲6、歌曲7的顺序排列,图11中的(g)所示的GUI中,界面显示的歌曲也是按照歌曲1、歌曲2、歌曲3、歌曲4、歌曲5、歌曲6、歌曲7的顺序排列的。
再例如,图10和图11中用户分别利用应用4和应用5获取手机中的文档的过程中,界面显示的文档的排序是一致的,如图10中的(i)所示的GUI中,界面显示的文档按照文档1、文档2、文档3、文档4、文档5、文档6的顺序排列,图11中的(h)所示的GUI中,界面显示的文档也是按照文档1、文档2、文档3、文档4、文档5、文档6的顺序排列的。
如图12所示,为本申请实施例提供的一种文件管理、应用管理的方法示意图。该方法可以包括步骤S1510~S1548。
S1510,应用携带证书向应用市场注册。
若该证书中包括申请权限,则执行步骤S1512,若该证书中不包括申请权限,则执行步骤S1518。
本申请实施例中的应用所携带的证书可以包括申请权限,也可以不包括申请权限,不予限制。
本申请实施例中,应用携带的证书中所申请的权限可以包括1个或多个。例如,若应用携带的证书中所申请的权限为1个,则应用可以携带申请图片/视频的权限的证书,或者,应用可以携带申请音频的权限的证书,或者,应用可以携带申请文档的权限的证书。若应用携带的证书中所申请的权限为2个,则应用可以携带申请图片/视频和音频的权限的证书,或者,应用可以携带申请图片/视频和文档的权限的证书,或者,应用可以携带申请文档和音频的权限的证书。若应用携带的证书中所申请的权限为3个,则应用可以携带申请图片/视频、音频以及文档的权限的证书。
需要说明的是,本申请实施例中的图片/视频、音频以及文档均是公共数据,为了便于理解,下文结合图13介绍公共数据的概念。
从图13中可以看出,用户数据可以包括本机数据、从分布式设备同步的数据、以及可插拔设备的数据。其中,本机数据包括应用数据和公共数据,公共数据包括相机、图片、视频、音频、文档、下载等。上文示出的图片/视频、音频、文档等文件可以为该图13中所示的公共数据。
上文中将文件分类为:图片/视频、音频、文档,如图14所示,为本申请实施例提供的一种文件分类的示意图。
参考图14,可以将手机中的文件分为图片/视频类、音频类、文档类这三类,这三类分别可以对应三个根目录,这三个根目录分别为:“目录1:图片/视频类”,“目录2:音频类”,“目录3:文档类”。其中,“目录1:图片/视频类”可以包括相机拍摄的照片、图片(如图库、美图秀秀中的图片)、视频(如图库、美图秀秀中的视频等)、从网络上下载的图片或视频等;“目录2:音频类”可以包括音频(如音乐、录音等)、从网络上下载的音频等;“目录3:文档类”可以包括文档(如文件管理器中的文档)、从网络上下载的文档等。
当然,在一些实施例中,也可以设置混合存放的目录,如“目录4:音频类和文档类”,“目录5:图片/视频类和文档类”,等等。
需要说明的是,不同目录下可以存放对应类型的文件,不允许跨类别存放,可以通过后缀名加以限制。例如,相机的后缀名可以为camera、图片的后缀名可以为image、视频的后缀名可以为video、音频的后缀名可以为audio、文档的后缀名可以为document、下载的后缀名可以为download。
目录1存放图片/视频类文件,该目录1中可以存放后缀名为camera、image、video、download的文件;目录2存放音频类文件,该目录2中可以存放后缀名为audio、download的文件,目录3存放文档类文件,该目录3中可以存放后缀名为document、download的文件。目录4存放音频类和文档类文件,该目录4中可以存放后缀名为audio、download,以及document的文件,目录5存放图片/视频类和文档类文件,该目录5中可以存放后缀名为camera、image、video、download,以及document的文件。
还需要说明的是,应用在访问根目录中的过程中,不可以随意在已设置的根目录外创建新的目录或新的文件。
示例性地,如上所述,已设置的目录包括三个根目录,这三个根目录分别为:“目录1:图片/视频类”,“目录2:音频类”,“目录3:文档类”;且应用1具备读取图片/视频类的权限,则应用1在访问目录1的过程中,可以在目录1下创建新的子目录,不可以在目录1、目录2、目录3之外创建新的目录,也不可以在目录1、目录2、目录3之外创建新的文件。
若应用需要将新的文件存储于文件管理模块中,可以通过文件访问框架(file access framework,FAF)的接口存储于对应目录中。例如,若应用1需要将新的图片存储于文件管理模块中,可以通过FAF的接口存储于上述所示的“目录1:图片/视频类”中;若应用3需要将新的文档存储于文件管理模块中,也可以通过FAF的接口存储于上述所示的“目录3:文档类”中。
当然,在一些可能的实现方式中,也可以将文件分为图片类、视频类、音频类、文档类这四类,不予限制。
本申请实施例中,电子设备中的文件可以均存储于文件管理模块中,而现有技术中各个应用使用独立的空间保存各自的文件,如图15所示,为一种基于iOS(该iOS是苹果公司为iPhone开发的操作系统)沙箱限制的示意图。
对于装载iOS的设备,其公共数据管理是基于严格的应用沙箱限制。每个应用都使用独立的空间保存数据,不同应用之间的数据不共享。以图库和文件管理器为例,图库内的文件,想在文件管理器看到,需要图库内的文件复制到文件管理器;同样地,文件管理器内的文件,想在图库看到,需要将文件管理器内的文件复制到图库;浪费存储资源。
本申请实施例提供的方案,电子设备中的文件可以均存储于文件管理模块中,当具有获取相应文件的权限的应用后续需要获取电子设备中的相应文件时,均可以从文件管理模块中获取,与现有技术中各个应用使用独立的空间保存各自的文件相比,本申请实施例的方案可以减少存储资源的浪费。
S1512,应用市场审核证书中所申请的权限是否合理。
若是,则执行步骤S1514;若否,则执行步骤S1516。
本申请实施例中,应用市场审核应用携带的证书中所申请的权限是否合理可以理解为:应用市场审核应用携带的证书中所申请的权限是否与该应用应当具备的权限一致。
例如,假设某一应用应当具备访问或操作图片/视频的权限,若该应用携带申请访问或操作图片/视频的权限的证书向应用市场注册,应用市场审核后发现该应用所申请的权限合理,则应用市场认证该应用所申请的访问或操作图片/视频的权限通过;若该应用携带申请访问或操作音频的权限的证书向应用市场注册,应用市场审核后发现该应用所申请的权限不合理,则应用市场认证该应用所申请的访问或操作音频的权限不通过。
需要说明的是,本申请实施例中,某一应用应当具备的权限可以由开发者在开发该应用的时候,可以将其所应当具备的权限写入在该应用的文件包中,应用市场可以从该应用的文件包中获取该应用应当具备的权限,并根据所获取的该应用应当具备的权限审核该应用所申请的权限是否合理。
S1514,应用市场认证应用所申请的权限通过。
S1516,应用市场认证应用所申请的权限不通过。
S1518,应用调用picker的API访问文件管理模块中的文件。
可以理解的是,本申请实施例中,当应用所携带的证书中包括申请权限时,应用市场可以通过或不通过该应用所申请的权限;当应用所携带的证书中不包括申请权限时,应用市场不会对该应用进行审核,若该应用需要访问手机中的文件时,可以直接通过调用system picker的API访问手机中的文件。
本申请实施例中,在应用市场认证应用所申请的权限不通过的情况下,应用可以通过调用system picker的API访问文件管理模块中的文件,从而用户可以获得相应的文件。例如,上述图10所示的GUI中,用户通过应用4访问手机中的文件,应用4可以通过调用system picker的API访问手机中的图片/视频、音频以及文档等,以呈现给用户;上述图11中,用户通过应用5访问手机中的文件,应用5可以通过调用system picker的API访问手机中的图片/视频、音频以及文档等,以呈现给用户。
S1520,用户启动应用且访问文件,应用调用文件管理模块的接口访问文件管理模块中的文件。
S1521,应用弹框申请访问文件的权限。
需要说明的是,本申请实施例中,开发者可以将终端设备上的图片/视频、音频、文档配置为访问控制列表(access control list,ACL)模式,以使得终端设备上的应用具备向用户弹框申请访问、编辑、删除文件以及创建文件的权限。
还需要说明的是,当应用调用文件管理模块的接口访问文件管理模块中的文件时,电子设备可能会显示向用户弹框申请访问文件的权限的界面,也可能不会显示向用户弹框申请访问文件的权限的界面,这主要与该应用对应的权限证书中是否包括该应用所申请的权限有关。具体地,若该应用对应的
权限证书中包括该应用所申请的访问文件的权限,则电子设备可以显示向用户弹框申请访问文件的权限的界面;若该应用对应的权限证书中不包括该应用所申请的访问文件的权限,则电子设备不会显示向用户弹框申请访问文件的权限的界面。
假设该应用对应的权限证书中包括该应用所申请的访问文件的权限,则电子设备可以显示向用户弹框申请访问文件的权限的界面。示例性地,当应用1申请访问手机中的图片/视频的时候,则该手机可以显示向用户弹框申请访问图片/视频的权限的界面,如上述图6中的(d)所示的GUI,且该GUI显示了一个弹框:“应用1”想要访问您的照片,获取访问你的图片权限,可以访问图片、视频等,请允许授权。
再例如,当应用2申请访问手机中的音频的时候,则该手机可以显示向用户弹框申请访问音频的权限的界面,如上文图7中的(d)所示的GUI,且该GUI显示了一个弹框:“应用2”想访问您的音频,获取访问你的音频权限,可以访问歌曲、录音等,请允许授权。
再例如,应用3申请访问手机中的文档的时候,则该手机可以显示向用户弹框申请访问文档的权限。如上文图8中的(d)所示的GUI,且该GUI显示了一个弹框:“应用3”想访问您的文档,获取访问你的文档权限,可以访问word、pdf等,请允许授权。
S1522,用户同意应用所申请的权限。
S1524,用户不同意应用所申请的权限。
可以理解的是,步骤S1524和S1526中应用所申请的权限即为:应用申请访问文件的权限。
S1526,应用将申请到的权限注册到权限校验模块。
本申请实施例中,在用户同意应用所申请的权限的情况下,应用可以将申请到的权限注册到权限校验模块,即将申请到的访问文件的权限注册到权限校验模块中。
例如,上述图6中的(d)所示的GUI,“应用1”申请访问手机中的照片的权限,在用户点击允许的图标后,应用1可以将申请到的访问照片的权限注册到权限校验模块中。
再例如,上述图7中的(d)所示的GUI,“应用2”申请访问手机中的音频的权限,在用户点击允许的图标后,应用2可以将申请到的访问手机中的音频的权限注册到权限校验模块中。
再例如,上述图8中的(d)所示的GUI,“应用3”申请访问手机中的文档的权限,在用户点击允许的图标后,应用3可以将申请到的访问手机中的文档的权限注册到权限校验模块中。
S1528,权限校验模块校验该应用是否获取到相应的权限。
若是,则执行步骤S1530;若否,则执行步骤S1532。
S1530,返回用户所访问的文件。
S1532,不返回用户所访问的文件。
上述步骤S1521中应用申请访问文件的权限,用户有可能同意应用所申请的权限,也有可能不同意应用所申请的权限。当用户同意应用所申请的权限时,该应用可以将所申请的权限注册到权限校验模块中,虽然应用将所申请的权限注册到权限校验模块中,但是,对于用户的行为,权限校验模块并不知晓,且权限校验模块并不清楚该应用所注册的权限的真假,因此,权限校验模块可以进一步进行校验,校验该应用是否获取到访问相应文件的权限,并根据校验结果返回或不返回文件。
示例性地,当应用调用文件管理模块的图片/视频接口访问手机中的图片/视频的时候,权限校验模块可以校验该应用是否获取到访问图片/视频的权限,并根据校验结果返回或不返回图片/视频。如上文图6中,在手机检测到用户点击相册的图标803的操作后,若权限校验模块校验应用1已经获取到访问手机中的图片/视频的权限,则可以显示如图6中的(e)所示的GUI;若权限校验模块校验应用1未获取到访问手机中的图片/视频的权限,则可以显示应用1的主界面。
当应用调用文件管理模块的音频接口访问手机中的音频的时候,权限校验模块可以校验该应用是否获取到访问音频的权限,并根据校验结果返回或不返回音频。如上文图7中,在手机检测到用户点击音频的图标1003的操作后,若权限校验模块校验应用2已经获取到访问手机中的音频的权限,则可以显示如图7中的(e)所示的GUI;若权限校验模块校验应用2未获取到访问手机中的音频的权限,则可以显示应用2的主界面。
当应用调用文件管理模块的文档接口访问手机中的文档的时候,权限校验模块可以校验该应用是否获取到访问文档的权限,并根据校验结果返回或不返回文档。如上文图8中,在手机检测到用户点
击文档的图标1103的操作后,若权限校验模块校验应用3已经获取到访问手机中的文档的权限,则可以显示如图8中的(e)所示的GUI;若权限校验模块校验应用3未获取到访问手机中的文档的权限,则可以显示应用3的主界面。
S1534,用户对文件进行进一步操作。
本申请实施例中的进一步操作可以包括对文件的编辑、删除以及创建文件等。
S1536,该应用弹框申请编辑、删除、创建文件的权限。
需要说明的是,本申请实施例中,当用户需要对所访问的文件进行进一步操作时,电子设备可能会显示向用户弹框申请编辑、删除、创建文件的权限的界面,也可能不会显示向用户弹框申请编辑、删除、创建文件的权限的界面,这主要与该应用对应的权限证书中是否包括该应用所申请的权限有关。具体地,若该应用对应的权限证书中包括该应用所申请的编辑、删除、创建文件的权限,则电子设备可以显示向用户弹框申请访问编辑、删除、创建文件的权限的界面;若该应用对应的权限证书中不包括该应用所申请的编辑、删除、创建文件的权限,则电子设备不会显示向用户弹框申请编辑、删除、创建文件的权限的界面。
假设该应用对应的权限证书中包括该应用所申请的编辑、删除、创建文件的权限,则应用可以向用户弹框申请编辑、删除、创建文件的权限。示例性地,当应用1申请编辑、删除手机中的图片/视频以及创建图片/视频的时候,则该手机可以显示向用户弹框申请编辑、删除、创建图片/视频的权限的界面,如上述图6中的(k)所示的GUI,且该GUI显示了一个弹框:“应用1”想编辑、删除您的照片,以及创建照片,获取编辑、删除、创建照片权限,可以编辑、删除创建图片、视频等,请允许授权。
再例如,当应用2申请编辑、删除手机中的音频以及创建音频的时候,则该手机可以显示向用户弹框申请编辑、删除、创建音频的权限的界面,如上文图7中的(g)所示的GUI,且该GUI显示了一个弹框:“应用2”想编辑、删除您的音频,以及创建音频,获取编辑、删除、创建音频权限,可以编辑、删除、创建歌曲、录音等,请允许授权。
再例如,应用3申请编辑、删除手机中的文档以及创建文档的时候,则该手机可以显示向用户弹框申请编辑、删除、创建文档的权限的界面。如上文图8中的(g)所示的GUI,且该GUI显示了一个弹框:“应用3”想编辑、删除您的文档,以及创建文档,获取编辑、删除、创建文档权限,可以编辑、删除、创建word、pdf等,请允许授权。
S1538,用户同意应用所申请的权限。
S1540,用户不同意应用所申请的权限。
可以理解的是,S1538和S1540中应用所申请的权限即为:应用申请编辑、删除、创建文件的权限。
S1542,应用将申请到的权限注册到权限校验模块。
例如,上述图6中的(k)所示的GUI,“应用1”申请编辑、删除、创建照片的权限,在用户点击允许的图标后,应用1可以将申请到的编辑、删除、创建照片的权限注册到权限校验模块中。
再例如,上述图7中的(g)所示的GUI,“应用2”申请编辑、删除、创建音频的权限,在用户点击允许的图标后,应用2可以将申请到的编辑、删除、创建音频的权限注册到权限校验模块中。
再例如,上述图8中的(g)所示的GUI,“应用3”申请编辑、删除、创建文档的权限,在用户点击允许的图标后,应用1可以将申请到的编辑、删除、创建文档的权限注册到权限校验模块中。
S1544,权限校验模块校验该应用是否获取到相应的权限。
若是,则执行步骤S1546;若否,则执行步骤S1548。
S1546,用户有编辑、删除、创建文件的权限。
S1548,用户无编辑、删除、创建文件的权限。
类似地,上述步骤S1536中应用申请编辑、删除、创建文件的权限,用户有可能同意应用所申请的权限,也有可能不同意应用所申请的权限。当用户同意应用所申请的权限时,该应用可以将所申请的权限注册到权限校验模块中,虽然应用将所申请的权限注册到权限校验模块中,但是,对于用户的行为,权限校验模块并不知晓,且权限校验模块并不清楚该应用所注册的权限的真假,因此,权限校验模块可以进一步进行校验,校验该应用是否获取到编辑、删除、创建相应文件的权限,根据校验结果,用户可以进行操作或不可进行操作。
当用户申请到编辑、删除、创建文件的权限后,用户可以在文件管理模块中对文件的元数据信息进行更改,这样其它应用可以从文件管理模块中了解到该文件的元数据信息的变化情况,可以解决目前一些操作系统中存在的某一应用改动元数据信息后,其它应用无法及时获知的问题。
如图16所示,为一种安卓操作系统的元数据分布的示意图。
对于安卓操作系统的公共数据,由媒体库统一管理公共数据的元数据信息,各个应用获取到媒体库的元数据信息后各自生成相应的元数据并对其管理,应用之间的元数据不同步(如回收站、收藏夹、相册、文件管理器等之间的元数据不同步)。不同应用可以访问设备上的图片、文档等文件,但文件的某些元数据信息(如是否为收藏文件、是否为隐藏文件、是否在回收站呈现等)由各个应用独立生成并维护,元数据信息在各应用之间不共享。比如在图库收藏了一张照片,在文件管理器无法看到收藏的信息;反之在文件管理器收藏的重要文件,在图库无法看到。
本申请实施例提供的方案,申请到相应权限的应用可以在管理管理模块中对文件的元数据信息进行改动。例如,假设用户通过应用1访问手机中的照片A后,发现比较喜欢这张照片,可以在文件管理模块中将照片A标识为收藏,当另一应用(该应用也具有访问手机中的图片/视频的权限)访问文件管理模块中的照片A时,就可以了解到该照片A已被标识为收藏。或者,当应用1在文件管理模块中将照片A标识为收藏后,可以将收藏照片A的信息通知其它一些也具有访问手机中的图片/视频的权限的应用,这样其它应用也可以了解到该照片A已被收藏。
再例如,用户通过应用1访问手机中的照片B后,发现不喜欢这张照片,可以在文件管理模块中将这张照片A删除到回收站中,当另一应用(该应用具有访问手机中的图片/视频的权限)访问文件管理模块中的照片A时,就可以了解到该照片A已被删除至回收站中。或者,当应用1在文件管理模块中将照片A删除到回收站后,可以将删除照片A到回收站的信息通知其它一些也具有访问手机中的图片/视频的权限的应用,这样其它应用也可以了解到该照片A已被删除到回收站。
本申请提供的方案,文件管理模块存储公共数据并对公共数据统一进行管理,各个应用均可从文件管理模块中获取相应的数据,可以减少存储资源的耗费;通过在权限配置中将终端设备的权限设置为应用市场管控方式,并基于应用类别确定应用是否具有直接访问和操作公共文件的权限,在确定该应用具有直接访问和操作公共文件的权限时,根据该应用所申请访问或操作的文件类型授予该应用相应的权限,与现有技术中应用开发者自行决定向用户请求授予哪些权限且用户一旦授予则应用就获得相应权限的方案相比,本申请提供的应用市场上架审核机制,可以从源头上避免应用向用户弹框申请授予一些不合理的权限,进一步地,可以避免现有技术中应用获取到一些不合理的权限随之对电子设备中的公共文件随意地进行增删改查而导致的文件乱象问题。此外,某一应用在对文件管理模块中的文件的元数据进行信息改动时,其他应用也可以了解所改动的元数据的信息,可以解决目前一些操作系统中存在的某一应用改动元数据信息后,其它应用无法及时获知的问题。
如图17所示,为本申请实施例提供的另一种文件管理、应用管理的方法示意图。该方法可以包括步骤S1710~S1756。
S1710,应用携带证书向应用市场注册。
若该证书中包括申请权限,则执行步骤S1712,若该证书中不包括申请权限,则执行步骤S1718。
S1712,应用市场审核证书中所申请的权限是否合理。
若是,则执行步骤S1714;若否,则执行步骤S1716。
S1714,应用市场认证应用所申请的权限通过。
S1716,应用市场认证应用所申请的权限不通过。
S1718,应用调用system picker的API接口访问文件管理模块中的文件。
S1720,用户启动应用。
S1721,该应用弹框申请访问文件的权限。
S1722,用户同意应用所申请的权限。
S1724,用户不同意应用所申请的权限。
其中,步骤S1722和S1724中所申请的权限为:应用弹框申请的访问文件的权限。
S1726,应用将申请到的权限注册到权限校验模块。
S1736,该应用弹框申请编辑、删除、创建文件的权限。
S1738,用户同意应用所申请的权限。
S1740,用户不同意应用所申请的权限。
其中,步骤S1736和S1738中所申请的权限为:应用弹框申请的编辑、删除、创建文件的权限。
S1742,应用将申请到的权限注册到权限校验模块。
S1743,用户启动通过该应用访问文件,应用调用文件管理模块的接口访问文件管理模块中的文件。
S1744,权限校验模块校验该应用是否获取到相应的权限。
若是,则执行步骤S1746;若否,则执行步骤S1748。
其中,步骤S1744中相应的权限为:访问文件的权限。
S1746,返回用户所访问的文件。
S1748,不返回用户所访问的文件。
S1750,用户对文件进行进一步操作。
S1752,权限校验模块校验该应用是否获取到访问相应的权限。
若是,则执行步骤S1754;若否,则执行步骤S1756。
S1754,用户有编辑、删除、创建文件的权限;S1756,用户无编辑、删除、创建文件的权限。
其中,步骤S1752中相应的权限为:编辑、删除、创建文件的权限。
图17中所示的内容与图12中的所示的内容基本一致,差别在于执行顺序的不一致,主要区别是触发应用弹框申请权限的动作。
图12中触发应用弹框申请访问文件的权限的动作是在用户在启动应用后,且利用该应用查看手机中的文件时该应用调用文件管理模块中的接口访问文件,而在图17中触发应用弹框申请访问文件的权限的动作是用户在启动应用。
图12中触发应用弹框申请编辑、删除、创建文件的动作是用户对所访问的文件进行进一步操作时,而在图17中触发应用弹框申请编辑、删除、创建文件的动作是在用户同意应用所申请的访问的文件的权限。
其它内容可以参考上述图12中的相关描述,在此不再赘述。
此外,需要说明的是,本申请实施例中,触发应用弹框申请权限的动作可以由开发者开发应用时而定,上述图12和图17分别示出了两种可能的方式,在一些可能的实现方式中,触发应用弹框申请权限的动作可能存在于上述任一步骤后,不予限制。
图18为本申请实施例提供的又一种文件管理、应用管理的方法的示意图,该方法可以包括步骤S1810~S1870。
S1810,应用市场获取第一应用的数据包,以及所述第一应用的开发者提交的所述第一应用所申请的权限。
S1820,所述应用市场审核所述第一应用所申请的权限是否合理。
S1830,所述应用市场根据审核结果,为所述第一应用配置权限配置文件,所述权限配置文件用于指示所述应用市场审核通过的所述第一应用能够申请的文件类型的权限。
S1840,电子设备通过应用市场安装第一应用,所述第一应用对应有权限配置文件。
S1850,在所述第一应用欲访问所述电子设备中的文件时,所述第一应用请求申请第一权限。
S1860,若所述权限配置文件中包括所述第一权限,所述电子设备显示第一界面,所述第一界面用于向用户请求授予所述第一权限。
S1870,响应于用户同意授予所述第一权限的第一操作,所述第一应用获取到所述第一权限。
本申请实施例中的电子设备可以为上文中的手机,第一应用可以为上文中的应用1、应用2、应用3中的任一应用,若所述第一应用为应用1,则第一界面可以为上述图6中的(d)所示的GUI;若所述第一应用为应用2,则第一界面可以为上述图7中的(d)所示的GUI;若所述第一应用为应用3,则第一界面可以为上述图8中的(d)所示的GUI。
本申请实施例提供的方案,对于新上架的第一应用,本申请提供的应用市场上架审核机制可以为用户过滤掉一些不合理的申请权限,在电子设备通过应用市场安装该应用市场审核后的第一应用的情况下,当第一应用欲访问电子设备中的文件时,可以请求申请第一权限,且在权限配置文件中包括第一权限时,该电子设备才可显示向用户请求授予第一权限的第一界面,且当用户同意授予第一权限时,
该第一应用即可获取到第一权限,换句话说,第一应用只有应用市场审核通过且用户同意授予所申请的第一权限的情况下,才可以具有第一权限,进而用户可以对该电子设备中的文件进行相应权限的操作,与现有技术中应用开发者自行决定向用户请求授予哪些权限且用户一旦授予则应用就获得相应权限的方案相比,本申请提供了一种由应用市场审核要上架的应用想要申请的权限是否合理的机制,可以从源头上避免第一应用向用户弹框申请授予一些不合理的权限,进一步地,可以避免现有技术中应用获取到一些不合理的权限随之对电子设备中的公共文件随意地进行增删改查而导致的文件乱象问题。
可选地,在一些实施例中,所述方法还包括:若所述权限配置文件中不包括所述第一权限,所述电子设备不显示所述第一界面。
本申请实施例中,对于权限配置文件中不包括第一应用所申请的第一权限这一情况,电子设备不显示第一界面。
如上述图6中所示的,当手机检测到用户点击音频的图标803的操作后,界面不会显示新的界面;当手机检测到用户点击相册的图标803的操作后,可以显示如图6中的(d)所示的GUI。这是因为开发者在开发该应用1的时候,想要该应用1具有申请图片/视频和音频的权限,所以图6中的(c)中显示相册和音频的图标;但是应用市场审核该应用1仅具备申请图片/视频的权限,并不具备申请音频的权限,从而应用市场可以为该应用1配置能够申请图片/视频的权限的配置文件。因此,当用户点击音频的图标,手机界面不会显示新的界面,当用户点击相册的图标,可以显示新的界面。该新的界面即为本申请实施例中的第一界面。
本申请实施例提供的方案,应用市场根据审核结果为第一应用配置了权限配置文件,在权限配置文件中包括第一应用所请求申请的第一权限时,该电子设备可以不显示向用户请求授予第一权限的第一界面,第一应用也就不会具有第一权限,进而用户不可以对该电子设备中的文件进行相应权限的操作,与现有技术中应用开发者自行决定向用户请求授予哪些权限且用户一旦授予则应用就获得相应权限的方案相比,本申请提供了一种由应用市场审核要上架的应用想要申请的权限是否合理的机制,可以从源头上避免第一应用向用户弹框申请授予一些不合理的权限,进一步地,可以避免现有技术中应用获取到一些不合理的权限随之对电子设备中的公共文件随意地进行增删改查而导致的文件乱象问题。
可选地,在一些实施例中,所述方法还包括:所述电子设备通过所述应用市场安装第二应用;在所述第二应用欲访问所述电子设备中的文件时,所述第二应用通过所述电子设备的操作系统提供的文件选择器访问所述电子设备中的文件。
本申请实施例中的第二应用可以为非管理类应用,非管理类应用访问电子设备中的文件时,可以通过电子设备的操作系统提供的文件选择器访问电子设备中的文件,具体过程可以参考上述图10或图11所示的GUI以及上述图12中步骤S1518的相关内容,此处不再赘述。
本申请实施例提供的方案,电子设备通过应用市场安装第二应用,当第二应用想要访问该电子设备中的文件时,可以通过该电子设备的操作系统提供的文件选择器访问该电子设备中的文件,即,第二应用可以通过文件选择器提供的接口访问用户想要访问的目标文件,通过这样的方式,既可以保证第二应用可以访问到该电子设备中的文件,又可以限制第二应用对电子设备中的文件进行随意访问或随意操作,从而可以避免现有技术中第二应用对电子设备中的公共文件随意地进行增删改查而导致的文件乱象问题。
可选地,在一些实施例中,所述第二应用通过所述文件选择器访问所述电子设备中的文件,具体包括:
所述电子设备显示第二界面,所述第二界面包括所述文件选择器提供的一个或多个候选文件;
所述电子设备接收用户从所述一个或多个候选文件中确定一个或多个目标文件的第二操作;
响应于所述第二操作,所述第二应用获取访问所述一个或多个目标文件的权限。
本申请实施例中的第二界面可以为上述图10中的(d)所示的GUI或图11中的(d)所示的GUI。以图10为例,参见图10中的(d)所示的GUI,界面显示:手机中的全部照片。用户可以从中选择照片进行查看,假设用户选择了图片A2和图片B3,则图片A2的右下角和图片B3的右下角的○中均会出现数字,数字表示选择照片的顺序。当手机检测到用户点击下一步的图标1306的操作后,可以显示如图10中的(e)所示的GUI。
本申请实施例中,在第二应用获取访问一个或多个目标文件的权限后,第二应用即可通过文件选
择器访问该电子设备中的文件。
本申请实施例提供的方案,电子设备通过应用市场安装第二应用,当第二应用想要访问该电子设备中的文件时,电子设备显示包括文件选择器提供的一个或多个候选文件的第二界面,用户可以允许第二应用访问候选文件中用户所选择的目标文件,即,第二应用可以通过文件选择器提供的接口访问候选文件中用户所选择的目标文件,而不能访问任意候选文件。通过这样的方式,既可以保证第二应用可以访问到用户从该电子设备中选择访问的文件,又可以限制第二应用对电子设备中的文件进行随意访问或随意操作,从而可以避免现有技术中第二应用对电子设备中的公共文件随意地进行增删改查而导致的文件乱象问题。
可选地,在一些实施例中,所述第一应用为管理类应用,所述管理类应用为依赖于访问所述电子设备中的大批量的一类或多类的文件以实现其主要功能的应用;
所述第二应用为非管理类应用,所述非管理类应用为不依赖于访问所述电子设备中的大批量的一类或多类的文件以实现其主要功能的应用。
本申请实施例中的管理类应用为依赖于访问电子设备中的大批量的一类或多类的文件以实现其主要功能的应用,例如,文件管理器应用是依赖于访问电子设备中的大批量文档、图片、视频和音频的文件以实现其文件管理的功能的应用,因此,文件管理器应用是管理类应用;相册应用时依赖于访问电子设备中的大批量图片和视频的文件以实现其管理图片/视频的功能的应用,因此,相册应用也是管理类应用。
本申请实施例中的非管理类应用为不依赖于访问电子设备中的大批量的一类或多类的文件以实现其主要功能的应用,例如,微信应用作为社交类应用,其主要功能为即时通讯,不依赖于访问电子设备中的全量图片和视频类、音频类、文档类中的某一类或某几类的文件以实现其主要功能,因此,微信应用为非管理类应用。
可选地,在一些实施例中,所述电子设备中的文件存储于文件管理模块中,所述方法还包括:
所述第一应用通过所述文件管理模块的第一接口访问目标文件,所述目标文件的文件类型与所述第一权限所申请的文件类型相同。
本申请实施例提供的方案,电子设备中的文件存储于文件管理模块中,第一应用可以通过该文件管理模块的第一接口访问目标文件,且目标文件的文件类型与第一权限所申请的文件类型相同,由于电子设备中的文件存储于文件管理模块中,当第一应用想要访问该电子设备上的文件时,均可以通过文件管理模块的第一接口访问,与现有技术中各个应用独立存储相应的文件相比,本申请的方案可以减少存储资源的浪费。
可选地,在一些实施例中,所述权限配置文件用于指示所述应用市场审核通过的所述第一应用能够申请的文件类型的权限,包括以下任一项:
访问或操作图片/视频类文件的权限、访问或操作音频类文件的权限、访问或操作文档类文件的权限。
本申请实施例提供的方案,应用市场为第一应用配置的权限配置文件中所包括的该第一应用能够申请的文件类型的权限可以包括访问或操作图片/视频类文件的权限、访问或操作音频类文件的权限、访问或操作文档类文件的权限中的任一个,第一应用在运行的过程中,可以按照需求申请其执行当前功能所需的对特定类型的文件进行特定类型的操作的权限,进而用户按需授予应用权限,与现有技术中应用申请对存储空间中任意类型的文件(文档、图片、音频、视频等)进行任意类型的操作(读取、写入、编辑等)的权限的方案相比,本申请提供的方案可以避免由于应用对任意类型的文件进行任意类型的操作而导致的文件乱象问题。
可选地,在一些实施例中,所述访问或操作图片/视频类文件的权限包括:读取或编辑、删除、创建图片/视频类文件的权限;
所述访问或操作音频类文件的权限包括读取或编辑、删除、创建音频类文件的权限;
所述访问或操作文档类文件的权限包括读取或编辑、删除、创建文档类文件的权限。
可选地,在一些实施例中,所述电子设备中的文件按照文件类型存储于对应预设目录中。
本申请实施例中的预设目录可以为上文中的根目录,如“目录1:图片/视频类”,“目录2:音频类”,“目录3:文档类”。
本申请实施例提供的方案,电子设备中的文件按照文件类型存储于对应预设目录中,当应用需要获取某一类型的文件时,可以快速查找到相应文件。
可选地,在一些实施例中,所述第一应用不具备在所述电子设备中已存在的预设目录外创建新的目录或新的文件的权限。
本申请实施例提供的方案,第一应用不具备在所述电子设备中已存在的预设目录外创建新的目录或新的文件的权限,换句话说,第一应用不可以在电子设备中已存在的预设目录外创建新的目录或新的文件,可以保证电子设备中的文件的有序性。
可选地,在一些实施例中,所述电子设备中的文件存储于文件管理模块中,所述方法还包括:
所述电子设备通过所述第一应用对存储于所述文件管理模块中的目标文件的元数据信息进行更改,所述目标文件的文件类型与所述第一权限所申请的文件类型相同;
在所述电子设备通过第二应用访问所述目标文件时,所述第二应用获取所述电子设备通过所述第一应用更改后的所述目标文件的元数据信息,所述第二应用不同于所述第一应用。
本申请实施例提供的方案,第一应用可以对存储于文件管理模块中的目标文件的元数据信息进行更改,当电子设备通过第二应用访问目标文件时,第二应用可以获取电子设备通过第一应用更改后的目标文件的元数据信息,通过这样的方式,第一应用对文件管理模块中的目标文件的元数据信息进行更改这一情况,第二应用也可以从文件管理模块中了解到,从而实现文件的元数据信息在各应用之间共享,可以解决目前一些操作系统中存在的某一应用改动文件的元数据信息后,其它应用无法及时获知的问题。
可选地,在一些实施例中,所述应用市场审核所述第一应用所申请的权限是否合理,包括:
所述应用市场根据所述第一应用的应用类型审核所述第一应用所申请的权限是否合理。
本申请实施例中的应用类型可以包括管理类应用和非管理类应用,其中,管理类应用和非管理类应用的具体定义可以参考上文中对于其介绍的内容。
本申请实施例提供的方案,应用市场根据第一应用的应用类型审核第一应用所申请的权限是否合理,若第一应用为管理类应用,应用市场可以进一步审核第一应用所申请的权限是否合理并为第一应用配置权限配置文件,这样第一应用可以根据权限配置文件访问或操作相应权限的文件;若第一应用为非管理类应用,应用市场可以不对第一应用所申请的权限的合理性进行审核,可以直接拒绝第一应用所申请的权限,这样第一应用可以对用户所选择的文件进行访问或操作;通过这样的审核机制可以对应用所具有的权限进行区分,与现有技术中应用开发者自行决定向用户请求授予哪些权限且用户一旦授予则应用就获得相应权限的方案相比,本申请提供的应用市场上架审核机制可以避免现有技术中应用获取到一些不合理的权限而对电子设备上的文件进行随意增删改查进而引起的公共文件乱象问题。
可以理解的是,电子设备为了实现上述功能,其包含了执行各个功能相应的硬件和/或软件模块。结合本文中所公开的实施例描述的各示例的算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。本领域技术人员可以结合实施例对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
本实施例可以根据上述方法示例对电子设备进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块可以采用硬件的形式实现。需要说明的是,本实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
在采用对应各个功能划分各个功能模块的情况下,图19示出了上述实施例中涉及的电子设备的一种可能的组成示意图,如图19所示,该电子设备1900可以包括:获取模块1910、审核模块1920、配置模块1930、安装模块1940、请求模块1950、显示模块1960。
其中,获取模块1910可以用于支持电子设备1900执行上述步骤S1810或S1870等,和/或用于本文所描述的技术的其他过程。
审核模块1920可以用于支持电子设备1900执行上述步骤S1820等,和/或用于本文所描述的技术的其他过程。
配置模块1930可以用于支持电子设备1900执行上述步骤S1830等,和/或用于本文所描述的技术
的其他过程。
安装模块1940可以用于支持电子设备1900执行上述步骤S1840等,和/或用于本文所描述的技术的其他过程。
请求模块1950可以用于支持电子设备1900执行上述步骤S1850等,和/或用于本文所描述的技术的其他过程。
显示模块1960可以用于支持电子设备1900执行上述步骤S1860等,和/或用于本文所描述的技术的其他过程。
需要说明的是,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。
本实施例提供的电子设备,用于执行上述本申请的方法,因此可以达到与上述实现方法相同的效果。
在采用集成的单元的情况下,电子设备可以包括处理模块、存储模块和通信模块。其中,处理模块可以用于对电子设备的动作进行控制管理,例如,可以用于支持电子设备执行上述各个单元执行的步骤。存储模块可以用于支持电子设备执行存储程序代码和数据等。通信模块,可以用于支持电子设备与其他设备的通信。
其中,处理模块可以是处理器或控制器。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,数字信号处理(digital signal processing,DSP)和微处理器的组合等等。存储模块可以是存储器。通信模块具体可以为射频电路、蓝牙芯片、Wi-Fi芯片等与其他电子设备交互的设备。
在一个实施例中,当处理模块为处理器,存储模块为存储器时,本实施例所涉及的电子设备可以为具有图1所示结构的设备。
图20示出了上述实施例涉及的电子设备1400的另一种可能的组成示意图,如图20所示,该电子设备1400可以包括通信单元1410、输入单元1420、处理单元1430、输出单元(或也可以称为显示单元)1440、外设接口1450、存储单元1460、电源1470、视频解码器1480以及音频解码器1490。
通信单元1410用于建立通信信道,使电子设备1400通过所述通信信道以连接至远程服务器,并从所述远程服务器下媒体数据。所述通信单元1410可以包括WLAN模块、蓝牙模块、NFC模块、基带模块等通信模块,以及所述通信模块对应的射频(Radio Frequency,简称RF)电路,用于进行无线局域网络通信、蓝牙通信、NFC通信、红外线通信及/或蜂窝式通信系统通信,例如宽带码分多重接入(wideband code division multiple access,W-CDMA)及/或高速下行封包存取(high speed downlink packet access,HSDPA)。所述通信模块1410用于控制电子设备中的各组件的通信,并且可以支持直接内存存取。
输入单元1420可以用于实现用户与电子设备的交互和/或信息输入到电子设备中。在本申请具体实施方式中,输入单元可以是触控面板,也可以是其他人机交互界面,例如实体输入键、麦克风等,还可是其他外部信息撷取装置,例如摄像头等。
处理单元1430为电子设备的控制中心,可以利用各种接口和线路连接整个电子设备的各个部分,通过运行或执行存储在存储单元内的软件程序和/或模块,以及调用存储在存储单元内的数据,以执行电子设备的各种功能和/或处理数据。如上述步骤S1810、S1820、S1830、S1840、S1850、S1870等可以通过处理单元1430实现。
输出单元1440包括但不限于影像输出单元和声音输出单元。影像输出单元用于输出文字、图片和/或视频。在本申请的具体实施方式中,上述输入单元1420所采用的触控面板亦可同时作为输出单元1440的显示面板。例如,当触控面板检测到在其上的触摸或接近的手势操作后,传送给处理单元以确定触摸事件的类型,随后处理单元根据触摸事件的类型在显示面板上提供相应的视觉输出。虽然在图20中,输入单元1420与输出单元1440是作为两个独立的部件来实现电子设备的输入和输出功能,但是在某些实施例中,可以将触控面板与显示面板集成一体而实现电子设备的输入和输出功能。例如,所述影像输出单元可以显示各种图形化用户接口以作为虚拟控制组件,包括但不限于窗口、卷动轴、图标及剪贴簿,以供用户通过触控方式进行操作。如上述步骤S1860可以通过输出单元1440实现。
存储单元1460可用于存储软件程序以及模块,处理单元通过运行存储在存储单元的软件程序以及
模块,从而执行电子设备的各种功能应用以及实现数据处理。
本实施例还提供一种计算机存储介质,该计算机存储介质中存储有计算机指令,当该计算机指令在电子设备上运行时,使得电子设备执行上述相关方法步骤实现上述实施例中的方法。
本实施例还提供了一种计算机程序产品,当该计算机程序产品在计算机上运行时,使得计算机执行上述相关步骤,以实现上述实施例中的方法。
另外,本申请的实施例还提供一种装置,这个装置具体可以是芯片,组件或模块,该装置可包括相连的处理器和存储器;其中,存储器用于存储计算机执行指令,当装置运行时,处理器可执行存储器存储的计算机执行指令,以使芯片执行上述各方法实施例中的方法。
其中,本实施例提供的电子设备、计算机存储介质、计算机程序产品或芯片均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。
通过以上实施方式的描述,所属领域的技术人员可以了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存储存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上内容,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。
Claims (16)
- 一种文件管理的方法,其特征在于,包括:电子设备通过应用市场安装第一应用,所述第一应用对应有权限配置文件,所述权限配置文件用于指示所述应用市场审核通过的所述第一应用能够申请的文件类型的权限;在所述第一应用欲访问所述电子设备中的文件时,所述第一应用请求申请第一权限;若所述权限配置文件中包括所述第一权限,所述电子设备显示第一界面,所述第一界面用于向用户请求授予所述第一权限;响应于用户同意授予所述第一权限的第一操作,所述第一应用获取到所述第一权限。
- 根据权利要求1所述的方法,其特征在于,所述方法还包括:若所述权限配置文件中不包括所述第一权限,所述电子设备不显示所述第一界面。
- 根据权利要求1或2所述的方法,其特征在于,所述方法还包括:所述电子设备通过所述应用市场安装第二应用;在所述第二应用欲访问所述电子设备中的文件时,所述第二应用通过所述电子设备的操作系统提供的文件选择器访问所述电子设备中的文件。
- 根据权利要求3所述的方法,其特征在于,所述第二应用通过所述文件选择器访问所述电子设备中的文件,具体包括:所述电子设备显示第二界面,所述第二界面包括所述文件选择器提供的一个或多个候选文件;所述电子设备接收用户从所述一个或多个候选文件中确定一个或多个目标文件的第二操作;响应于所述第二操作,所述第二应用获取访问所述一个或多个目标文件的权限。
- 根据权利要求3或4所述的方法,其特征在于,所述第一应用为管理类应用,所述管理类应用为依赖于访问所述电子设备中的大批量的一类或多类的文件以实现其主要功能的应用;所述第二应用为非管理类应用,所述非管理类应用为不依赖于访问所述电子设备中的大批量的一类或多类的文件以实现其主要功能的应用。
- 根据权利要求1至5中任一项所述的方法,其特征在于,所述电子设备中的文件存储于文件管理模块中,所述方法还包括:所述第一应用通过所述文件管理模块的第一接口访问目标文件,所述目标文件的文件类型与所述第一权限所申请的文件类型相同。
- 根据权利要求1至6中任一项所述的方法,其特征在于,所述权限配置文件用于指示所述应用市场审核通过的所述第一应用能够申请的文件类型的权限,包括以下任一项:访问或操作图片/视频类文件的权限、访问或操作音频类文件的权限、访问或操作文档类文件的权限。
- 根据权利要求7所述的方法,其特征在于,所述访问或操作图片/视频类文件的权限包括:读取或编辑、删除、创建图片/视频类文件的权限;所述访问或操作音频类文件的权限包括读取或编辑、删除、创建音频类文件的权限;所述访问或操作文档类文件的权限包括读取或编辑、删除、创建文档类文件的权限。
- 根据权利要求1至8中任一项所述的方法,其特征在于,所述电子设备中的文件按照文件类型存储于对应预设目录中。
- 根据权利要求1至9中任一项所述的方法,其特征在于,所述第一应用不具备在所述电子设备中已存在的预设目录外创建新的目录或新的文件的权限。
- 根据权利要求1至10中任一项所述的方法,其特征在于,所述电子设备中的文件存储于文件管理模块中,所述方法还包括:所述电子设备通过所述第一应用对存储于所述文件管理模块中的目标文件的元数据信息进行更改,所述目标文件的文件类型与所述第一权限所申请的文件类型相同;在所述电子设备通过第二应用访问所述目标文件时,所述第二应用获取所述电子设备通过所述第 一应用更改后的所述目标文件的元数据信息,所述第二应用不同于所述第一应用。
- 一种应用管理的方法,其特征在于,包括:应用市场获取第一应用的数据包,以及所述第一应用的开发者提交的所述第一应用所申请的权限;所述应用市场审核所述第一应用所申请的权限是否合理;所述应用市场根据审核结果,为所述第一应用配置权限配置文件,所述权限配置文件用于指示所述应用市场审核通过的所述第一应用能够申请的文件类型的权限。
- 根据权利要求12所述的方法,其特征在于,所述应用市场审核所述第一应用所申请的权限是否合理,包括:所述应用市场根据所述第一应用的应用类型审核所述第一应用所申请的权限是否合理。
- 根据权利要求13所述的方法,其特征在于,所述应用类型包括管理类应用和非管理类应用,所述管理类应用为依赖于访问所述电子设备中的大批量的一类或多类的文件以实现其主要功能的应用,所述非管理类应用为不依赖于访问所述电子设备中的大批量的一类或多类的文件以实现其主要功能的应用。
- 一种电子设备,其特征在于,包括:一个或多个处理器;一个或多个存储器;所述一个或多个存储器存储有一个或多个计算机程序,所述一个或多个计算机程序包括指令,当所述指令被所述一个或多个处理器执行时,使得所述电子设备执行如权利要求1至11或12至14中任一项所述的方法。
- 一种计算机存储介质,其特征在于,包括计算机指令,当所述计算机指令在电子设备上运行时,使得所述电子设备执行如权利要求1至11或12至14中任一项所述的方法。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202380013784.9A CN118056198A (zh) | 2022-08-31 | 2023-08-23 | 一种文件管理、应用管理的方法和电子设备 |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211057387.5A CN117667839A (zh) | 2022-08-31 | 2022-08-31 | 一种文件管理、应用管理的方法和电子设备 |
CN202211057387.5 | 2022-08-31 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2024046184A1 true WO2024046184A1 (zh) | 2024-03-07 |
Family
ID=90083279
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2023/114448 WO2024046184A1 (zh) | 2022-08-31 | 2023-08-23 | 一种文件管理、应用管理的方法和电子设备 |
Country Status (2)
Country | Link |
---|---|
CN (2) | CN117667839A (zh) |
WO (1) | WO2024046184A1 (zh) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030220097A1 (en) * | 2002-04-23 | 2003-11-27 | Ntt Docomo, Inc. | Portable terminal, access control method, and access control program |
WO2012174742A1 (zh) * | 2011-06-24 | 2012-12-27 | 宇龙计算机通信科技(深圳)有限公司 | 一种应用程序访问数据的控制方法、系统及移动终端 |
CN110532764A (zh) * | 2019-08-19 | 2019-12-03 | 维沃移动通信有限公司 | 一种权限处理的方法、移动终端及可读存储介质 |
CN110674490A (zh) * | 2019-08-29 | 2020-01-10 | 维沃移动通信有限公司 | 应用权限显示方法、装置及移动终端 |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112287330B (zh) * | 2020-11-23 | 2024-03-01 | 腾讯科技(北京)有限公司 | 应用程序的权限配置方法、装置、计算机设备及存储介质 |
CN114817939A (zh) * | 2021-01-29 | 2022-07-29 | 华为技术有限公司 | 权限控制方法和电子设备 |
CN113626835B (zh) * | 2021-06-25 | 2022-06-17 | 荣耀终端有限公司 | 一种数据访问方法及电子设备 |
-
2022
- 2022-08-31 CN CN202211057387.5A patent/CN117667839A/zh active Pending
-
2023
- 2023-08-23 CN CN202380013784.9A patent/CN118056198A/zh active Pending
- 2023-08-23 WO PCT/CN2023/114448 patent/WO2024046184A1/zh active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030220097A1 (en) * | 2002-04-23 | 2003-11-27 | Ntt Docomo, Inc. | Portable terminal, access control method, and access control program |
WO2012174742A1 (zh) * | 2011-06-24 | 2012-12-27 | 宇龙计算机通信科技(深圳)有限公司 | 一种应用程序访问数据的控制方法、系统及移动终端 |
CN110532764A (zh) * | 2019-08-19 | 2019-12-03 | 维沃移动通信有限公司 | 一种权限处理的方法、移动终端及可读存储介质 |
CN110674490A (zh) * | 2019-08-29 | 2020-01-10 | 维沃移动通信有限公司 | 应用权限显示方法、装置及移动终端 |
Also Published As
Publication number | Publication date |
---|---|
CN118056198A (zh) | 2024-05-17 |
CN117667839A (zh) | 2024-03-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11221996B2 (en) | Widget synchronization in accordance with synchronization preferences | |
JP6876790B2 (ja) | カーネルイベントトリガ | |
EP1942424B1 (en) | Background data transmission between media device and host device | |
AU2008205032B2 (en) | Data backup for mobile device | |
WO2022143081A1 (zh) | 一种数据同步方法和装置 | |
EP1942425A1 (en) | Data synchronization with host device in accordance with synchronization preferences | |
JP2016529599A (ja) | コンテンツクリップボードの同期 | |
AU2008205028A1 (en) | Prioritized data synchronization with host device | |
WO2008086251A1 (en) | Widget synchronization in accordance with synchronization preferences | |
US9002808B1 (en) | Using a web application as the default handler of local content | |
US9747303B1 (en) | File location application programming interface | |
WO2022028494A1 (zh) | 一种多设备数据协作的方法及电子设备 | |
WO2022052766A1 (zh) | 主题包适配方法及装置 | |
WO2020062192A1 (zh) | 一种操作控制方法及电子设备 | |
WO2024046184A1 (zh) | 一种文件管理、应用管理的方法和电子设备 | |
US9077696B2 (en) | Transferring data items amongst computing devices using metadata that identifies a location of a transferred item | |
WO2022052758A1 (zh) | 配网方法及设备 | |
CN118120212A (zh) | 一种文件去重方法、装置和设备 | |
CN113642010A (zh) | 一种获取扩展存储设备数据的方法及移动终端 | |
WO2024078391A1 (zh) | 一种文件排序的方法和电子设备 | |
WO2023185881A1 (zh) | 应用程序权限管理方法、系统及相关装置 | |
WO2024087808A1 (zh) | 界面显示方法及电子设备 | |
WO2023160208A1 (zh) | 图像删除操作的通知方法、设备和存储介质 | |
WO2023029993A1 (zh) | 一种搜索方法和电子设备 | |
WO2024067167A1 (zh) | 应用数据管理方法、设备、产品及介质 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
WWE | Wipo information: entry into national phase |
Ref document number: 202380013784.9 Country of ref document: CN |
|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 23859217 Country of ref document: EP Kind code of ref document: A1 |