Loading packages/SystemUI/src/com/android/keyguard/KeyguardDisplayManager.java +17 −16 Original line number Diff line number Diff line Loading @@ -74,16 +74,7 @@ public class KeyguardDisplayManager { @Override public void onDisplayChanged(int displayId) { if (displayId == DEFAULT_DISPLAY) return; final Presentation presentation = mPresentations.get(displayId); if (presentation != null && mShowing) { hidePresentation(displayId); // update DisplayInfo. final Display display = mDisplayService.getDisplay(displayId); if (display != null) { showPresentation(display); } } } @Override Loading Loading @@ -304,16 +295,17 @@ public class KeyguardDisplayManager { mClock.removeCallbacks(mMoveTextRunnable); } @Override public void onDisplayChanged() { updateBounds(); getWindow().getDecorView().requestLayout(); } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); final Rect bounds = getWindow().getWindowManager().getMaximumWindowMetrics() .getBounds(); mUsableWidth = VIDEO_SAFE_REGION * bounds.width() / 100; mUsableHeight = VIDEO_SAFE_REGION * bounds.height() / 100; mMarginLeft = (100 - VIDEO_SAFE_REGION) * bounds.width() / 200; mMarginTop = (100 - VIDEO_SAFE_REGION) * bounds.height() / 200; updateBounds(); setContentView(LayoutInflater.from(mContext) .inflate(R.layout.keyguard_presentation, null)); Loading @@ -338,5 +330,14 @@ public class KeyguardDisplayManager { mKeyguardClockSwitchController.init(); } private void updateBounds() { final Rect bounds = getWindow().getWindowManager().getMaximumWindowMetrics() .getBounds(); mUsableWidth = VIDEO_SAFE_REGION * bounds.width() / 100; mUsableHeight = VIDEO_SAFE_REGION * bounds.height() / 100; mMarginLeft = (100 - VIDEO_SAFE_REGION) * bounds.width() / 200; mMarginTop = (100 - VIDEO_SAFE_REGION) * bounds.height() / 200; } } } Loading
packages/SystemUI/src/com/android/keyguard/KeyguardDisplayManager.java +17 −16 Original line number Diff line number Diff line Loading @@ -74,16 +74,7 @@ public class KeyguardDisplayManager { @Override public void onDisplayChanged(int displayId) { if (displayId == DEFAULT_DISPLAY) return; final Presentation presentation = mPresentations.get(displayId); if (presentation != null && mShowing) { hidePresentation(displayId); // update DisplayInfo. final Display display = mDisplayService.getDisplay(displayId); if (display != null) { showPresentation(display); } } } @Override Loading Loading @@ -304,16 +295,17 @@ public class KeyguardDisplayManager { mClock.removeCallbacks(mMoveTextRunnable); } @Override public void onDisplayChanged() { updateBounds(); getWindow().getDecorView().requestLayout(); } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); final Rect bounds = getWindow().getWindowManager().getMaximumWindowMetrics() .getBounds(); mUsableWidth = VIDEO_SAFE_REGION * bounds.width() / 100; mUsableHeight = VIDEO_SAFE_REGION * bounds.height() / 100; mMarginLeft = (100 - VIDEO_SAFE_REGION) * bounds.width() / 200; mMarginTop = (100 - VIDEO_SAFE_REGION) * bounds.height() / 200; updateBounds(); setContentView(LayoutInflater.from(mContext) .inflate(R.layout.keyguard_presentation, null)); Loading @@ -338,5 +330,14 @@ public class KeyguardDisplayManager { mKeyguardClockSwitchController.init(); } private void updateBounds() { final Rect bounds = getWindow().getWindowManager().getMaximumWindowMetrics() .getBounds(); mUsableWidth = VIDEO_SAFE_REGION * bounds.width() / 100; mUsableHeight = VIDEO_SAFE_REGION * bounds.height() / 100; mMarginLeft = (100 - VIDEO_SAFE_REGION) * bounds.width() / 200; mMarginTop = (100 - VIDEO_SAFE_REGION) * bounds.height() / 200; } } }