android7.0对于SharedPreferences设置模式的限制
错误信息:
03-28 10:16:12.701 830 932 E AndroidRuntime: FATAL EXCEPTION: Thread-9
03-28 10:16:12.701 830 932 E AndroidRuntime: Process: com.solomo.azt, PID: 830
03-28 10:16:12.701 830 932 E AndroidRuntime: java.lang.SecurityException: MODE_WORLD_READABLE no longer supported
03-28 10:16:12.701 830 932 E AndroidRuntime: at android.app.ContextImpl.checkMode(ContextImpl.java:2137)
03-28 10:16:12.701 830 932 E AndroidRuntime: at android.app.ContextImpl.getSharedPreferences(ContextImpl.java:354)
03-28 10:16:12.701 830 932 E AndroidRuntime: at android.app.ContextImpl.getSharedPreferences(ContextImpl.java:349)
03-28 10:16:12.701 830 932 E AndroidRuntime: at com.baidu.android.pushservice.util.p.x(Unknown Source)
03-28 10:16:12.701 830 932 E AndroidRuntime: at com.baidu.android.pushservice.util.p.v(Unknown Source)
03-28 10:16:12.701 830 932 E AndroidRuntime: at com.baidu.android.pushservice.util.p.m(Unknown Source)
03-28 10:16:12.701 830 932 E AndroidRuntime: at com.baidu.android.pushservice.util.p.l(Unknown Source)
03-28 10:16:12.701 830 932 E AndroidRuntime: at com.baidu.android.pushservice.internal.PushManager.startWork(Unknown Source)
03-28 10:16:12.701 830 932 E AndroidRuntime: at com.baidu.android.pushservice.apiproxy.BridgePushManager.startWork(Unknown Source)
03-28 10:16:12.701 830 932 E AndroidRuntime: at com.baidu.android.pushservice.PushManager$40.run(Unknown Source)
03-28 10:16:12.701 830 932 E AndroidRuntime: at com.baidu.android.pushservice.LoadExecutor$1.run(Unknown Source)
03-28 10:16:12.701 3691 17138 I ActivityManager: handleApplicationCrash callcom.solomo.azt
关于此限制的说明:
https://developer.android.com/reference/android/content/Context.html#MODE_WORLD_READABLE
MODE_WORLD_READABLE
Creating world-readable files is very dangerous, and likely to cause security holes in applications. It is strongly discouraged; instead, applications should use more formal mechanism for interactions such as ContentProvider, BroadcastReceiver, and Service. There are no guarantees that this access mode will remain on a file, such as when it goes through a backup and restore.
File creation mode: allow all other applications to have read access to the created file.
As of N attempting to use this mode will throw a SecurityException.
android7.0对于SharedPreferences设置模式的限制的更多相关文章
- 通过USB 2.0电缆手动设置内核模式调试
Windows的调试工具支持通过USB 2.0电缆进行内核调试.本文介绍如何手动设置USB 2.0调试.通过USB 2.0电缆进行调试需要以下硬件: USB 2.0调试电缆.此电缆不是标准USB 2. ...
- Android7.0 Phone应用源码分析(二) phone来电流程分析
接上篇博文:Android7.0 Phone应用源码分析(一) phone拨号流程分析 今天我们再来分析下Android7.0 的phone的来电流程 1.1TelephonyFramework 当有 ...
- Android7.0 多窗口你值得拥有
Android7.0 多窗口你值得拥有 什么是多窗口分屏? 多窗口分屏其实在国内并不陌生,已经有一些手机和平板搭载了"分屏多任务"和"APP窗口化"功能,但这些 ...
- 【转】Android7.0适配心得
本文出自:贾鹏辉的技术博客(http://www.devio.org) http://www.devio.org/2016/09/28/Android7.0%E9%80%82%E9%85%8D%E5% ...
- Android7.0新特性,及Android N适配
新特性部分 Android 7.0 Nougat 提供新功能以提升性能.生产效率和安全性,主要新增了下面的新特性和优化: 一.新的Notification Android N 添加了很多新的notif ...
- Android7.0 Doze模式分析(一)Doze介绍 & DeviceIdleController
參考:http://blog.csdn.net/gaugamela/article/details/52981984 在Android M中.Google就引入了Doze模式.它定义了一种全新的 ...
- Android7.0 PowerManagerService 之亮灭屏(二) PMS 电源状态管理updatePowerStateLocked()
本篇注意接着上篇[Android7.0 PowerManagerService 之亮灭屏(一)]继续分析量灭屏的流程,这篇主要分析PMS的状态计算和更新流程,也是PMS中最为重要和复杂的一部分电源状态 ...
- 《吐血整理》高级系列教程-吃透Fiddler抓包教程(30)-Fiddler如何抓取Android7.0以上的Https包-番外篇
1.简介 通过宏哥前边几篇文章的讲解和介绍想必大家都知道android7.0以上,有android的机制不在信任用户证书,导致https协议无法抓包.除非把证书装在系统信任的证书里,此时手机需要roo ...
- Android7.0 Phone应用源码分析(一) phone拨号流程分析
1.1 dialer拨号 拨号盘点击拨号DialpadFragment的onClick方法会被调用 public void onClick(View view) { int resId = view. ...
随机推荐
- airtest自动化中的poco+python连接手机实现ui自动化
airtest:http://airtest.netease.com/docs/docs_AirtestIDE-zh_CN/index.html官网地址 AirtestIDE:跨平台的UI自动化测试编 ...
- python2.7打印中文乱码的问题解决
一. import sys reload(sys) sys.setdefaultencoding('utf-8') print('测试中文') 二. print(‘我是中国人’) >>&g ...
- 前端 CSS的选择器 伪类选择器 CSS3 nth-child()
first-child 选中第一个标签 应用CSS样式 <!DOCTYPE html> <html lang="en"> <head> < ...
- python基础-3 集合 三元运算 深浅拷贝 函数 Python作用域
上节课总结 1 运算符 in 字符串 判断 : “hello” in "asdasfhelloasdfsadf" 列表元素判断:"li" in ['li', ...
- linux shell 中的数组的取值 遍历 替换 删除操作
引言 在Linux平台上工作,我们经常需要使用shell来编写一些有用.有意义的脚本程序.有时,会经常使用shell数组.那么,shell中的数组是怎么表现的呢,又是怎么定义的呢?接下来逐一的进行讲解 ...
- HTML: 引号不能忽视
在js中常常生成拼接html,然后放到dom中,但是有些拼接的html标签需要加一些指或者属性,这个时候不能忽略引号 如果data.link_tel有空格,不加单引号导致value的值不完全 str ...
- python为什么人们喜欢学习呢?
软件的质和量. 既有量的积累也有质的区别.继承一定的前人研究基础. 基本上来说,python更加的注重可读性,一致性,可移植性,其中软件的质量也是比较的讲究的. python支持开发的高级重用机制,例 ...
- [2019杭电多校第三场][hdu6608]Fansblog
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6608 大致题意是比p小的最大素数q,求q!%p的值. 由威尔逊定理开始推: $(p-1)!\equiv ...
- selenium安装及环境搭建
说明:安装selenium前提必须是安装好了python和pip 1.安装python 在Python的官网 www.python.org 中找到最新版本的Python安装包(我的电脑是windows ...
- Ubuntu中找不到pip3命令的解决方法
Ubuntu中找不到pip3命令的解决方法 Ubuntu 有 python2 和 python3. 今天使用 Ubuntu 中的 python3 时,想要安装第三方库却发现 pip 指向的是 pyth ...