如何分析是那个应用导致状态栏消失
2017-02-14 10:32
387 查看
如何分析是那个应用导致状态栏消失
状态栏主要的几个控制类中需要增加log如下,再根据pid去查是那个进程.
StatusBarManager.java
StatusBarManagerService.java
状态栏主要的几个控制类中需要增加log如下,再根据pid去查是那个进程.
StatusBarManager.java
public void disable(int what) {
try {
final IStatusBarService svc = getService();
if (svc != null) {
if ( (what & DISABLE_EXPAND) != 0 ) {
Slog.d("StatusBarManager", "disable status bar , call from" , new RuntimeException("disable"));
}
svc.disable(what, mToken, mContext.getPackageName());
}
} catch (RemoteException ex) {
// system process is dead anyway.
throw new RuntimeException(ex);
}
}
StatusBarManagerService.java
private void disableLocked(int userId, int what, IBinder token, String pkg) {
// It's important that the the callback and the call to mBar get done
// in the same order when multiple threads are calling this function
// so they are paired correctly. The messages on the handler will be
// handled in the order they were enqueued, but will be outside the lock.
manageDisableListLocked(userId, what, token, pkg);
// Ensure state for the current user is applied, even if passed a non-current user.
final int net = gatherDisableActionsLocked(mCurrentUserId);
if (net != mDisabled) {
mDisabled = net;
mHandler.post(new Runnable() {
public void run() {
mNotificationDelegate.onSetDisabled(net);
}
});
if (mBar != null) {
try {
/// M:[ALPS01673960] Fix User cannot drag down the notification bar.
Slog.d(TAG, "disable statusbar calling PID = " + Binder.getCallingPid());
mBar.disable(net);
} catch (RemoteException ex) {
}
}
}
}
相关文章推荐
- Android Message 及其使用
- 敏捷软件开发笔记
- sql之函数(Function)
- javascript数组(五)
- linux中用top、ps命令查看进程中的线程
- 又断更了。。。为什么呢?
- pyhon模块-3
- Kafka简介
- 使用Picasso加载图片的内存优化实践
- 如何分析按power键熄屏时屏幕又被唤醒了
- POJ 3756 Chess Game 已被翻译
- Poj 3177
- 奔三技术男:聊聊从华为裸辞后的一点感悟(转)
- [半平面交 模板题] BZOJ 3199 [Sdoi2013]escape
- Java编程题练习2017-02-13
- iOS 手机系统升级10.2.1无法链接Xcode8.2.1
- 网站分析数据收集方式详解
- 前端 JS,localStorage/sessionStorage、cookie 及 url 等实现前台数据共享、传输
- 正在学习函数与泪之间的关系
- Spring Cloud