Disable FallbackHome on User 0 in split user system.

Bug: 28870689
Change-Id: Ib0707cc31b1dd0851c918e4effe6d7a3798c801a
(cherry picked from commit 40066f7bfb4feb871d3db88e7575d67971257bea)
diff --git a/src/com/android/settings/FallbackHome.java b/src/com/android/settings/FallbackHome.java
index deb01a1..6c0dc3d 100644
--- a/src/com/android/settings/FallbackHome.java
+++ b/src/com/android/settings/FallbackHome.java
@@ -21,10 +21,12 @@
 import android.content.Context;
 import android.content.Intent;
 import android.content.IntentFilter;
+import android.content.pm.PackageManager;
 import android.content.pm.ResolveInfo;
 import android.os.Bundle;
 import android.os.Handler;
 import android.os.Message;
+import android.os.UserHandle;
 import android.os.UserManager;
 import android.provider.Settings;
 import android.util.Log;
@@ -68,6 +70,12 @@
                     .addCategory(Intent.CATEGORY_HOME);
             final ResolveInfo homeInfo = getPackageManager().resolveActivity(homeIntent, 0);
             if (Objects.equals(getPackageName(), homeInfo.activityInfo.packageName)) {
+                if (UserManager.isSplitSystemUser()
+                        && UserHandle.myUserId() == UserHandle.USER_SYSTEM) {
+                    // This avoids the situation where the system user has no home activity after
+                    // SUW and this activity continues to throw out warnings. See b/28870689.
+                    return;
+                }
                 Log.d(TAG, "User unlocked but no home; let's hope someone enables one soon?");
                 mHandler.sendEmptyMessageDelayed(0, 500);
             } else {