[sdcard-application]当文件夹路径从n层按back键退回到n-19层的时候,file manager自动退出

本文主要是介绍[sdcard-application]当文件夹路径从n层按back键退回到n-19层的时候,file manager自动退出,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

[sdcard-application]当文件夹路径从n层按back键退回到n-19层的时候,file manager自动退出

[DESCRIPTION]

当文件夹路径从n层按back键退回到n-19层的时候,file manager自动退出,比如在63层按back 键退回到44层的时候,file manager自动退出。

[SOLUTION]

1.FileManager默认设计, FileManager种只记录最多20条操作路径的记录, 如果超出就会把最早加入的记录删除. 贵司
可以参考alps/mediatek/packages/apps/FileManager/src/com/mediatek/filemanager/FileInfoManager.JAVA中这部
分的代码.
/** Max history size */
private static final int MAX_LIST_SIZE = 20;
private final List<NavigationRecord> mNavigationList = new LinkedList<NavigationRecord>();
/**
* This method gets the previous navigation directory path
*
* @return the previous navigation path
*/
protected NavigationRecord getPrevNavigation() {
while (!mNavigationList.isEmpty()) {
NavigationRecord navRecord = mNavigationList.get(mNavigationList.size() - 1);
removeFromNavigationList();
String path = navRecord.getRecordPath();
if (!TextUtils.isEmpty(path)) {
if (new File(path).exists() || MountPointManager.getInstance().isRootPath(path)) {
return navRecord;
}
}
}
return null;
}
/**
* This method adds a navigationRecord to the navigation history
*
* @param navigationRecord the Record
*/
protected void addToNavigationList(NavigationRecord navigationRecord) {
if (mNavigationList.size() <= MAX_LIST_SIZE) {
mNavigationList.add(navigationRecord);
} else {
mNavigationList.remove(0);
mNavigationList.add(navigationRecord);
}
}
/**
* This method removes a directory path from the navigation history
*/
protected void removeFromNavigationList() {
if (!mNavigationList.isEmpty()) {
mNavigationList.remove(mNavigationList.size() - 1);
}
}
2.对于20条操作路径的history record, 贵司可以修改,只需要把FileInfo.Manager.java中的MAX_LIST_SIZE设为需要
的最大路径记录数。这样修改带来的影响是,file manager APK可能会用到更多的内存,因为List<NavigationRecord>
mNavigationList需要记录更多的路径数。
alps/mediatek/packages/apps/FileManager/src/com/mediatek/filemanager/FileInfoManager.java中这部分的代码

/** Max history size */
private static final int MAX_LIST_SIZE = xxx;


这篇关于[sdcard-application]当文件夹路径从n层按back键退回到n-19层的时候,file manager自动退出的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/300849

相关文章

hdu2544(单源最短路径)

模板题: //题意:求1到n的最短路径,模板题#include<iostream>#include<algorithm>#include<cstring>#include<stack>#include<queue>#include<set>#include<map>#include<stdio.h>#include<stdlib.h>#include<ctype.h>#i

poj 1734 (floyd求最小环并打印路径)

题意: 求图中的一个最小环,并打印路径。 解析: ans 保存最小环长度。 一直wa,最后终于找到原因,inf开太大爆掉了。。。 虽然0x3f3f3f3f用memset好用,但是还是有局限性。 代码: #include <iostream>#include <cstdio>#include <cstdlib>#include <algorithm>#incl

基于51单片机的自动转向修复系统的设计与实现

文章目录 前言资料获取设计介绍功能介绍设计清单具体实现截图参考文献设计获取 前言 💗博主介绍:✌全网粉丝10W+,CSDN特邀作者、博客专家、CSDN新星计划导师,一名热衷于单片机技术探索与分享的博主、专注于 精通51/STM32/MSP430/AVR等单片机设计 主要对象是咱们电子相关专业的大学生,希望您们都共创辉煌!✌💗 👇🏻 精彩专栏 推荐订阅👇🏻 单片机

Python3 BeautifulSoup爬虫 POJ自动提交

POJ 提交代码采用Base64加密方式 import http.cookiejarimport loggingimport urllib.parseimport urllib.requestimport base64from bs4 import BeautifulSoupfrom submitcode import SubmitCodeclass SubmitPoj():de

【408DS算法题】039进阶-判断图中路径是否存在

Index 题目分析实现总结 题目 对于给定的图G,设计函数实现判断G中是否含有从start结点到stop结点的路径。 分析实现 对于图的路径的存在性判断,有两种做法:(本文的实现均基于邻接矩阵存储方式的图) 1.图的BFS BFS的思路相对比较直观——从起始结点出发进行层次遍历,遍历过程中遇到结点i就表示存在路径start->i,故只需判断每个结点i是否就是stop

Android Environment 获取的路径问题

1. 以获取 /System 路径为例 /*** Return root of the "system" partition holding the core Android OS.* Always present and mounted read-only.*/public static @NonNull File getRootDirectory() {return DIR_ANDR

ORACLE 11g 创建数据库时 Enterprise Manager配置失败的解决办法 无法打开OEM的解决办法

在win7 64位系统下安装oracle11g,在使用Database configuration Assistant创建数据库时,在创建到85%的时候报错,错误如下: 解决办法: 在listener.ora中增加对BlueAeri-PC或ip地址的侦听,具体步骤如下: 1.启动Net Manager,在“监听程序”--Listener下添加一个地址,主机名写计

图的最短路径算法——《啊哈!算法》

图的实现方式 邻接矩阵法 int[][] map;// 图的邻接矩阵存储法map = new int[5][5];map[0] = new int[] {0, 1, 2, 3, 4};map[1] = new int[] {1, 0, 2, 6, 4};map[2] = new int[] {2, 999, 0, 3, 999};map[3] = new int[] {3, 7

如何将文件夹里的PHP代码放到一个文件里

find ./dir -name "*.php" -exec 'cat' {} \; > dir.out

(南京观海微电子)——GH7006 Application Note

Features ⚫ Single chip solution for a WXGA α-Si type LCD display ⚫ Integrate 1200 channel source driver and timing controller ⚫ Display Resolution: ◼ 800 RGB x 480 ◼ 640 RGB x 480 ⚫ Display int