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