Enable some settings pages to use paralleled-loading method
- Here these pages include AppInfoDashboardFragment, ConnectedDeviceDashboardFragment, DevelopmentSettingsDashboardFragment, NetworkDashboardFragment, ConfigureNotificationSettings. - The TimeSpentInAppPreferenceController use the LiveDataController. Fixes: 135299529 Bug: 137558156 Test: compilation Change-Id: I455a16536c9966184f1b2bd81d1f1217f3e09f9d
This commit is contained in:
@@ -29,13 +29,15 @@ import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceScreen;
|
||||
|
||||
import com.android.settings.applications.ApplicationFeatureProvider;
|
||||
import com.android.settings.core.BasePreferenceController;
|
||||
import com.android.settings.core.LiveDataController;
|
||||
import com.android.settings.overlay.FeatureFactory;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class TimeSpentInAppPreferenceController extends BasePreferenceController {
|
||||
|
||||
/**
|
||||
* To Retrieve the time consumption of the application.
|
||||
*/
|
||||
public class TimeSpentInAppPreferenceController extends LiveDataController {
|
||||
@VisibleForTesting
|
||||
static final Intent SEE_TIME_IN_APP_TEMPLATE = new Intent(Settings.ACTION_APP_USAGE_SETTINGS);
|
||||
|
||||
@@ -85,7 +87,7 @@ public class TimeSpentInAppPreferenceController extends BasePreferenceController
|
||||
}
|
||||
|
||||
@Override
|
||||
public CharSequence getSummary() {
|
||||
protected CharSequence getSummaryTextInBackground() {
|
||||
return mAppFeatureProvider.getTimeSpentInApp(mPackageName);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user