summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src/com/android/systemui/usb
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2010-10-03 14:56:54 -0700
committerDianne Hackborn <hackbod@google.com>2010-10-04 15:34:54 -0700
commit20754649790424455e8a5dbd5ab1fa0e0a4ca87e (patch)
tree74602aeba482a2f167f69c8d3209540a63fd6f21 /packages/SystemUI/src/com/android/systemui/usb
parent458fc5f52e25d7a8b4e482010711aed66f0b4999 (diff)
downloadframeworks_base-20754649790424455e8a5dbd5ab1fa0e0a4ca87e.zip
frameworks_base-20754649790424455e8a5dbd5ab1fa0e0a4ca87e.tar.gz
frameworks_base-20754649790424455e8a5dbd5ab1fa0e0a4ca87e.tar.bz2
Make USB mass storage hide keyguard when shown.
Change-Id: I4d3592ade43c8b2e87768a55ba0fafb8e189a1fc
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/usb')
-rw-r--r--packages/SystemUI/src/com/android/systemui/usb/UsbStorageActivity.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/usb/UsbStorageActivity.java b/packages/SystemUI/src/com/android/systemui/usb/UsbStorageActivity.java
index 29df28e..d024dd0 100644
--- a/packages/SystemUI/src/com/android/systemui/usb/UsbStorageActivity.java
+++ b/packages/SystemUI/src/com/android/systemui/usb/UsbStorageActivity.java
@@ -46,6 +46,7 @@ import android.widget.ProgressBar;
import android.widget.TextView;
import android.view.View;
import android.view.Window;
+import android.view.WindowManager;
import android.util.Log;
import java.util.List;
@@ -102,6 +103,11 @@ public class UsbStorageActivity extends Activity
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
setProgressBarIndeterminateVisibility(true);
+ getWindow().addFlags(WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD);
+ if (Environment.isExternalStorageRemovable()) {
+ getWindow().addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED);
+ }
+
setTitle(getString(com.android.internal.R.string.usb_storage_activity_title));
setContentView(com.android.internal.R.layout.usb_storage_activity);