- 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
35 lines
1.1 KiB
Java
35 lines
1.1 KiB
Java
/*
|
|
* Copyright (C) 2016 The Android Open Source Project
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
|
|
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;
|
|
|
|
public ApplicationFeatureProviderImpl(Context context) {
|
|
mContext = context.getApplicationContext();
|
|
}
|
|
|
|
public AppHeaderController newAppHeaderController(Fragment fragment, View appHeader) {
|
|
return new AppHeaderController(mContext, fragment, appHeader);
|
|
}
|
|
}
|