Merge "Fix 5466678: use new setSystemUiVisibility() API to enable clock in statusbar" into ics-mr0
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
package android.app;
|
||||
|
||||
import android.content.Context;
|
||||
@@ -71,7 +71,9 @@ public class StatusBarManager {
|
||||
*/
|
||||
public void disable(int what) {
|
||||
try {
|
||||
mService.disable(what, mToken, mContext.getPackageName());
|
||||
if (mService != null) {
|
||||
mService.disable(what, mToken, mContext.getPackageName());
|
||||
}
|
||||
} catch (RemoteException ex) {
|
||||
// system process is dead anyway.
|
||||
throw new RuntimeException(ex);
|
||||
|
||||
@@ -524,6 +524,7 @@ public class KeyguardUpdateMonitor {
|
||||
callback.onRingerModeChanged(mRingMode);
|
||||
callback.onPhoneStateChanged(mPhoneState);
|
||||
callback.onRefreshCarrierInfo(mTelephonyPlmn, mTelephonySpn);
|
||||
callback.onClockVisibilityChanged();
|
||||
} else {
|
||||
if (DEBUG) Log.e(TAG, "Object tried to add another INFO callback",
|
||||
new Exception("Whoops"));
|
||||
|
||||
@@ -178,7 +178,6 @@ public class KeyguardViewManager implements KeyguardWindowController {
|
||||
int visFlags =
|
||||
( View.STATUS_BAR_DISABLE_BACK
|
||||
| View.STATUS_BAR_DISABLE_HOME
|
||||
| View.STATUS_BAR_DISABLE_CLOCK
|
||||
);
|
||||
mKeyguardHost.setSystemUiVisibility(visFlags);
|
||||
|
||||
|
||||
@@ -709,8 +709,14 @@ public class LockPatternKeyguardView extends KeyguardViewBase implements Handler
|
||||
public void onRefreshCarrierInfo(CharSequence plmn, CharSequence spn) {}
|
||||
@Override
|
||||
public void onRingerModeChanged(int state) {}
|
||||
|
||||
@Override
|
||||
public void onClockVisibilityChanged() {}
|
||||
public void onClockVisibilityChanged() {
|
||||
int visFlags = getSystemUiVisibility() & ~View.STATUS_BAR_DISABLE_CLOCK;
|
||||
setSystemUiVisibility(visFlags
|
||||
| (mUpdateMonitor.isClockVisible() ? View.STATUS_BAR_DISABLE_CLOCK : 0));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDeviceProvisioned() {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user