am b5206761: Merge "Hide notification panel when launching recent apps" into jb-dev
* commit 'b520676175d265952afa7f35846c86663b4dc248': Hide notification panel when launching recent apps
This commit is contained in:
@@ -19,6 +19,7 @@ package com.android.systemui.recent;
|
||||
import android.animation.Animator;
|
||||
import android.animation.LayoutTransition;
|
||||
import android.app.ActivityManager;
|
||||
import android.app.ActivityManagerNative;
|
||||
import android.app.ActivityOptions;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
@@ -26,13 +27,13 @@ import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
import android.content.res.TypedArray;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Matrix;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.Shader.TileMode;
|
||||
import android.graphics.drawable.BitmapDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.net.Uri;
|
||||
import android.os.RemoteException;
|
||||
import android.provider.Settings;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
@@ -283,8 +284,19 @@ public class RecentsPanelView extends FrameLayout implements OnItemClickListener
|
||||
}
|
||||
}
|
||||
|
||||
static void sendCloseSystemWindows(Context context, String reason) {
|
||||
if (ActivityManagerNative.isSystemReady()) {
|
||||
try {
|
||||
ActivityManagerNative.getDefault().closeSystemDialogs(reason);
|
||||
} catch (RemoteException e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void show(boolean show, boolean animate,
|
||||
ArrayList<TaskDescription> recentTaskDescriptions, boolean firstScreenful) {
|
||||
sendCloseSystemWindows(mContext, BaseStatusBar.SYSTEM_DIALOG_REASON_RECENT_APPS);
|
||||
|
||||
// For now, disable animations. We may want to re-enable in the future
|
||||
if (show) {
|
||||
animate = false;
|
||||
|
||||
@@ -85,6 +85,9 @@ public abstract class BaseStatusBar extends SystemUI implements
|
||||
|
||||
protected static final boolean ENABLE_INTRUDERS = false;
|
||||
|
||||
// Should match the value in PhoneWindowManager
|
||||
public static final String SYSTEM_DIALOG_REASON_RECENT_APPS = "recentapps";
|
||||
|
||||
public static final int EXPANDED_LEAVE_ALONE = -10000;
|
||||
public static final int EXPANDED_FULL_OPEN = -10001;
|
||||
|
||||
@@ -400,6 +403,15 @@ public abstract class BaseStatusBar extends SystemUI implements
|
||||
return new H();
|
||||
}
|
||||
|
||||
static void sendCloseSystemWindows(Context context, String reason) {
|
||||
if (ActivityManagerNative.isSystemReady()) {
|
||||
try {
|
||||
ActivityManagerNative.getDefault().closeSystemDialogs(reason);
|
||||
} catch (RemoteException e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected class H extends Handler {
|
||||
public void handleMessage(Message m) {
|
||||
switch (m.what) {
|
||||
|
||||
@@ -1977,7 +1977,7 @@ public class PhoneStatusBar extends BaseStatusBar {
|
||||
if (Intent.ACTION_CLOSE_SYSTEM_DIALOGS.equals(action)) {
|
||||
String reason = intent.getStringExtra("reason");
|
||||
if (reason != null) {
|
||||
excludeRecents = reason.equals("recentapps");
|
||||
excludeRecents = reason.equals(SYSTEM_DIALOG_REASON_RECENT_APPS);
|
||||
}
|
||||
}
|
||||
animateCollapse(excludeRecents);
|
||||
|
||||
@@ -1582,7 +1582,7 @@ public class TabletStatusBar extends BaseStatusBar implements
|
||||
if (Intent.ACTION_CLOSE_SYSTEM_DIALOGS.equals(action)) {
|
||||
String reason = intent.getStringExtra("reason");
|
||||
if (reason != null) {
|
||||
excludeRecents = reason.equals("recentapps");
|
||||
excludeRecents = reason.equals(SYSTEM_DIALOG_REASON_RECENT_APPS);
|
||||
}
|
||||
}
|
||||
if (Intent.ACTION_SCREEN_OFF.equals(action)) {
|
||||
|
||||
Reference in New Issue
Block a user