Wrap and carry clicked slot information data for restriction page

Refresh category title by different time slot condition

Bug: 177406865
Test: make SettingsRoboTests
Test: make SettingsGoogleRoboTests
Change-Id: I006f6825fdb471f863c0355c65bfc4ca9d980191
This commit is contained in:
ykhung
2021-04-25 17:07:58 +08:00
committed by YUKAI HUNG
parent 5e578ddd13
commit 75c5fc5906
3 changed files with 32 additions and 14 deletions

View File

@@ -38,6 +38,7 @@ public class ExpandDividerPreference extends Preference {
private OnExpandListener mOnExpandListener;
private boolean mIsExpanded = false;
private String mTitleContent = null;
/** A callback listener for expand state is changed by users. */
public interface OnExpandListener {
@@ -72,6 +73,7 @@ public class ExpandDividerPreference extends Preference {
}
void setTitle(final String titleContent) {
mTitleContent = titleContent;
if (mTextView != null) {
mTextView.postDelayed(
() -> mTextView.setText(titleContent), 50);
@@ -95,5 +97,6 @@ public class ExpandDividerPreference extends Preference {
if (mImageView != null) {
mImageView.setImageResource(iconId);
}
setTitle(mTitleContent);
}
}