Disable dream highlight when screensaver is disabled in Settings.

Bug: 228329639
Test: Manual
Change-Id: Ic6d9664cc800c28327fbcaa1628bb518c07354f2
This commit is contained in:
Victor Truong
2022-04-11 22:49:24 +00:00
parent 7a5ade7e9f
commit cd11aa887a
2 changed files with 8 additions and 1 deletions

View File

@@ -177,4 +177,11 @@ public class DreamAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
notifyDataSetChanged();
}
}
/**
* Gets the enabled state of all items.
*/
public boolean getEnabled() {
return mEnabled;
}
}

View File

@@ -158,7 +158,7 @@ public class DreamPickerController extends BasePreferenceController implements
@Override
public boolean isActive() {
if (mActiveDream == null) {
if (!mAdapter.getEnabled() || mActiveDream == null) {
return false;
}
return mDreamInfo.componentName.equals(mActiveDream.componentName);