Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4a39936d authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Suppress unlock notifications on non-FBE devices.

We have a longer-term plan to clean up FBE unlock notifications, but
in the meantime don't confuse users by quickly flashing them on
non-FBE devices.

Bug: 28840764
Change-Id: I696508ef981b6f8f51f22ea24487d87d27d5b6e3
parent 4815ed45
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@ import android.os.IProgressListener;
import android.os.Parcel;
import android.os.RemoteException;
import android.os.storage.IMountService;
import android.os.storage.StorageManager;
import android.os.ServiceManager;
import android.os.SystemProperties;
import android.os.UserHandle;
@@ -341,6 +342,10 @@ public class LockSettingsService extends ILockSettings.Stub {
    private void showEncryptionNotification(UserHandle user, CharSequence title, CharSequence message,
            CharSequence detail, PendingIntent intent) {
        if (DEBUG) Slog.v(TAG, "showing encryption notification, user: " + user.getIdentifier());

        // Suppress all notifications on non-FBE devices for now
        if (!StorageManager.isFileEncryptedNativeOrEmulated()) return;

        Notification notification = new Notification.Builder(mContext)
                .setSmallIcon(com.android.internal.R.drawable.ic_user_secure)
                .setWhen(0)