Merge "Improve entrance animations on convo page" into sc-dev am: a5b242ec3d
am: 7bff80dec9
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/14702666 Change-Id: I112aa70b50b88e4373178784845fd5dfc189bf95
This commit is contained in:
@@ -29,7 +29,7 @@
|
|||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
android:key="important_conversations"
|
android:key="important_conversations"
|
||||||
android:title="@string/important_conversations"
|
android:title="@string/important_conversations"
|
||||||
android:visibility="gone"
|
settings:isPreferenceVisible="false"
|
||||||
settings:allowDividerAbove="false"
|
settings:allowDividerAbove="false"
|
||||||
settings:allowDividerBelow="true" >
|
settings:allowDividerBelow="true" >
|
||||||
<Preference
|
<Preference
|
||||||
@@ -48,6 +48,7 @@
|
|||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
android:title="@string/other_conversations"
|
android:title="@string/other_conversations"
|
||||||
android:key="other_conversations"
|
android:key="other_conversations"
|
||||||
|
settings:isPreferenceVisible="false"
|
||||||
settings:allowDividerAbove="true"
|
settings:allowDividerAbove="true"
|
||||||
settings:allowDividerBelow="false" />
|
settings:allowDividerBelow="false" />
|
||||||
|
|
||||||
@@ -55,6 +56,7 @@
|
|||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
android:title="@string/recent_conversations"
|
android:title="@string/recent_conversations"
|
||||||
android:key="recent_conversations"
|
android:key="recent_conversations"
|
||||||
|
settings:isPreferenceVisible="false"
|
||||||
settings:allowDividerAbove="true"
|
settings:allowDividerAbove="true"
|
||||||
settings:allowDividerBelow="false" />
|
settings:allowDividerBelow="false" />
|
||||||
|
|
||||||
|
@@ -68,21 +68,10 @@ public class AllConversationsPreferenceController extends ConversationListPrefer
|
|||||||
public void updateState(Preference preference) {
|
public void updateState(Preference preference) {
|
||||||
PreferenceCategory pref = (PreferenceCategory) preference;
|
PreferenceCategory pref = (PreferenceCategory) preference;
|
||||||
// Load conversations
|
// Load conversations
|
||||||
new AsyncTask<Void, Void, Void>() {
|
|
||||||
@Override
|
|
||||||
protected Void doInBackground(Void... unused) {
|
|
||||||
mConversations = mBackend.getConversations(false).getList();
|
mConversations = mBackend.getConversations(false).getList();
|
||||||
Collections.sort(mConversations, mConversationComparator);
|
Collections.sort(mConversations, mConversationComparator);
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onPostExecute(Void unused) {
|
|
||||||
if (mContext == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
populateList(mConversations, pref);
|
populateList(mConversations, pref);
|
||||||
}
|
}
|
||||||
}.execute();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -63,7 +63,7 @@ public abstract class ConversationListPreferenceController extends AbstractPrefe
|
|||||||
|
|
||||||
protected void populateList(List<ConversationChannelWrapper> conversations,
|
protected void populateList(List<ConversationChannelWrapper> conversations,
|
||||||
PreferenceGroup containerGroup) {
|
PreferenceGroup containerGroup) {
|
||||||
// TODO: if preference has children, compare with newly loaded list
|
containerGroup.setVisible(false);
|
||||||
containerGroup.removeAll();
|
containerGroup.removeAll();
|
||||||
if (conversations != null) {
|
if (conversations != null) {
|
||||||
populateConversations(conversations, containerGroup);
|
populateConversations(conversations, containerGroup);
|
||||||
@@ -72,11 +72,11 @@ public abstract class ConversationListPreferenceController extends AbstractPrefe
|
|||||||
if (containerGroup.getPreferenceCount() == 0) {
|
if (containerGroup.getPreferenceCount() == 0) {
|
||||||
containerGroup.setVisible(false);
|
containerGroup.setVisible(false);
|
||||||
} else {
|
} else {
|
||||||
containerGroup.setVisible(true);
|
|
||||||
Preference summaryPref = getSummaryPreference();
|
Preference summaryPref = getSummaryPreference();
|
||||||
if (summaryPref != null) {
|
if (summaryPref != null) {
|
||||||
containerGroup.addPreference(summaryPref);
|
containerGroup.addPreference(summaryPref);
|
||||||
}
|
}
|
||||||
|
containerGroup.setVisible(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -67,22 +67,9 @@ public class PriorityConversationsPreferenceController extends
|
|||||||
public void updateState(Preference preference) {
|
public void updateState(Preference preference) {
|
||||||
PreferenceCategory pref = (PreferenceCategory) preference;
|
PreferenceCategory pref = (PreferenceCategory) preference;
|
||||||
// Load conversations
|
// Load conversations
|
||||||
new AsyncTask<Void, Void, Void>() {
|
|
||||||
@Override
|
|
||||||
protected Void doInBackground(Void... unused) {
|
|
||||||
mConversations = mBackend.getConversations(true).getList();
|
mConversations = mBackend.getConversations(true).getList();
|
||||||
Collections.sort(mConversations, mConversationComparator);
|
Collections.sort(mConversations, mConversationComparator);
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onPostExecute(Void unused) {
|
|
||||||
if (mContext == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
populateList(mConversations, pref);
|
populateList(mConversations, pref);
|
||||||
}
|
}
|
||||||
}.execute();
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -104,26 +104,14 @@ public class RecentConversationsPreferenceController extends AbstractPreferenceC
|
|||||||
public void updateState(Preference preference) {
|
public void updateState(Preference preference) {
|
||||||
PreferenceCategory pref = (PreferenceCategory) preference;
|
PreferenceCategory pref = (PreferenceCategory) preference;
|
||||||
// Load conversations
|
// Load conversations
|
||||||
new AsyncTask<Void, Void, Void>() {
|
|
||||||
@Override
|
|
||||||
protected Void doInBackground(Void... unused) {
|
|
||||||
try {
|
try {
|
||||||
mConversations = mPs.getRecentConversations().getList();
|
mConversations = mPs.getRecentConversations().getList();
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
Slog.w(TAG, "Could get recents", e);
|
Slog.w(TAG, "Could get recents", e);
|
||||||
}
|
}
|
||||||
Collections.sort(mConversations, mConversationComparator);
|
Collections.sort(mConversations, mConversationComparator);
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onPostExecute(Void unused) {
|
|
||||||
if (mContext == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
populateList(mConversations, pref);
|
populateList(mConversations, pref);
|
||||||
}
|
|
||||||
}.execute();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user