Loading packages/SystemUI/src/com/android/systemui/media/MediaProjectionPermissionActivity.java +6 −2 Original line number Diff line number Diff line Loading @@ -114,8 +114,10 @@ public class MediaProjectionPermissionActivity extends Activity @Override protected void onDestroy() { super.onDestroy(); if (mDialog != null) { mDialog.dismiss(); } } @Override public void onClick(DialogInterface dialog, int which) { Loading @@ -128,7 +130,9 @@ public class MediaProjectionPermissionActivity extends Activity Log.e(TAG, "Error granting projection permission", e); setResult(RESULT_CANCELED); } finally { if (mDialog != null) { mDialog.dismiss(); } finish(); } } Loading packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +9 −0 Original line number Diff line number Diff line Loading @@ -62,6 +62,7 @@ import android.service.notification.NotificationListenerService.RankingMap; import android.service.notification.StatusBarNotification; import android.text.TextUtils; import android.util.Log; import android.util.Slog; import android.util.SparseArray; import android.util.SparseBooleanArray; import android.view.Display; Loading Loading @@ -2227,6 +2228,14 @@ public abstract class BaseStatusBar extends SystemUI implements } public boolean isKeyguardSecure() { if (mStatusBarKeyguardViewManager == null) { // startKeyguard() hasn't been called yet, so we don't know. // Make sure anything that needs to know isKeyguardSecure() checks and re-checks this // value onVisibilityChanged(). Slog.w(TAG, "isKeyguardSecure() called before startKeyguard(), returning false", new Throwable()); return false; } return mStatusBarKeyguardViewManager.isSecure(); } } packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java +6 −1 Original line number Diff line number Diff line Loading @@ -263,6 +263,7 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL public void setPhoneStatusBar(PhoneStatusBar phoneStatusBar) { mPhoneStatusBar = phoneStatusBar; updateCameraVisibility(); // in case onFinishInflate() was called too early } private Intent getCameraIntent() { Loading @@ -274,6 +275,10 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL } private void updateCameraVisibility() { if (mCameraImageView == null) { // Things are not set up yet; reply hazy, ask again later return; } ResolveInfo resolved = mContext.getPackageManager().resolveActivityAsUser(getCameraIntent(), PackageManager.MATCH_DEFAULT_ONLY, mLockPatternUtils.getCurrentUser()); Loading @@ -300,7 +305,7 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL private boolean isCameraDisabledByDpm() { final DevicePolicyManager dpm = (DevicePolicyManager) getContext().getSystemService(Context.DEVICE_POLICY_SERVICE); if (dpm != null) { if (dpm != null && mPhoneStatusBar != null) { try { final int userId = ActivityManagerNative.getDefault().getCurrentUser().id; final int disabledFlags = dpm.getKeyguardDisabledFeatures(null, userId); Loading Loading
packages/SystemUI/src/com/android/systemui/media/MediaProjectionPermissionActivity.java +6 −2 Original line number Diff line number Diff line Loading @@ -114,8 +114,10 @@ public class MediaProjectionPermissionActivity extends Activity @Override protected void onDestroy() { super.onDestroy(); if (mDialog != null) { mDialog.dismiss(); } } @Override public void onClick(DialogInterface dialog, int which) { Loading @@ -128,7 +130,9 @@ public class MediaProjectionPermissionActivity extends Activity Log.e(TAG, "Error granting projection permission", e); setResult(RESULT_CANCELED); } finally { if (mDialog != null) { mDialog.dismiss(); } finish(); } } Loading
packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +9 −0 Original line number Diff line number Diff line Loading @@ -62,6 +62,7 @@ import android.service.notification.NotificationListenerService.RankingMap; import android.service.notification.StatusBarNotification; import android.text.TextUtils; import android.util.Log; import android.util.Slog; import android.util.SparseArray; import android.util.SparseBooleanArray; import android.view.Display; Loading Loading @@ -2227,6 +2228,14 @@ public abstract class BaseStatusBar extends SystemUI implements } public boolean isKeyguardSecure() { if (mStatusBarKeyguardViewManager == null) { // startKeyguard() hasn't been called yet, so we don't know. // Make sure anything that needs to know isKeyguardSecure() checks and re-checks this // value onVisibilityChanged(). Slog.w(TAG, "isKeyguardSecure() called before startKeyguard(), returning false", new Throwable()); return false; } return mStatusBarKeyguardViewManager.isSecure(); } }
packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java +6 −1 Original line number Diff line number Diff line Loading @@ -263,6 +263,7 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL public void setPhoneStatusBar(PhoneStatusBar phoneStatusBar) { mPhoneStatusBar = phoneStatusBar; updateCameraVisibility(); // in case onFinishInflate() was called too early } private Intent getCameraIntent() { Loading @@ -274,6 +275,10 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL } private void updateCameraVisibility() { if (mCameraImageView == null) { // Things are not set up yet; reply hazy, ask again later return; } ResolveInfo resolved = mContext.getPackageManager().resolveActivityAsUser(getCameraIntent(), PackageManager.MATCH_DEFAULT_ONLY, mLockPatternUtils.getCurrentUser()); Loading @@ -300,7 +305,7 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL private boolean isCameraDisabledByDpm() { final DevicePolicyManager dpm = (DevicePolicyManager) getContext().getSystemService(Context.DEVICE_POLICY_SERVICE); if (dpm != null) { if (dpm != null && mPhoneStatusBar != null) { try { final int userId = ActivityManagerNative.getDefault().getCurrentUser().id; final int disabledFlags = dpm.getKeyguardDisabledFeatures(null, userId); Loading