Jason Monk | 9c7844c | 2017-01-18 15:21:53 -0500 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2017 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file |
| 5 | * except in compliance with the License. You may obtain a copy of the License at |
| 6 | * |
| 7 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | * |
| 9 | * Unless required by applicable law or agreed to in writing, software distributed under the |
| 10 | * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 11 | * KIND, either express or implied. See the License for the specific language governing |
| 12 | * permissions and limitations under the License. |
| 13 | */ |
| 14 | |
| 15 | package com.android.systemui; |
| 16 | |
Jason Monk | de850bb | 2017-02-01 19:26:30 -0500 | [diff] [blame] | 17 | import android.content.Context; |
Jason Monk | 9c7844c | 2017-01-18 15:21:53 -0500 | [diff] [blame] | 18 | import android.content.res.Configuration; |
| 19 | import android.os.Handler; |
| 20 | import android.os.HandlerThread; |
| 21 | import android.os.Looper; |
| 22 | import android.os.Process; |
| 23 | import android.util.ArrayMap; |
| 24 | |
| 25 | import com.android.internal.annotations.VisibleForTesting; |
Adrian Roos | 09c43c8 | 2017-02-09 19:58:25 +0100 | [diff] [blame^] | 26 | import com.android.internal.util.Preconditions; |
Jason Monk | 9c7844c | 2017-01-18 15:21:53 -0500 | [diff] [blame] | 27 | import com.android.systemui.assist.AssistManager; |
Jason Monk | de850bb | 2017-02-01 19:26:30 -0500 | [diff] [blame] | 28 | import com.android.systemui.plugins.PluginManager; |
Jason Monk | aa573e9 | 2017-01-27 17:00:29 -0500 | [diff] [blame] | 29 | import com.android.systemui.statusbar.phone.ConfigurationControllerImpl; |
| 30 | import com.android.systemui.statusbar.phone.DarkIconDispatcherImpl; |
Jason Monk | 9c7844c | 2017-01-18 15:21:53 -0500 | [diff] [blame] | 31 | import com.android.systemui.statusbar.phone.ManagedProfileController; |
| 32 | import com.android.systemui.statusbar.phone.ManagedProfileControllerImpl; |
Jason Monk | 421a941 | 2017-02-06 09:15:21 -0800 | [diff] [blame] | 33 | import com.android.systemui.statusbar.phone.StatusBarWindowManager; |
Jason Monk | aa573e9 | 2017-01-27 17:00:29 -0500 | [diff] [blame] | 34 | import com.android.systemui.statusbar.phone.StatusBarIconController; |
| 35 | import com.android.systemui.statusbar.phone.StatusBarIconControllerImpl; |
Jason Monk | 9c7844c | 2017-01-18 15:21:53 -0500 | [diff] [blame] | 36 | import com.android.systemui.statusbar.policy.AccessibilityController; |
| 37 | import com.android.systemui.statusbar.policy.BatteryController; |
| 38 | import com.android.systemui.statusbar.policy.BatteryControllerImpl; |
| 39 | import com.android.systemui.statusbar.policy.BluetoothController; |
| 40 | import com.android.systemui.statusbar.policy.BluetoothControllerImpl; |
| 41 | import com.android.systemui.statusbar.policy.CastController; |
| 42 | import com.android.systemui.statusbar.policy.CastControllerImpl; |
Jason Monk | aa573e9 | 2017-01-27 17:00:29 -0500 | [diff] [blame] | 43 | import com.android.systemui.statusbar.policy.ConfigurationController; |
| 44 | import com.android.systemui.statusbar.policy.DarkIconDispatcher; |
Jason Monk | 9c7844c | 2017-01-18 15:21:53 -0500 | [diff] [blame] | 45 | import com.android.systemui.statusbar.policy.DataSaverController; |
| 46 | import com.android.systemui.statusbar.policy.DeviceProvisionedController; |
| 47 | import com.android.systemui.statusbar.policy.DeviceProvisionedControllerImpl; |
| 48 | import com.android.systemui.statusbar.policy.FlashlightController; |
| 49 | import com.android.systemui.statusbar.policy.FlashlightControllerImpl; |
| 50 | import com.android.systemui.statusbar.policy.HotspotController; |
| 51 | import com.android.systemui.statusbar.policy.HotspotControllerImpl; |
| 52 | import com.android.systemui.statusbar.policy.KeyguardMonitor; |
| 53 | import com.android.systemui.statusbar.policy.KeyguardMonitorImpl; |
| 54 | import com.android.systemui.statusbar.policy.LocationController; |
| 55 | import com.android.systemui.statusbar.policy.LocationControllerImpl; |
| 56 | import com.android.systemui.statusbar.policy.NetworkController; |
| 57 | import com.android.systemui.statusbar.policy.NetworkControllerImpl; |
| 58 | import com.android.systemui.statusbar.policy.NextAlarmController; |
| 59 | import com.android.systemui.statusbar.policy.NextAlarmControllerImpl; |
| 60 | import com.android.systemui.statusbar.policy.RotationLockController; |
| 61 | import com.android.systemui.statusbar.policy.RotationLockControllerImpl; |
| 62 | import com.android.systemui.statusbar.policy.SecurityController; |
| 63 | import com.android.systemui.statusbar.policy.SecurityControllerImpl; |
| 64 | import com.android.systemui.statusbar.policy.UserInfoController; |
| 65 | import com.android.systemui.statusbar.policy.UserInfoControllerImpl; |
| 66 | import com.android.systemui.statusbar.policy.UserSwitcherController; |
| 67 | import com.android.systemui.statusbar.policy.ZenModeController; |
| 68 | import com.android.systemui.statusbar.policy.ZenModeControllerImpl; |
Jason Monk | de850bb | 2017-02-01 19:26:30 -0500 | [diff] [blame] | 69 | import com.android.systemui.tuner.TunerService; |
Adrian Roos | e1e0b48 | 2017-02-02 16:00:59 -0800 | [diff] [blame] | 70 | import com.android.systemui.util.leak.LeakDetector; |
Jason Monk | 9c7844c | 2017-01-18 15:21:53 -0500 | [diff] [blame] | 71 | |
| 72 | import java.io.FileDescriptor; |
| 73 | import java.io.PrintWriter; |
Jason Monk | de850bb | 2017-02-01 19:26:30 -0500 | [diff] [blame] | 74 | import java.util.HashMap; |
Jason Monk | 9c7844c | 2017-01-18 15:21:53 -0500 | [diff] [blame] | 75 | |
| 76 | /** |
| 77 | * Class to handle ugly dependencies throughout sysui until we determine the |
| 78 | * long-term dependency injection solution. |
| 79 | * |
| 80 | * Classes added here should be things that are expected to live the lifetime of sysui, |
| 81 | * and are generally applicable to many parts of sysui. They will be lazily |
| 82 | * initialized to ensure they aren't created on form factors that don't need them |
| 83 | * (e.g. HotspotController on TV). Despite being lazily initialized, it is expected |
| 84 | * that all dependencies will be gotten during sysui startup, and not during runtime |
| 85 | * to avoid jank. |
| 86 | * |
| 87 | * All classes used here are expected to manage their own lifecycle, meaning if |
| 88 | * they have no clients they should not have any registered resources like bound |
| 89 | * services, registered receivers, etc. |
| 90 | */ |
| 91 | public class Dependency extends SystemUI { |
| 92 | |
| 93 | /** |
| 94 | * Key for getting a background Looper for background work. |
| 95 | */ |
Adrian Roos | 09c43c8 | 2017-02-09 19:58:25 +0100 | [diff] [blame^] | 96 | public static final DependencyKey<Looper> BG_LOOPER = new DependencyKey<>("background_looper"); |
Jason Monk | 9c7844c | 2017-01-18 15:21:53 -0500 | [diff] [blame] | 97 | /** |
| 98 | * Key for getting a Handler for receiving time tick broadcasts on. |
| 99 | */ |
Adrian Roos | 09c43c8 | 2017-02-09 19:58:25 +0100 | [diff] [blame^] | 100 | public static final DependencyKey<Handler> TIME_TICK_HANDLER = |
| 101 | new DependencyKey<>("time_tick_handler"); |
Jason Monk | 9c7844c | 2017-01-18 15:21:53 -0500 | [diff] [blame] | 102 | /** |
| 103 | * Generic handler on the main thread. |
| 104 | */ |
Adrian Roos | 09c43c8 | 2017-02-09 19:58:25 +0100 | [diff] [blame^] | 105 | public static final DependencyKey<Handler> MAIN_HANDLER = new DependencyKey<>("main_handler"); |
Jason Monk | 9c7844c | 2017-01-18 15:21:53 -0500 | [diff] [blame] | 106 | |
Adrian Roos | 09c43c8 | 2017-02-09 19:58:25 +0100 | [diff] [blame^] | 107 | private final ArrayMap<Object, Object> mDependencies = new ArrayMap<>(); |
| 108 | private final ArrayMap<Object, DependencyProvider> mProviders = new ArrayMap<>(); |
Jason Monk | 9c7844c | 2017-01-18 15:21:53 -0500 | [diff] [blame] | 109 | |
| 110 | @Override |
| 111 | public void start() { |
| 112 | sDependency = this; |
| 113 | // TODO: Think about ways to push these creation rules out of Dependency to cut down |
| 114 | // on imports. |
| 115 | mProviders.put(TIME_TICK_HANDLER, () -> { |
| 116 | HandlerThread thread = new HandlerThread("TimeTick"); |
| 117 | thread.start(); |
| 118 | return new Handler(thread.getLooper()); |
| 119 | }); |
| 120 | mProviders.put(BG_LOOPER, () -> { |
| 121 | HandlerThread thread = new HandlerThread("SysUiBg", |
| 122 | Process.THREAD_PRIORITY_BACKGROUND); |
| 123 | thread.start(); |
| 124 | return thread.getLooper(); |
| 125 | }); |
| 126 | mProviders.put(MAIN_HANDLER, () -> new Handler(Looper.getMainLooper())); |
Adrian Roos | 09c43c8 | 2017-02-09 19:58:25 +0100 | [diff] [blame^] | 127 | mProviders.put(ActivityStarter.class, () -> new ActivityStarterDelegate()); |
| 128 | mProviders.put(ActivityStarterDelegate.class, () -> |
Jason Monk | 9c7844c | 2017-01-18 15:21:53 -0500 | [diff] [blame] | 129 | getDependency(ActivityStarter.class)); |
| 130 | |
Adrian Roos | 09c43c8 | 2017-02-09 19:58:25 +0100 | [diff] [blame^] | 131 | mProviders.put(BluetoothController.class, () -> |
Jason Monk | 9c7844c | 2017-01-18 15:21:53 -0500 | [diff] [blame] | 132 | new BluetoothControllerImpl(mContext, getDependency(BG_LOOPER))); |
| 133 | |
Adrian Roos | 09c43c8 | 2017-02-09 19:58:25 +0100 | [diff] [blame^] | 134 | mProviders.put(LocationController.class, () -> |
Jason Monk | 9c7844c | 2017-01-18 15:21:53 -0500 | [diff] [blame] | 135 | new LocationControllerImpl(mContext, getDependency(BG_LOOPER))); |
| 136 | |
Adrian Roos | 09c43c8 | 2017-02-09 19:58:25 +0100 | [diff] [blame^] | 137 | mProviders.put(RotationLockController.class, () -> |
Jason Monk | 9c7844c | 2017-01-18 15:21:53 -0500 | [diff] [blame] | 138 | new RotationLockControllerImpl(mContext)); |
| 139 | |
Adrian Roos | 09c43c8 | 2017-02-09 19:58:25 +0100 | [diff] [blame^] | 140 | mProviders.put(NetworkController.class, () -> |
Jason Monk | 9c7844c | 2017-01-18 15:21:53 -0500 | [diff] [blame] | 141 | new NetworkControllerImpl(mContext, getDependency(BG_LOOPER), |
| 142 | getDependency(DeviceProvisionedController.class))); |
| 143 | |
Adrian Roos | 09c43c8 | 2017-02-09 19:58:25 +0100 | [diff] [blame^] | 144 | mProviders.put(ZenModeController.class, () -> |
Jason Monk | 9c7844c | 2017-01-18 15:21:53 -0500 | [diff] [blame] | 145 | new ZenModeControllerImpl(mContext, getDependency(MAIN_HANDLER))); |
| 146 | |
Adrian Roos | 09c43c8 | 2017-02-09 19:58:25 +0100 | [diff] [blame^] | 147 | mProviders.put(HotspotController.class, () -> |
Jason Monk | 9c7844c | 2017-01-18 15:21:53 -0500 | [diff] [blame] | 148 | new HotspotControllerImpl(mContext)); |
| 149 | |
Adrian Roos | 09c43c8 | 2017-02-09 19:58:25 +0100 | [diff] [blame^] | 150 | mProviders.put(CastController.class, () -> |
Jason Monk | 9c7844c | 2017-01-18 15:21:53 -0500 | [diff] [blame] | 151 | new CastControllerImpl(mContext)); |
| 152 | |
Adrian Roos | 09c43c8 | 2017-02-09 19:58:25 +0100 | [diff] [blame^] | 153 | mProviders.put(FlashlightController.class, () -> |
Jason Monk | 9c7844c | 2017-01-18 15:21:53 -0500 | [diff] [blame] | 154 | new FlashlightControllerImpl(mContext)); |
| 155 | |
Adrian Roos | 09c43c8 | 2017-02-09 19:58:25 +0100 | [diff] [blame^] | 156 | mProviders.put(KeyguardMonitor.class, () -> |
Jason Monk | 9c7844c | 2017-01-18 15:21:53 -0500 | [diff] [blame] | 157 | new KeyguardMonitorImpl(mContext)); |
| 158 | |
Adrian Roos | 09c43c8 | 2017-02-09 19:58:25 +0100 | [diff] [blame^] | 159 | mProviders.put(UserSwitcherController.class, () -> |
Jason Monk | 9c7844c | 2017-01-18 15:21:53 -0500 | [diff] [blame] | 160 | new UserSwitcherController(mContext, getDependency(KeyguardMonitor.class), |
| 161 | getDependency(MAIN_HANDLER), getDependency(ActivityStarter.class))); |
| 162 | |
Adrian Roos | 09c43c8 | 2017-02-09 19:58:25 +0100 | [diff] [blame^] | 163 | mProviders.put(UserInfoController.class, () -> |
Jason Monk | 9c7844c | 2017-01-18 15:21:53 -0500 | [diff] [blame] | 164 | new UserInfoControllerImpl(mContext)); |
| 165 | |
Adrian Roos | 09c43c8 | 2017-02-09 19:58:25 +0100 | [diff] [blame^] | 166 | mProviders.put(BatteryController.class, () -> |
Jason Monk | 9c7844c | 2017-01-18 15:21:53 -0500 | [diff] [blame] | 167 | new BatteryControllerImpl(mContext)); |
| 168 | |
Adrian Roos | 09c43c8 | 2017-02-09 19:58:25 +0100 | [diff] [blame^] | 169 | mProviders.put(ManagedProfileController.class, () -> |
Jason Monk | 9c7844c | 2017-01-18 15:21:53 -0500 | [diff] [blame] | 170 | new ManagedProfileControllerImpl(mContext)); |
| 171 | |
Adrian Roos | 09c43c8 | 2017-02-09 19:58:25 +0100 | [diff] [blame^] | 172 | mProviders.put(NextAlarmController.class, () -> |
Jason Monk | 9c7844c | 2017-01-18 15:21:53 -0500 | [diff] [blame] | 173 | new NextAlarmControllerImpl(mContext)); |
| 174 | |
Adrian Roos | 09c43c8 | 2017-02-09 19:58:25 +0100 | [diff] [blame^] | 175 | mProviders.put(DataSaverController.class, () -> |
Jason Monk | 9c7844c | 2017-01-18 15:21:53 -0500 | [diff] [blame] | 176 | get(NetworkController.class).getDataSaverController()); |
| 177 | |
Adrian Roos | 09c43c8 | 2017-02-09 19:58:25 +0100 | [diff] [blame^] | 178 | mProviders.put(AccessibilityController.class, () -> |
Jason Monk | 9c7844c | 2017-01-18 15:21:53 -0500 | [diff] [blame] | 179 | new AccessibilityController(mContext)); |
| 180 | |
Adrian Roos | 09c43c8 | 2017-02-09 19:58:25 +0100 | [diff] [blame^] | 181 | mProviders.put(DeviceProvisionedController.class, () -> |
Jason Monk | 9c7844c | 2017-01-18 15:21:53 -0500 | [diff] [blame] | 182 | new DeviceProvisionedControllerImpl(mContext)); |
| 183 | |
Adrian Roos | 09c43c8 | 2017-02-09 19:58:25 +0100 | [diff] [blame^] | 184 | mProviders.put(PluginManager.class, () -> |
Jason Monk | de850bb | 2017-02-01 19:26:30 -0500 | [diff] [blame] | 185 | new PluginManager(mContext)); |
| 186 | |
Adrian Roos | 09c43c8 | 2017-02-09 19:58:25 +0100 | [diff] [blame^] | 187 | mProviders.put(AssistManager.class, () -> |
Jason Monk | 9c7844c | 2017-01-18 15:21:53 -0500 | [diff] [blame] | 188 | new AssistManager(getDependency(DeviceProvisionedController.class), mContext)); |
| 189 | |
Adrian Roos | 09c43c8 | 2017-02-09 19:58:25 +0100 | [diff] [blame^] | 190 | mProviders.put(SecurityController.class, () -> |
Jason Monk | 9c7844c | 2017-01-18 15:21:53 -0500 | [diff] [blame] | 191 | new SecurityControllerImpl(mContext)); |
| 192 | |
Adrian Roos | 09c43c8 | 2017-02-09 19:58:25 +0100 | [diff] [blame^] | 193 | mProviders.put(LeakDetector.class, LeakDetector::create); |
Adrian Roos | e1e0b48 | 2017-02-02 16:00:59 -0800 | [diff] [blame] | 194 | |
Adrian Roos | 09c43c8 | 2017-02-09 19:58:25 +0100 | [diff] [blame^] | 195 | mProviders.put(TunerService.class, () -> |
Jason Monk | de850bb | 2017-02-01 19:26:30 -0500 | [diff] [blame] | 196 | new TunerService(mContext)); |
| 197 | |
Adrian Roos | 09c43c8 | 2017-02-09 19:58:25 +0100 | [diff] [blame^] | 198 | mProviders.put(StatusBarWindowManager.class, () -> |
Jason Monk | 421a941 | 2017-02-06 09:15:21 -0800 | [diff] [blame] | 199 | new StatusBarWindowManager(mContext)); |
| 200 | |
Adrian Roos | 09c43c8 | 2017-02-09 19:58:25 +0100 | [diff] [blame^] | 201 | mProviders.put(DarkIconDispatcher.class, () -> |
Jason Monk | aa573e9 | 2017-01-27 17:00:29 -0500 | [diff] [blame] | 202 | new DarkIconDispatcherImpl(mContext)); |
| 203 | |
Adrian Roos | 09c43c8 | 2017-02-09 19:58:25 +0100 | [diff] [blame^] | 204 | mProviders.put(ConfigurationController.class, () -> |
Jason Monk | aa573e9 | 2017-01-27 17:00:29 -0500 | [diff] [blame] | 205 | new ConfigurationControllerImpl(mContext)); |
| 206 | |
Adrian Roos | 09c43c8 | 2017-02-09 19:58:25 +0100 | [diff] [blame^] | 207 | mProviders.put(StatusBarIconController.class, () -> |
Jason Monk | aa573e9 | 2017-01-27 17:00:29 -0500 | [diff] [blame] | 208 | new StatusBarIconControllerImpl(mContext)); |
| 209 | |
Jason Monk | 9c7844c | 2017-01-18 15:21:53 -0500 | [diff] [blame] | 210 | // Put all dependencies above here so the factory can override them if it wants. |
| 211 | SystemUIFactory.getInstance().injectDependencies(mProviders, mContext); |
| 212 | } |
| 213 | |
| 214 | @Override |
| 215 | public void dump(FileDescriptor fd, PrintWriter pw, String[] args) { |
| 216 | super.dump(fd, pw, args); |
| 217 | pw.println("Dumping existing controllers:"); |
| 218 | mDependencies.values().stream().filter(obj -> obj instanceof Dumpable) |
| 219 | .forEach(o -> ((Dumpable) o).dump(fd, pw, args)); |
| 220 | } |
| 221 | |
| 222 | @Override |
| 223 | protected void onConfigurationChanged(Configuration newConfig) { |
| 224 | super.onConfigurationChanged(newConfig); |
| 225 | mDependencies.values().stream().filter(obj -> obj instanceof ConfigurationChangedReceiver) |
| 226 | .forEach(o -> ((ConfigurationChangedReceiver) o).onConfigurationChanged(newConfig)); |
| 227 | } |
| 228 | |
| 229 | protected final <T> T getDependency(Class<T> cls) { |
Adrian Roos | 09c43c8 | 2017-02-09 19:58:25 +0100 | [diff] [blame^] | 230 | return getDependencyInner(cls); |
Jason Monk | 9c7844c | 2017-01-18 15:21:53 -0500 | [diff] [blame] | 231 | } |
| 232 | |
Adrian Roos | 09c43c8 | 2017-02-09 19:58:25 +0100 | [diff] [blame^] | 233 | protected final <T> T getDependency(DependencyKey<T> key) { |
| 234 | return getDependencyInner(key); |
| 235 | } |
| 236 | |
| 237 | private <T> T getDependencyInner(Object key) { |
| 238 | @SuppressWarnings("unchecked") |
| 239 | T obj = (T) mDependencies.get(key); |
Jason Monk | 9c7844c | 2017-01-18 15:21:53 -0500 | [diff] [blame] | 240 | if (obj == null) { |
Adrian Roos | 09c43c8 | 2017-02-09 19:58:25 +0100 | [diff] [blame^] | 241 | obj = createDependency(key); |
| 242 | mDependencies.put(key, obj); |
Jason Monk | 9c7844c | 2017-01-18 15:21:53 -0500 | [diff] [blame] | 243 | } |
| 244 | return obj; |
| 245 | } |
| 246 | |
| 247 | @VisibleForTesting |
Adrian Roos | 09c43c8 | 2017-02-09 19:58:25 +0100 | [diff] [blame^] | 248 | protected <T> T createDependency(Object cls) { |
| 249 | Preconditions.checkArgument(cls instanceof DependencyKey<?> || cls instanceof Class<?>); |
| 250 | |
| 251 | @SuppressWarnings("unchecked") |
Jason Monk | 9c7844c | 2017-01-18 15:21:53 -0500 | [diff] [blame] | 252 | DependencyProvider<T> provider = mProviders.get(cls); |
| 253 | if (provider == null) { |
| 254 | throw new IllegalArgumentException("Unsupported dependency " + cls); |
| 255 | } |
| 256 | return provider.createDependency(); |
| 257 | } |
| 258 | |
| 259 | private static Dependency sDependency; |
| 260 | |
| 261 | public interface DependencyProvider<T> { |
| 262 | T createDependency(); |
| 263 | } |
| 264 | |
Jason Monk | de850bb | 2017-02-01 19:26:30 -0500 | [diff] [blame] | 265 | /** |
| 266 | * Used in separate processes (like tuner settings) to init the dependencies. |
| 267 | */ |
| 268 | public static void initDependencies(Context context) { |
| 269 | if (sDependency != null) return; |
| 270 | Dependency d = new Dependency(); |
| 271 | d.mContext = context.getApplicationContext(); |
| 272 | d.mComponents = new HashMap<>(); |
| 273 | d.start(); |
| 274 | } |
| 275 | |
Jason Monk | 9c7844c | 2017-01-18 15:21:53 -0500 | [diff] [blame] | 276 | public static <T> T get(Class<T> cls) { |
Adrian Roos | 09c43c8 | 2017-02-09 19:58:25 +0100 | [diff] [blame^] | 277 | return sDependency.getDependency(cls); |
Jason Monk | 9c7844c | 2017-01-18 15:21:53 -0500 | [diff] [blame] | 278 | } |
| 279 | |
Adrian Roos | 09c43c8 | 2017-02-09 19:58:25 +0100 | [diff] [blame^] | 280 | public static <T> T get(DependencyKey<T> cls) { |
Jason Monk | 9c7844c | 2017-01-18 15:21:53 -0500 | [diff] [blame] | 281 | return sDependency.getDependency(cls); |
| 282 | } |
Adrian Roos | 09c43c8 | 2017-02-09 19:58:25 +0100 | [diff] [blame^] | 283 | |
| 284 | public static final class DependencyKey<V> { |
| 285 | private final String mDisplayName; |
| 286 | |
| 287 | public DependencyKey(String displayName) { |
| 288 | mDisplayName = displayName; |
| 289 | } |
| 290 | |
| 291 | @Override |
| 292 | public String toString() { |
| 293 | return mDisplayName; |
| 294 | } |
| 295 | } |
Jason Monk | 9c7844c | 2017-01-18 15:21:53 -0500 | [diff] [blame] | 296 | } |