Merge "Implement disable() on the status bar."
This commit is contained in:
@@ -54,6 +54,18 @@ public class StatusBarManager {
|
||||
*/
|
||||
public static final int DISABLE_NOTIFICATION_TICKER = 0x00000008;
|
||||
|
||||
/**
|
||||
* Flag for {@link #disable} to hide the center system info area.
|
||||
*/
|
||||
public static final int DISABLE_SYSTEM_INFO = 0x00000010;
|
||||
|
||||
/**
|
||||
* Flag for {@link #disable} to hide only the navigation buttons. Don't use this
|
||||
* unless you're the setup wizard.
|
||||
*/
|
||||
public static final int DISABLE_NAVIGATION = 0x00000020;
|
||||
|
||||
|
||||
/**
|
||||
* Re-enable all of the status bar features that you've disabled.
|
||||
*/
|
||||
|
||||
22
packages/SystemUI/res/anim/navigation_in.xml
Normal file
22
packages/SystemUI/res/anim/navigation_in.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2010 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
>
|
||||
<alpha android:fromAlpha="0.0" android:toAlpha="1.0"
|
||||
android:duration="@android:integer/config_longAnimTime"
|
||||
/>
|
||||
</set>
|
||||
22
packages/SystemUI/res/anim/navigation_out.xml
Normal file
22
packages/SystemUI/res/anim/navigation_out.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2010 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
>
|
||||
<alpha android:toAlpha="0.0" android:fromAlpha="1.0"
|
||||
android:duration="@android:integer/config_longAnimTime"
|
||||
/>
|
||||
</set>
|
||||
22
packages/SystemUI/res/anim/system_in.xml
Normal file
22
packages/SystemUI/res/anim/system_in.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2010 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
>
|
||||
<alpha android:fromAlpha="0.0" android:toAlpha="1.0"
|
||||
android:duration="@android:integer/config_longAnimTime"
|
||||
/>
|
||||
</set>
|
||||
22
packages/SystemUI/res/anim/system_out.xml
Normal file
22
packages/SystemUI/res/anim/system_out.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2010 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
>
|
||||
<alpha android:toAlpha="0.0" android:fromAlpha="1.0"
|
||||
android:duration="@android:integer/config_longAnimTime"
|
||||
/>
|
||||
</set>
|
||||
@@ -119,46 +119,50 @@
|
||||
android:layout_centerInParent="true"
|
||||
/>
|
||||
|
||||
<com.android.systemui.statusbar.KeyButtonView android:id="@+id/menu"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_toLeftOf="@+id/recent"
|
||||
android:src="@drawable/ic_sysbar_menu"
|
||||
android:background="@drawable/ic_sysbar_icon_bg"
|
||||
android:paddingLeft="4dip"
|
||||
android:paddingRight="4dip"
|
||||
systemui:keyCode="82"
|
||||
/>
|
||||
<ImageButton android:id="@+id/recent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_toLeftOf="@+id/home"
|
||||
android:src="@drawable/ic_sysbar_recent"
|
||||
android:background="@drawable/ic_sysbar_icon_bg"
|
||||
android:paddingLeft="4dip"
|
||||
android:paddingRight="4dip"
|
||||
android:onClick="recentButtonClicked"
|
||||
/>
|
||||
<com.android.systemui.statusbar.KeyButtonView android:id="@+id/home"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_toLeftOf="@+id/back"
|
||||
android:paddingLeft="4dip"
|
||||
android:paddingRight="4dip"
|
||||
android:src="@drawable/ic_sysbar_home"
|
||||
android:background="@drawable/ic_sysbar_icon_bg"
|
||||
systemui:keyCode="3"
|
||||
/>
|
||||
<com.android.systemui.statusbar.KeyButtonView android:id="@+id/back"
|
||||
<LinearLayout
|
||||
android:id="@+id/navigationArea"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentRight="true"
|
||||
android:paddingLeft="4dip"
|
||||
android:paddingRight="4dip"
|
||||
android:src="@drawable/ic_sysbar_back"
|
||||
android:background="@drawable/ic_sysbar_icon_bg"
|
||||
systemui:keyCode="4"
|
||||
/>
|
||||
android:orientation="horizontal"
|
||||
>
|
||||
<com.android.systemui.statusbar.KeyButtonView android:id="@+id/menu"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/ic_sysbar_menu"
|
||||
android:background="@drawable/ic_sysbar_icon_bg"
|
||||
android:paddingLeft="4dip"
|
||||
android:paddingRight="4dip"
|
||||
systemui:keyCode="82"
|
||||
/>
|
||||
<ImageButton android:id="@+id/recent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/ic_sysbar_recent"
|
||||
android:background="@drawable/ic_sysbar_icon_bg"
|
||||
android:paddingLeft="4dip"
|
||||
android:paddingRight="4dip"
|
||||
android:onClick="recentButtonClicked"
|
||||
/>
|
||||
<com.android.systemui.statusbar.KeyButtonView android:id="@+id/home"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingLeft="4dip"
|
||||
android:paddingRight="4dip"
|
||||
android:src="@drawable/ic_sysbar_home"
|
||||
android:background="@drawable/ic_sysbar_icon_bg"
|
||||
systemui:keyCode="3"
|
||||
/>
|
||||
<com.android.systemui.statusbar.KeyButtonView android:id="@+id/back"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingLeft="4dip"
|
||||
android:paddingRight="4dip"
|
||||
android:src="@drawable/ic_sysbar_back"
|
||||
android:background="@drawable/ic_sysbar_icon_bg"
|
||||
systemui:keyCode="4"
|
||||
/>
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<!-- It's curtains for you. -->
|
||||
|
||||
@@ -78,6 +78,7 @@ public class TabletStatusBarService extends StatusBarService {
|
||||
NotificationIconArea mNotificationIconArea;
|
||||
View mNotificationButtons;
|
||||
View mSystemInfo;
|
||||
View mNavigationArea;
|
||||
|
||||
NotificationPanel mNotificationPanel;
|
||||
SystemPanel mSystemPanel;
|
||||
@@ -98,7 +99,6 @@ public class TabletStatusBarService extends StatusBarService {
|
||||
TabletTicker mTicker;
|
||||
View mTickerView;
|
||||
boolean mTicking;
|
||||
boolean mExpandedVisible;
|
||||
|
||||
// for disabling the status bar
|
||||
int mDisabled = 0;
|
||||
@@ -203,6 +203,9 @@ public class TabletStatusBarService extends StatusBarService {
|
||||
mSignalMeter = (ImageView) sb.findViewById(R.id.signal);
|
||||
mSignalIcon = (ImageView) sb.findViewById(R.id.signal_icon);
|
||||
|
||||
// The navigation buttons
|
||||
mNavigationArea = sb.findViewById(R.id.navigationArea);
|
||||
|
||||
// Add the windows
|
||||
addPanelWindows();
|
||||
|
||||
@@ -224,24 +227,26 @@ public class TabletStatusBarService extends StatusBarService {
|
||||
switch (m.what) {
|
||||
case MSG_OPEN_NOTIFICATION_PANEL:
|
||||
if (DEBUG) Slog.d(TAG, "opening notifications panel");
|
||||
mDoNotDisturbButton.setText(mNotificationsOn
|
||||
? R.string.status_bar_do_not_disturb_button
|
||||
: R.string.status_bar_please_disturb_button);
|
||||
mNotificationPanel.setVisibility(View.VISIBLE);
|
||||
mNotificationIconArea.setAnimation(loadAnim(R.anim.notification_icons_out));
|
||||
mNotificationIconArea.setVisibility(View.GONE);
|
||||
mNotificationButtons.setAnimation(loadAnim(R.anim.notification_icons_in));
|
||||
mNotificationButtons.setVisibility(View.VISIBLE);
|
||||
mExpandedVisible = true;
|
||||
if (mNotificationPanel.getVisibility() == View.GONE) {
|
||||
mDoNotDisturbButton.setText(mNotificationsOn
|
||||
? R.string.status_bar_do_not_disturb_button
|
||||
: R.string.status_bar_please_disturb_button);
|
||||
mNotificationPanel.setVisibility(View.VISIBLE);
|
||||
setViewVisibility(mNotificationIconArea, View.GONE,
|
||||
R.anim.notification_icons_out);
|
||||
setViewVisibility(mNotificationButtons, View.VISIBLE,
|
||||
R.anim.notification_buttons_in);
|
||||
}
|
||||
break;
|
||||
case MSG_CLOSE_NOTIFICATION_PANEL:
|
||||
if (DEBUG) Slog.d(TAG, "closing notifications panel");
|
||||
mNotificationPanel.setVisibility(View.GONE);
|
||||
mNotificationIconArea.setAnimation(loadAnim(R.anim.notification_icons_in));
|
||||
mNotificationIconArea.setVisibility(View.VISIBLE);
|
||||
mNotificationButtons.setAnimation(loadAnim(R.anim.notification_buttons_out));
|
||||
mNotificationButtons.setVisibility(View.GONE);
|
||||
mExpandedVisible = false;
|
||||
if (mNotificationPanel.getVisibility() == View.VISIBLE) {
|
||||
mNotificationPanel.setVisibility(View.GONE);
|
||||
setViewVisibility(mNotificationIconArea, View.VISIBLE,
|
||||
R.anim.notification_icons_in);
|
||||
setViewVisibility(mNotificationButtons, View.GONE,
|
||||
R.anim.notification_buttons_out);
|
||||
}
|
||||
break;
|
||||
case MSG_OPEN_SYSTEM_PANEL:
|
||||
if (DEBUG) Slog.d(TAG, "opening system panel");
|
||||
@@ -390,11 +395,14 @@ public class TabletStatusBarService extends StatusBarService {
|
||||
}
|
||||
|
||||
public void disable(int state) {
|
||||
/*
|
||||
final int old = mDisabled;
|
||||
final int diff = state ^ old;
|
||||
int old = mDisabled;
|
||||
int diff = state ^ old;
|
||||
Slog.d(TAG, "disable... old=0x" + Integer.toHexString(old)
|
||||
+ " diff=0x" + Integer.toHexString(diff)
|
||||
+ " state=0x" + Integer.toHexString(state));
|
||||
mDisabled = state;
|
||||
|
||||
// act accordingly
|
||||
if ((diff & StatusBarManager.DISABLE_EXPAND) != 0) {
|
||||
if ((state & StatusBarManager.DISABLE_EXPAND) != 0) {
|
||||
Slog.d(TAG, "DISABLE_EXPAND: yes");
|
||||
@@ -404,60 +412,41 @@ public class TabletStatusBarService extends StatusBarService {
|
||||
if ((diff & StatusBarManager.DISABLE_NOTIFICATION_ICONS) != 0) {
|
||||
if ((state & StatusBarManager.DISABLE_NOTIFICATION_ICONS) != 0) {
|
||||
Slog.d(TAG, "DISABLE_NOTIFICATION_ICONS: yes");
|
||||
if (mTicking) {
|
||||
mTicker.halt();
|
||||
} else {
|
||||
mNotificationIconArea.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
setViewVisibility(mNotificationTrigger, View.GONE,
|
||||
R.anim.notification_icons_out);
|
||||
setViewVisibility(mNotificationIconArea, View.GONE,
|
||||
R.anim.notification_icons_out);
|
||||
mTicker.halt();
|
||||
} else {
|
||||
Slog.d(TAG, "DISABLE_NOTIFICATION_ICONS: no");
|
||||
if (!mExpandedVisible) {
|
||||
mNotificationIconArea.setVisibility(View.VISIBLE);
|
||||
}
|
||||
setViewVisibility(mNotificationTrigger, View.VISIBLE,
|
||||
R.anim.notification_icons_in);
|
||||
setViewVisibility(mNotificationIconArea, View.VISIBLE,
|
||||
R.anim.notification_icons_in);
|
||||
}
|
||||
} else if ((diff & StatusBarManager.DISABLE_NOTIFICATION_TICKER) != 0) {
|
||||
if (mTicking && (state & StatusBarManager.DISABLE_NOTIFICATION_TICKER) != 0) {
|
||||
Slog.d(TAG, "DISABLE_NOTIFICATION_TICKER: yes");
|
||||
if ((state & StatusBarManager.DISABLE_NOTIFICATION_TICKER) != 0) {
|
||||
mTicker.halt();
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
void performDisableActions(int net) {
|
||||
/*
|
||||
int old = mDisabled;
|
||||
int diff = net ^ old;
|
||||
mDisabled = net;
|
||||
|
||||
// act accordingly
|
||||
if ((diff & StatusBarManager.DISABLE_EXPAND) != 0) {
|
||||
if ((net & StatusBarManager.DISABLE_EXPAND) != 0) {
|
||||
Slog.d(TAG, "DISABLE_EXPAND: yes");
|
||||
animateCollapse();
|
||||
}
|
||||
}
|
||||
if ((diff & StatusBarManager.DISABLE_NOTIFICATION_ICONS) != 0) {
|
||||
if ((net & StatusBarManager.DISABLE_NOTIFICATION_ICONS) != 0) {
|
||||
Slog.d(TAG, "DISABLE_NOTIFICATION_ICONS: yes");
|
||||
if (mTicking) {
|
||||
mNotificationIconArea.setVisibility(View.INVISIBLE);
|
||||
mTicker.halt();
|
||||
} else {
|
||||
mNotificationIconArea.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
if ((diff & StatusBarManager.DISABLE_SYSTEM_INFO) != 0) {
|
||||
if ((state & StatusBarManager.DISABLE_SYSTEM_INFO) != 0) {
|
||||
Slog.d(TAG, "DISABLE_SYSTEM_INFO: yes");
|
||||
setViewVisibility(mSystemInfo, View.GONE, R.anim.navigation_out);
|
||||
} else {
|
||||
Slog.d(TAG, "DISABLE_NOTIFICATION_ICONS: no");
|
||||
if (!mExpandedVisible) {
|
||||
mNotificationIconArea.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
} else if ((diff & StatusBarManager.DISABLE_NOTIFICATION_TICKER) != 0) {
|
||||
if (mTicking && (net & StatusBarManager.DISABLE_NOTIFICATION_TICKER) != 0) {
|
||||
mTicker.halt();
|
||||
Slog.d(TAG, "DISABLE_SYSTEM_INFO: no");
|
||||
setViewVisibility(mSystemInfo, View.VISIBLE, R.anim.navigation_in);
|
||||
}
|
||||
}
|
||||
if ((diff & StatusBarManager.DISABLE_NAVIGATION) != 0) {
|
||||
if ((state & StatusBarManager.DISABLE_NAVIGATION) != 0) {
|
||||
Slog.d(TAG, "DISABLE_NAVIGATION: yes");
|
||||
setViewVisibility(mNavigationArea, View.GONE, R.anim.navigation_out);
|
||||
} else {
|
||||
Slog.d(TAG, "DISABLE_NAVIGATION: no");
|
||||
setViewVisibility(mNavigationArea, View.VISIBLE, R.anim.navigation_in);
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
private boolean hasTicker(Notification n) {
|
||||
@@ -497,35 +486,35 @@ public class TabletStatusBarService extends StatusBarService {
|
||||
|
||||
public void setLightsOn(boolean on) {
|
||||
if (on) {
|
||||
mCurtains.setAnimation(loadAnim(R.anim.lights_out_out));
|
||||
mCurtains.setVisibility(View.GONE);
|
||||
mBarContents.setAnimation(loadAnim(R.anim.status_bar_in));
|
||||
mBarContents.setVisibility(View.VISIBLE);
|
||||
setViewVisibility(mCurtains, View.GONE, R.anim.lights_out_out);
|
||||
setViewVisibility(mBarContents, View.VISIBLE, R.anim.status_bar_in);
|
||||
} else {
|
||||
animateCollapse();
|
||||
mCurtains.setAnimation(loadAnim(R.anim.lights_out_in));
|
||||
mCurtains.setVisibility(View.VISIBLE);
|
||||
mBarContents.setAnimation(loadAnim(R.anim.status_bar_out));
|
||||
mBarContents.setVisibility(View.GONE);
|
||||
setViewVisibility(mCurtains, View.VISIBLE, R.anim.lights_out_in);
|
||||
setViewVisibility(mBarContents, View.GONE, R.anim.status_bar_out);
|
||||
}
|
||||
}
|
||||
|
||||
public void notificationIconsClicked(View v) {
|
||||
if (DEBUG) Slog.d(TAG, "clicked notification icons");
|
||||
int msg = (mNotificationPanel.getVisibility() == View.GONE)
|
||||
? MSG_OPEN_NOTIFICATION_PANEL
|
||||
: MSG_CLOSE_NOTIFICATION_PANEL;
|
||||
mHandler.removeMessages(msg);
|
||||
mHandler.sendEmptyMessage(msg);
|
||||
if ((mDisabled & StatusBarManager.DISABLE_EXPAND) == 0) {
|
||||
int msg = (mNotificationPanel.getVisibility() == View.GONE)
|
||||
? MSG_OPEN_NOTIFICATION_PANEL
|
||||
: MSG_CLOSE_NOTIFICATION_PANEL;
|
||||
mHandler.removeMessages(msg);
|
||||
mHandler.sendEmptyMessage(msg);
|
||||
}
|
||||
}
|
||||
|
||||
public void systemInfoClicked(View v) {
|
||||
if (DEBUG) Slog.d(TAG, "clicked system info");
|
||||
int msg = (mSystemPanel.getVisibility() == View.GONE)
|
||||
? MSG_OPEN_SYSTEM_PANEL
|
||||
: MSG_CLOSE_SYSTEM_PANEL;
|
||||
mHandler.removeMessages(msg);
|
||||
mHandler.sendEmptyMessage(msg);
|
||||
if ((mDisabled & StatusBarManager.DISABLE_EXPAND) == 0) {
|
||||
int msg = (mSystemPanel.getVisibility() == View.GONE)
|
||||
? MSG_OPEN_SYSTEM_PANEL
|
||||
: MSG_CLOSE_SYSTEM_PANEL;
|
||||
mHandler.removeMessages(msg);
|
||||
mHandler.sendEmptyMessage(msg);
|
||||
}
|
||||
}
|
||||
|
||||
public void recentButtonClicked(View v) {
|
||||
@@ -690,10 +679,6 @@ public class TabletStatusBarService extends StatusBarService {
|
||||
}
|
||||
}
|
||||
|
||||
Animation loadAnim(int id) {
|
||||
return AnimationUtils.loadAnimation((Context)this, id);
|
||||
}
|
||||
|
||||
private boolean inflateViews(NotificationData.Entry entry, ViewGroup parent) {
|
||||
StatusBarNotification sbn = entry.notification;
|
||||
RemoteViews remoteViews = sbn.notification.contentView;
|
||||
@@ -802,6 +787,13 @@ public class TabletStatusBarService extends StatusBarService {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private void setViewVisibility(View v, int vis, int anim) {
|
||||
if (v.getVisibility() != vis) {
|
||||
v.setAnimation(AnimationUtils.loadAnimation((Context)this, anim));
|
||||
v.setVisibility(vis);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -59,7 +59,6 @@ public class TabletTicker extends Handler {
|
||||
|
||||
// TODO: Make this a configuration value.
|
||||
// 3 is enough to let us see most cases, but not get so far behind that it's annoying.
|
||||
int mQueuePos = 0;
|
||||
mQueue = new StatusBarNotification[3];
|
||||
}
|
||||
|
||||
@@ -80,6 +79,18 @@ public class TabletTicker extends Handler {
|
||||
}
|
||||
}
|
||||
|
||||
public void halt() {
|
||||
removeMessages(MSG_ADVANCE);
|
||||
if (mCurrentView != null) {
|
||||
final int N = mQueue.length;
|
||||
for (int i=0; i<N; i++) {
|
||||
mQueue[i] = null;
|
||||
}
|
||||
mQueuePos = 0;
|
||||
sendEmptyMessage(MSG_ADVANCE);
|
||||
}
|
||||
}
|
||||
|
||||
public void handleMessage(Message msg) {
|
||||
switch (msg.what) {
|
||||
case MSG_ADVANCE:
|
||||
|
||||
@@ -147,6 +147,24 @@ public class StatusBarTest extends TestActivity
|
||||
}, 3000);
|
||||
}
|
||||
},
|
||||
new Test("Disable Navigation") {
|
||||
public void run() {
|
||||
mStatusBarManager.disable(StatusBarManager.DISABLE_NAVIGATION);
|
||||
}
|
||||
},
|
||||
new Test("Disable everything in 3 sec") {
|
||||
public void run() {
|
||||
mHandler.postDelayed(new Runnable() {
|
||||
public void run() {
|
||||
mStatusBarManager.disable(StatusBarManager.DISABLE_EXPAND
|
||||
| StatusBarManager.DISABLE_NOTIFICATION_ICONS
|
||||
| StatusBarManager.DISABLE_NOTIFICATION_ALERTS
|
||||
| StatusBarManager.DISABLE_SYSTEM_INFO
|
||||
| StatusBarManager.DISABLE_NAVIGATION);
|
||||
}
|
||||
}, 3000);
|
||||
}
|
||||
},
|
||||
new Test("Enable everything") {
|
||||
public void run() {
|
||||
mStatusBarManager.disable(0);
|
||||
|
||||
Reference in New Issue
Block a user