Loading core/java/android/app/slice/SliceSpec.java +1 −1 Original line number Diff line number Diff line Loading @@ -89,7 +89,7 @@ public final class SliceSpec implements Parcelable { * * @param candidate candidate format of data. * @return true if versions are compatible. * @see androidx.slice.widget.SliceView * @see androidx.app.slice.widget.SliceView */ public boolean canRender(@NonNull SliceSpec candidate) { if (!mType.equals(candidate.mType)) return false; Loading packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java +9 −10 Original line number Diff line number Diff line Loading @@ -47,12 +47,12 @@ import java.util.HashMap; import java.util.List; import java.util.function.Consumer; import androidx.slice.Slice; import androidx.slice.SliceItem; import androidx.slice.core.SliceQuery; import androidx.slice.widget.ListContent; import androidx.slice.widget.RowContent; import androidx.slice.widget.SliceLiveData; import androidx.app.slice.Slice; import androidx.app.slice.SliceItem; import androidx.app.slice.core.SliceQuery; import androidx.app.slice.widget.ListContent; import androidx.app.slice.widget.RowContent; import androidx.app.slice.widget.SliceLiveData; /** * View visible under the clock on the lock screen and AoD. Loading Loading @@ -117,7 +117,7 @@ public class KeyguardSliceView extends LinearLayout implements View.OnClickListe private void showSlice(Slice slice) { ListContent lc = new ListContent(getContext(), slice); ListContent lc = new ListContent(slice); mHasHeader = lc.hasHeader(); List<SliceItem> subItems = lc.getRowItems(); if (!mHasHeader) { Loading @@ -125,8 +125,7 @@ public class KeyguardSliceView extends LinearLayout implements View.OnClickListe } else { mTitle.setVisibility(VISIBLE); // If there's a header it'll be the first subitem RowContent header = new RowContent(getContext(), subItems.get(0), true /* showStartItem */); RowContent header = new RowContent(subItems.get(0), true /* showStartItem */); SliceItem mainTitle = header.getTitleItem(); CharSequence title = mainTitle != null ? mainTitle.getText() : null; mTitle.setText(title); Loading @@ -150,7 +149,7 @@ public class KeyguardSliceView extends LinearLayout implements View.OnClickListe final int startIndex = mHasHeader ? 1 : 0; // First item is header; skip it for (int i = startIndex; i < subItemsCount; i++) { SliceItem item = subItems.get(i); RowContent rc = new RowContent(getContext(), item, true /* showStartItem */); RowContent rc = new RowContent(item, true /* showStartItem */); final Uri itemTag = item.getSlice().getUri(); // Try to reuse the view if already exists in the layout KeyguardSliceButton button = mRow.findViewWithTag(itemTag); Loading packages/SystemUI/src/com/android/systemui/keyguard/KeyguardSliceProvider.java +4 −4 Original line number Diff line number Diff line Loading @@ -40,10 +40,10 @@ import java.util.Date; import java.util.Locale; import java.util.concurrent.TimeUnit; import androidx.slice.Slice; import androidx.slice.SliceProvider; import androidx.slice.builders.ListBuilder; import androidx.slice.builders.ListBuilder.RowBuilder; import androidx.app.slice.Slice; import androidx.app.slice.SliceProvider; import androidx.app.slice.builders.ListBuilder; import androidx.app.slice.builders.ListBuilder.RowBuilder; /** * Simple Slice provider that shows the current date. Loading packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardSliceProviderTest.java +5 −5 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.verify; import androidx.slice.Slice; import androidx.app.slice.Slice; import android.app.AlarmManager; import android.content.ContentResolver; Loading @@ -45,10 +45,10 @@ import org.mockito.MockitoAnnotations; import java.util.Arrays; import java.util.concurrent.TimeUnit; import androidx.slice.SliceItem; import androidx.slice.SliceProvider; import androidx.slice.SliceSpecs; import androidx.slice.core.SliceQuery; import androidx.app.slice.SliceItem; import androidx.app.slice.SliceProvider; import androidx.app.slice.SliceSpecs; import androidx.app.slice.core.SliceQuery; @SmallTest @RunWith(AndroidTestingRunner.class) Loading Loading
core/java/android/app/slice/SliceSpec.java +1 −1 Original line number Diff line number Diff line Loading @@ -89,7 +89,7 @@ public final class SliceSpec implements Parcelable { * * @param candidate candidate format of data. * @return true if versions are compatible. * @see androidx.slice.widget.SliceView * @see androidx.app.slice.widget.SliceView */ public boolean canRender(@NonNull SliceSpec candidate) { if (!mType.equals(candidate.mType)) return false; Loading
packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java +9 −10 Original line number Diff line number Diff line Loading @@ -47,12 +47,12 @@ import java.util.HashMap; import java.util.List; import java.util.function.Consumer; import androidx.slice.Slice; import androidx.slice.SliceItem; import androidx.slice.core.SliceQuery; import androidx.slice.widget.ListContent; import androidx.slice.widget.RowContent; import androidx.slice.widget.SliceLiveData; import androidx.app.slice.Slice; import androidx.app.slice.SliceItem; import androidx.app.slice.core.SliceQuery; import androidx.app.slice.widget.ListContent; import androidx.app.slice.widget.RowContent; import androidx.app.slice.widget.SliceLiveData; /** * View visible under the clock on the lock screen and AoD. Loading Loading @@ -117,7 +117,7 @@ public class KeyguardSliceView extends LinearLayout implements View.OnClickListe private void showSlice(Slice slice) { ListContent lc = new ListContent(getContext(), slice); ListContent lc = new ListContent(slice); mHasHeader = lc.hasHeader(); List<SliceItem> subItems = lc.getRowItems(); if (!mHasHeader) { Loading @@ -125,8 +125,7 @@ public class KeyguardSliceView extends LinearLayout implements View.OnClickListe } else { mTitle.setVisibility(VISIBLE); // If there's a header it'll be the first subitem RowContent header = new RowContent(getContext(), subItems.get(0), true /* showStartItem */); RowContent header = new RowContent(subItems.get(0), true /* showStartItem */); SliceItem mainTitle = header.getTitleItem(); CharSequence title = mainTitle != null ? mainTitle.getText() : null; mTitle.setText(title); Loading @@ -150,7 +149,7 @@ public class KeyguardSliceView extends LinearLayout implements View.OnClickListe final int startIndex = mHasHeader ? 1 : 0; // First item is header; skip it for (int i = startIndex; i < subItemsCount; i++) { SliceItem item = subItems.get(i); RowContent rc = new RowContent(getContext(), item, true /* showStartItem */); RowContent rc = new RowContent(item, true /* showStartItem */); final Uri itemTag = item.getSlice().getUri(); // Try to reuse the view if already exists in the layout KeyguardSliceButton button = mRow.findViewWithTag(itemTag); Loading
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardSliceProvider.java +4 −4 Original line number Diff line number Diff line Loading @@ -40,10 +40,10 @@ import java.util.Date; import java.util.Locale; import java.util.concurrent.TimeUnit; import androidx.slice.Slice; import androidx.slice.SliceProvider; import androidx.slice.builders.ListBuilder; import androidx.slice.builders.ListBuilder.RowBuilder; import androidx.app.slice.Slice; import androidx.app.slice.SliceProvider; import androidx.app.slice.builders.ListBuilder; import androidx.app.slice.builders.ListBuilder.RowBuilder; /** * Simple Slice provider that shows the current date. Loading
packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardSliceProviderTest.java +5 −5 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.verify; import androidx.slice.Slice; import androidx.app.slice.Slice; import android.app.AlarmManager; import android.content.ContentResolver; Loading @@ -45,10 +45,10 @@ import org.mockito.MockitoAnnotations; import java.util.Arrays; import java.util.concurrent.TimeUnit; import androidx.slice.SliceItem; import androidx.slice.SliceProvider; import androidx.slice.SliceSpecs; import androidx.slice.core.SliceQuery; import androidx.app.slice.SliceItem; import androidx.app.slice.SliceProvider; import androidx.app.slice.SliceSpecs; import androidx.app.slice.core.SliceQuery; @SmallTest @RunWith(AndroidTestingRunner.class) Loading