Modify AppHeaderController to provide UI for notif settings
- The AppHeaderController is no longer a singleton. Each time appheader should be updated we will create a new controller. It acts as a builder/mutator, user provides customizable inputs, and the controller will bind everything to UI when calling done(). Bug: 32442716 Test: RunSettingsRoboTests Change-Id: Icfc5bcd8bc170a02b57432d864eaddf71db0d5b4
This commit is contained in:
@@ -16,23 +16,19 @@
|
||||
|
||||
package com.android.settings.applications;
|
||||
|
||||
import android.app.Fragment;
|
||||
import android.content.Context;
|
||||
import android.view.View;
|
||||
|
||||
public class ApplicationFeatureProviderImpl implements ApplicationFeatureProvider {
|
||||
|
||||
private final Context mContext;
|
||||
|
||||
private AppHeaderController mAppHeaderController;
|
||||
|
||||
public ApplicationFeatureProviderImpl(Context context) {
|
||||
mContext = context.getApplicationContext();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AppHeaderController getAppHeaderController() {
|
||||
if (mAppHeaderController == null) {
|
||||
mAppHeaderController = new AppHeaderController(mContext);
|
||||
}
|
||||
return mAppHeaderController;
|
||||
public AppHeaderController newAppHeaderController(Fragment fragment, View appHeader) {
|
||||
return new AppHeaderController(mContext, fragment, appHeader);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user