Revert "Move keyguard enabled to Component Override"

Revert "Remove device/google/atv/overlay"

Revert "Remove device/google/atv overlay from RRO exclusion"

Revert submission 1510032-atv-rro

Reason for revert: b/178396156
Reverted Changes:
If9a99f850:Move keyguard enabled to Component Override
I1b0056b50:Make device/google/atv compatible with RRO
If766a0152:Remove device/google/atv overlay from RRO exclusio...
I9df2747d9:Remove device/google/atv/overlay
If689c72c2:Move device/google/atv overlays into SystemUI

Change-Id: I05f42caf8614c2c19ba5a33ec965843cc37cde98
This commit is contained in:
Robin Lee
2021-01-25 19:23:54 +00:00
parent 03ec0d0492
commit d3b506c464
4 changed files with 9 additions and 14 deletions

View File

@@ -601,7 +601,8 @@
<service
android:name=".keyguard.KeyguardService"
android:exported="true" />
android:exported="true"
android:enabled="@bool/config_enableKeyguardService" />
<activity android:name=".keyguard.WorkLockActivity"
android:label="@string/accessibility_desc_work_lock"

View File

@@ -43,6 +43,9 @@
<item>com.android.systemui.toast.ToastUI</item>
</string-array>
<!-- Disable KeyguardService -->
<bool name="config_enableKeyguardService">false</bool>
<!-- Svelte specific logic, see RecentsConfiguration.SVELTE_* constants. -->
<integer name="recents_svelte_level">3</integer>
</resources>

View File

@@ -168,6 +168,9 @@
<!-- Animation duration when using long press on recents to dock -->
<integer name="long_press_dock_anim_duration">250</integer>
<!-- Whether to enable KeyguardService or not -->
<bool name="config_enableKeyguardService">true</bool>
<!-- The maximum count of notifications on Keyguard. The rest will be collapsed in an overflow
card. -->
<integer name="keyguard_max_notification_count">3</integer>

View File

@@ -34,12 +34,10 @@ import android.app.PendingIntent;
import android.app.StatusBarManager;
import android.app.trust.TrustManager;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.pm.PackageManager.NameNotFoundException;
import android.content.pm.UserInfo;
import android.hardware.biometrics.BiometricSourceType;
import android.media.AudioAttributes;
@@ -91,7 +89,6 @@ import com.android.systemui.SystemUIFactory;
import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.dagger.qualifiers.UiBackground;
import com.android.systemui.dump.DumpManager;
import com.android.systemui.keyguard.KeyguardService;
import com.android.systemui.keyguard.dagger.KeyguardModule;
import com.android.systemui.plugins.FalsingManager;
import com.android.systemui.shared.system.QuickStepContract;
@@ -787,7 +784,7 @@ public class KeyguardViewMediator extends SystemUI implements Dumpable {
// Assume keyguard is showing (unless it's disabled) until we know for sure, unless Keyguard
// is disabled.
if (isKeyguardServiceEnabled()) {
if (mContext.getResources().getBoolean(R.bool.config_enableKeyguardService)) {
setShowingLocked(!shouldWaitForProvisioning()
&& !mLockPatternUtils.isLockScreenDisabled(
KeyguardUpdateMonitor.getCurrentUser()), true /* forceCallbacks */);
@@ -965,15 +962,6 @@ public class KeyguardViewMediator extends SystemUI implements Dumpable {
mUpdateMonitor.dispatchFinishedGoingToSleep(why);
}
private boolean isKeyguardServiceEnabled() {
try {
return mContext.getPackageManager().getServiceInfo(
new ComponentName(mContext, KeyguardService.class), 0).isEnabled();
} catch (NameNotFoundException e) {
return true;
}
}
private long getLockTimeout(int userId) {
// if the screen turned off because of timeout or the user hit the power button
// and we don't need to lock immediately, set an alarm