diff options
| author | 2016-11-28 17:02:54 +0000 | |
|---|---|---|
| committer | 2016-11-28 17:02:59 +0000 | |
| commit | c66cc5166e1a1c9ee11aa01e56ffa25cd5fa2bc3 (patch) | |
| tree | 94473ab60cb948d5ae978fe2e16b8d8b5d8a1f72 | |
| parent | a69433066813a32739b1e04c67ca372262032092 (diff) | |
| parent | cd941213a237073fea567f0faf0098ec23459fb5 (diff) | |
Merge "Revert more integrity check changes."
| -rw-r--r-- | core/res/res/values/strings.xml | 5 | ||||
| -rw-r--r-- | core/res/res/values/symbols.xml | 2 | ||||
| -rw-r--r-- | services/core/java/com/android/server/power/ShutdownThread.java | 3 | ||||
| -rw-r--r-- | services/core/java/com/android/server/wm/WindowManagerService.java | 53 |
4 files changed, 2 insertions, 61 deletions
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml index baf3cd817d5b..4070d4802732 100644 --- a/core/res/res/values/strings.xml +++ b/core/res/res/values/strings.xml @@ -4440,11 +4440,6 @@ <!-- Text of button to allow user to abort countdown and immediately start another session in retail demo mode [CHAR LIMIT=40] --> <string name="demo_user_inactivity_timeout_right_button">Reset now</string> - <!-- Title of notification shown when device has been forced to safe mode after a security compromise. --> - <string name="audit_safemode_notification">Factory reset to use this device without restrictions</string> - <!-- Description of notification shown when device has been forced to safe mode after a security compromise. --> - <string name="audit_safemode_notification_details">Touch to learn more.</string> - <!-- Accessibilty string added to a widget that has been suspended [CHAR LIMIT=20] --> <string name="suspended_widget_accessibility">Disabled <xliff:g id="label" example="Calendar">%1$s</xliff:g></string> diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml index 5b608b84c51d..a28a6fdc219a 100644 --- a/core/res/res/values/symbols.xml +++ b/core/res/res/values/symbols.xml @@ -1920,8 +1920,6 @@ <java-symbol type="string" name="config_customVpnConfirmDialogComponent" /> <java-symbol type="string" name="config_defaultNetworkScorerPackageName" /> <java-symbol type="string" name="config_persistentDataPackageName" /> - <java-symbol type="string" name="audit_safemode_notification" /> - <java-symbol type="string" name="audit_safemode_notification_details" /> <java-symbol type="string" name="reset_retail_demo_mode_title" /> <java-symbol type="string" name="reset_retail_demo_mode_text" /> <java-symbol type="string" name="demo_user_inactivity_timeout_title" /> diff --git a/services/core/java/com/android/server/power/ShutdownThread.java b/services/core/java/com/android/server/power/ShutdownThread.java index cd966ef323b7..841e2a158c4f 100644 --- a/services/core/java/com/android/server/power/ShutdownThread.java +++ b/services/core/java/com/android/server/power/ShutdownThread.java @@ -94,9 +94,6 @@ public final class ShutdownThread extends Thread { public static final String REBOOT_SAFEMODE_PROPERTY = "persist.sys.safemode"; public static final String RO_SAFEMODE_PROPERTY = "ro.sys.safemode"; - // Indicates whether we should stay in safe mode until ro.build.date.utc is newer than this - public static final String AUDIT_SAFEMODE_PROPERTY = "persist.sys.audit_safemode"; - // static instance of this thread private static final ShutdownThread sInstance = new ShutdownThread(); diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java index 00d8fba09a58..9b089ec576dd 100644 --- a/services/core/java/com/android/server/wm/WindowManagerService.java +++ b/services/core/java/com/android/server/wm/WindowManagerService.java @@ -25,9 +25,6 @@ import android.app.ActivityManager; import android.app.ActivityManagerInternal; import android.app.AppOpsManager; import android.app.IActivityManager; -import android.app.Notification; -import android.app.NotificationManager; -import android.app.PendingIntent; import android.app.admin.DevicePolicyManager; import android.content.BroadcastReceiver; import android.content.ContentResolver; @@ -331,8 +328,6 @@ public class WindowManagerService extends IWindowManager.Stub private static final float DRAG_SHADOW_ALPHA_TRANSPARENT = .7071f; - private static final String PROPERTY_BUILD_DATE_UTC = "ro.build.date.utc"; - // Enums for animation scale update types. @Retention(RetentionPolicy.SOURCE) @IntDef({WINDOW_ANIMATION_SCALE, TRANSITION_ANIMATION_SCALE, ANIMATION_DURATION_SCALE}) @@ -5974,35 +5969,6 @@ public class WindowManagerService extends IWindowManager.Stub mFocusedApp.mTask.mStack : null; } - private void showAuditSafeModeNotification() { - PendingIntent pendingIntent = PendingIntent.getActivity(mContext, 0, - new Intent(Intent.ACTION_VIEW, - Uri.parse("https://support.google.com/nexus/answer/2852139")), 0); - - String title = mContext.getString(R.string.audit_safemode_notification); - - Notification notification = new Notification.Builder(mContext) - .setSmallIcon(com.android.internal.R.drawable.stat_sys_warning) - .setWhen(0) - .setOngoing(true) - .setTicker(title) - .setLocalOnly(true) - .setPriority(Notification.PRIORITY_HIGH) - .setVisibility(Notification.VISIBILITY_PUBLIC) - .setColor(mContext.getColor( - com.android.internal.R.color.system_notification_accent_color)) - .setContentTitle(title) - .setContentText(mContext.getString(R.string.audit_safemode_notification_details)) - .setContentIntent(pendingIntent) - .build(); - - NotificationManager notificationManager = (NotificationManager) mContext - .getSystemService(Context.NOTIFICATION_SERVICE); - - notificationManager.notifyAsUser(null, R.string.audit_safemode_notification, notification, - UserHandle.ALL); - } - public boolean detectSafeMode() { if (!mInputMonitor.waitForInputDevicesReady( INPUT_DEVICES_READY_FOR_SAFE_MODE_DETECTION_TIMEOUT_MILLIS)) { @@ -6030,23 +5996,8 @@ public class WindowManagerService extends IWindowManager.Stub try { if (SystemProperties.getInt(ShutdownThread.REBOOT_SAFEMODE_PROPERTY, 0) != 0 || SystemProperties.getInt(ShutdownThread.RO_SAFEMODE_PROPERTY, 0) != 0) { - int auditSafeMode = SystemProperties.getInt(ShutdownThread.AUDIT_SAFEMODE_PROPERTY, 0); - - if (auditSafeMode == 0) { - mSafeMode = true; - SystemProperties.set(ShutdownThread.REBOOT_SAFEMODE_PROPERTY, ""); - } else { - // stay in safe mode until we have updated to a newer build - int buildDate = SystemProperties.getInt(PROPERTY_BUILD_DATE_UTC, 0); - - if (auditSafeMode >= buildDate) { - mSafeMode = true; - showAuditSafeModeNotification(); - } else { - SystemProperties.set(ShutdownThread.REBOOT_SAFEMODE_PROPERTY, ""); - SystemProperties.set(ShutdownThread.AUDIT_SAFEMODE_PROPERTY, ""); - } - } + mSafeMode = true; + SystemProperties.set(ShutdownThread.REBOOT_SAFEMODE_PROPERTY, ""); } } catch (IllegalArgumentException e) { } |