Merge "Fix 5705837: Dismiss keyguard when launching Settings from Statusbar" into ics-mr1
This commit is contained in:
@ -136,7 +136,7 @@ public class PhoneStatusBar extends StatusBar {
|
|||||||
BatteryController mBatteryController;
|
BatteryController mBatteryController;
|
||||||
LocationController mLocationController;
|
LocationController mLocationController;
|
||||||
NetworkController mNetworkController;
|
NetworkController mNetworkController;
|
||||||
|
|
||||||
int mNaturalBarHeight = -1;
|
int mNaturalBarHeight = -1;
|
||||||
int mIconSize = -1;
|
int mIconSize = -1;
|
||||||
int mIconHPadding = -1;
|
int mIconHPadding = -1;
|
||||||
@ -168,7 +168,7 @@ public class PhoneStatusBar extends StatusBar {
|
|||||||
|
|
||||||
// drag bar
|
// drag bar
|
||||||
CloseDragHandle mCloseView;
|
CloseDragHandle mCloseView;
|
||||||
|
|
||||||
// all notifications
|
// all notifications
|
||||||
NotificationData mNotificationData = new NotificationData();
|
NotificationData mNotificationData = new NotificationData();
|
||||||
NotificationRowLayout mPile;
|
NotificationRowLayout mPile;
|
||||||
@ -298,7 +298,7 @@ public class PhoneStatusBar extends StatusBar {
|
|||||||
try {
|
try {
|
||||||
boolean showNav = mWindowManager.hasNavigationBar();
|
boolean showNav = mWindowManager.hasNavigationBar();
|
||||||
if (showNav) {
|
if (showNav) {
|
||||||
mNavigationBarView =
|
mNavigationBarView =
|
||||||
(NavigationBarView) View.inflate(context, R.layout.navigation_bar, null);
|
(NavigationBarView) View.inflate(context, R.layout.navigation_bar, null);
|
||||||
|
|
||||||
mNavigationBarView.setDisabledFlags(mDisabled);
|
mNavigationBarView.setDisabledFlags(mDisabled);
|
||||||
@ -352,11 +352,11 @@ public class PhoneStatusBar extends StatusBar {
|
|||||||
mBatteryController = new BatteryController(mContext);
|
mBatteryController = new BatteryController(mContext);
|
||||||
mBatteryController.addIconView((ImageView)sb.findViewById(R.id.battery));
|
mBatteryController.addIconView((ImageView)sb.findViewById(R.id.battery));
|
||||||
mNetworkController = new NetworkController(mContext);
|
mNetworkController = new NetworkController(mContext);
|
||||||
final SignalClusterView signalCluster =
|
final SignalClusterView signalCluster =
|
||||||
(SignalClusterView)sb.findViewById(R.id.signal_cluster);
|
(SignalClusterView)sb.findViewById(R.id.signal_cluster);
|
||||||
mNetworkController.addSignalCluster(signalCluster);
|
mNetworkController.addSignalCluster(signalCluster);
|
||||||
signalCluster.setNetworkController(mNetworkController);
|
signalCluster.setNetworkController(mNetworkController);
|
||||||
// final ImageView wimaxRSSI =
|
// final ImageView wimaxRSSI =
|
||||||
// (ImageView)sb.findViewById(R.id.wimax_signal);
|
// (ImageView)sb.findViewById(R.id.wimax_signal);
|
||||||
// if (wimaxRSSI != null) {
|
// if (wimaxRSSI != null) {
|
||||||
// mNetworkController.addWimaxIconView(wimaxRSSI);
|
// mNetworkController.addWimaxIconView(wimaxRSSI);
|
||||||
@ -1085,8 +1085,8 @@ public class PhoneStatusBar extends StatusBar {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((diff & (StatusBarManager.DISABLE_HOME
|
if ((diff & (StatusBarManager.DISABLE_HOME
|
||||||
| StatusBarManager.DISABLE_RECENT
|
| StatusBarManager.DISABLE_RECENT
|
||||||
| StatusBarManager.DISABLE_BACK)) != 0) {
|
| StatusBarManager.DISABLE_BACK)) != 0) {
|
||||||
// the nav bar will take care of these
|
// the nav bar will take care of these
|
||||||
if (mNavigationBarView != null) mNavigationBarView.setDisabledFlags(state);
|
if (mNavigationBarView != null) mNavigationBarView.setDisabledFlags(state);
|
||||||
@ -1204,7 +1204,7 @@ public class PhoneStatusBar extends StatusBar {
|
|||||||
public void animateCollapse(boolean excludeRecents) {
|
public void animateCollapse(boolean excludeRecents) {
|
||||||
animateCollapse(excludeRecents, 1.0f);
|
animateCollapse(excludeRecents, 1.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void animateCollapse(boolean excludeRecents, float velocityMultiplier) {
|
public void animateCollapse(boolean excludeRecents, float velocityMultiplier) {
|
||||||
if (SPEW) {
|
if (SPEW) {
|
||||||
Slog.d(TAG, "animateCollapse(): mExpanded=" + mExpanded
|
Slog.d(TAG, "animateCollapse(): mExpanded=" + mExpanded
|
||||||
@ -1516,8 +1516,8 @@ public class PhoneStatusBar extends StatusBar {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (CHATTY) {
|
if (CHATTY) {
|
||||||
Slog.d(TAG, String.format("gesture: vraw=(%f,%f) vnorm=(%f,%f) vlinear=%f",
|
Slog.d(TAG, String.format("gesture: vraw=(%f,%f) vnorm=(%f,%f) vlinear=%f",
|
||||||
mVelocityTracker.getXVelocity(),
|
mVelocityTracker.getXVelocity(),
|
||||||
mVelocityTracker.getYVelocity(),
|
mVelocityTracker.getYVelocity(),
|
||||||
xVel, yVel,
|
xVel, yVel,
|
||||||
vel));
|
vel));
|
||||||
@ -1795,7 +1795,7 @@ public class PhoneStatusBar extends StatusBar {
|
|||||||
StatusBarIconView ic = (StatusBarIconView) mStatusIcons.getChildAt(i);
|
StatusBarIconView ic = (StatusBarIconView) mStatusIcons.getChildAt(i);
|
||||||
pw.println(" [" + i + "] icon=" + ic);
|
pw.println(" [" + i + "] icon=" + ic);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (false) {
|
if (false) {
|
||||||
pw.println("see the logcat for a dump of the views we have created.");
|
pw.println("see the logcat for a dump of the views we have created.");
|
||||||
// must happen on ui thread
|
// must happen on ui thread
|
||||||
@ -1970,10 +1970,10 @@ public class PhoneStatusBar extends StatusBar {
|
|||||||
- (mTrackingParams.height-closePos) - contentsBottom;
|
- (mTrackingParams.height-closePos) - contentsBottom;
|
||||||
|
|
||||||
if (SPEW) {
|
if (SPEW) {
|
||||||
Slog.d(PhoneStatusBar.TAG,
|
Slog.d(PhoneStatusBar.TAG,
|
||||||
"pos=" + pos +
|
"pos=" + pos +
|
||||||
" trackingHeight=" + mTrackingView.getHeight() +
|
" trackingHeight=" + mTrackingView.getHeight() +
|
||||||
" (trackingParams.height - closePos)=" +
|
" (trackingParams.height - closePos)=" +
|
||||||
(mTrackingParams.height - closePos) +
|
(mTrackingParams.height - closePos) +
|
||||||
" contentsBottom=" + contentsBottom);
|
" contentsBottom=" + contentsBottom);
|
||||||
}
|
}
|
||||||
@ -2048,7 +2048,7 @@ public class PhoneStatusBar extends StatusBar {
|
|||||||
mExpandedDialog.getWindow().setAttributes(mExpandedParams);
|
mExpandedDialog.getWindow().setAttributes(mExpandedParams);
|
||||||
}
|
}
|
||||||
if (DEBUG) {
|
if (DEBUG) {
|
||||||
Slog.d(TAG, "updateExpandedSize: height=" + mExpandedParams.height + " " +
|
Slog.d(TAG, "updateExpandedSize: height=" + mExpandedParams.height + " " +
|
||||||
(mExpandedVisible ? "VISIBLE":"INVISIBLE"));
|
(mExpandedVisible ? "VISIBLE":"INVISIBLE"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2188,6 +2188,11 @@ public class PhoneStatusBar extends StatusBar {
|
|||||||
|
|
||||||
private View.OnClickListener mSettingsButtonListener = new View.OnClickListener() {
|
private View.OnClickListener mSettingsButtonListener = new View.OnClickListener() {
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
|
try {
|
||||||
|
// Dismiss the lock screen when Settings starts.
|
||||||
|
ActivityManagerNative.getDefault().dismissKeyguardOnNextActivity();
|
||||||
|
} catch (RemoteException e) {
|
||||||
|
}
|
||||||
v.getContext().startActivity(new Intent(Settings.ACTION_SETTINGS)
|
v.getContext().startActivity(new Intent(Settings.ACTION_SETTINGS)
|
||||||
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
|
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
|
||||||
animateCollapse();
|
animateCollapse();
|
||||||
@ -2237,7 +2242,7 @@ public class PhoneStatusBar extends StatusBar {
|
|||||||
|
|
||||||
loadDimens();
|
loadDimens();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void loadDimens() {
|
protected void loadDimens() {
|
||||||
final Resources res = mContext.getResources();
|
final Resources res = mContext.getResources();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user