diff --git a/src/com/android/settings/slices/SlicePreference.java b/src/com/android/settings/slices/SlicePreference.java
index a88ae76..8b035eb 100644
--- a/src/com/android/settings/slices/SlicePreference.java
+++ b/src/com/android/settings/slices/SlicePreference.java
@@ -18,6 +18,7 @@
 
 import android.content.Context;
 import android.util.AttributeSet;
+import android.view.View;
 
 import androidx.slice.Slice;
 import androidx.slice.widget.SliceView;
@@ -48,6 +49,11 @@
     }
 
     public void onSliceUpdated(Slice slice) {
+        if (slice == null) {
+            mSliceView.setVisibility(View.GONE);
+        } else {
+            mSliceView.setVisibility(View.VISIBLE);
+        }
         mSliceView.onChanged(slice);
         notifyChanged();
     }
diff --git a/src/com/android/settings/slices/SlicePreferenceController.java b/src/com/android/settings/slices/SlicePreferenceController.java
index 2432c99..8f3d0fb 100644
--- a/src/com/android/settings/slices/SlicePreferenceController.java
+++ b/src/com/android/settings/slices/SlicePreferenceController.java
@@ -18,6 +18,7 @@
 
 import android.content.Context;
 import android.net.Uri;
+import android.util.Log;
 
 import androidx.annotation.VisibleForTesting;
 import androidx.lifecycle.LiveData;
@@ -38,6 +39,7 @@
  */
 public class SlicePreferenceController extends BasePreferenceController implements
         LifecycleObserver, OnStart, OnStop, Observer<Slice> {
+    private static final String TAG = "SlicePreferenceController";
     @VisibleForTesting
     LiveData<Slice> mLiveData;
     @VisibleForTesting
@@ -61,7 +63,10 @@
 
     public void setSliceUri(Uri uri) {
         mUri = uri;
-        mLiveData = SliceLiveData.fromUri(mContext, mUri);
+        mLiveData = SliceLiveData.fromUri(mContext, mUri, (int type, Throwable source) -> {
+            Log.w(TAG, "Slice may be null. uri = " + uri + ", error = " + type);
+            onChanged(null);
+        });
 
         //TODO(b/120803703): figure out why we need to remove observer first
         mLiveData.removeObserver(this);
diff --git a/tests/robotests/src/com/android/settings/slices/SlicePreferenceTest.java b/tests/robotests/src/com/android/settings/slices/SlicePreferenceTest.java
new file mode 100644
index 0000000..1d3d710
--- /dev/null
+++ b/tests/robotests/src/com/android/settings/slices/SlicePreferenceTest.java
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.settings.slices;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import static org.mockito.Mockito.spy;
+
+import android.content.Context;
+import android.net.Uri;
+import android.view.View;
+
+import androidx.slice.Slice;
+import androidx.slice.widget.SliceView;
+
+import com.android.settings.R;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.MockitoAnnotations;
+import org.robolectric.Robolectric;
+import org.robolectric.RobolectricTestRunner;
+import org.robolectric.RuntimeEnvironment;
+
+@RunWith(RobolectricTestRunner.class)
+public class SlicePreferenceTest {
+
+    private SlicePreference mSlicePreference;
+    private Context mContext;
+
+    @Before
+    public void setUp() {
+        MockitoAnnotations.initMocks(this);
+        mContext = spy(RuntimeEnvironment.application);
+
+        mSlicePreference = new SlicePreference(mContext, Robolectric.buildAttributeSet()
+                .setStyleAttribute("@style/SlicePreference")
+                .build());
+    }
+
+    @Test
+    public void onSliceUpdated_null_hideSliceView() {
+        final SliceView sliceView = mSlicePreference.findViewById(R.id.slice_view);
+
+        mSlicePreference.onSliceUpdated(null);
+
+        assertThat(sliceView.getVisibility()).isEqualTo(View.GONE);
+    }
+
+    @Test
+    public void onSliceUpdated_notNull_showSliceView() {
+        final SliceView sliceView = mSlicePreference.findViewById(R.id.slice_view);
+
+        mSlicePreference.onSliceUpdated(new Slice.Builder(Uri.parse("uri")).build());
+
+        assertThat(sliceView.getVisibility()).isEqualTo(View.VISIBLE);
+    }
+}
\ No newline at end of file
