Loading packages/SystemUI/res/layout/navigation_bar_window.xml 0 → 100644 +26 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ** ** Copyright 2017, 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. */ --> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:systemui="http://schemas.android.com/apk/res-auto" android:id="@+id/navigation_bar_frame" android:layout_height="match_parent" android:layout_width="match_parent"> </FrameLayout> packages/SystemUI/src/com/android/systemui/SysUiServiceProvider.java 0 → 100644 +23 −0 Original line number Diff line number Diff line /* * Copyright (C) 2017 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.systemui; /** * The interface for getting core components of SysUI. Exists for Testability * since tests don't have SystemUIApplication as their ApplicationContext. */ public interface SysUiServiceProvider { <T> T getComponent(Class<T> interfaceType); } packages/SystemUI/src/com/android/systemui/SystemUI.java +1 −1 Original line number Diff line number Diff line Loading @@ -25,7 +25,7 @@ import java.io.FileDescriptor; import java.io.PrintWriter; import java.util.Map; public abstract class SystemUI { public abstract class SystemUI implements SysUiServiceProvider { public Context mContext; public Map<Class<?>, Object> mComponents; Loading packages/SystemUI/src/com/android/systemui/SystemUIApplication.java +5 −1 Original line number Diff line number Diff line Loading @@ -55,7 +55,7 @@ import java.util.Map; /** * Application class for SystemUI. */ public class SystemUIApplication extends Application { public class SystemUIApplication extends Application implements SysUiServiceProvider { private static final String TAG = "SystemUIService"; private static final boolean DEBUG = false; Loading Loading @@ -239,4 +239,8 @@ public class SystemUIApplication extends Application { public SystemUI[] getServices() { return mServices; } public static <T> T getComponent(Context context, Class<T> interfaceType) { return ((SysUiServiceProvider) context.getApplicationContext()).getComponent(interfaceType); } } packages/SystemUI/src/com/android/systemui/fragments/FragmentHostManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -52,7 +52,7 @@ public class FragmentHostManager { private FragmentLifecycleCallbacks mLifecycleCallbacks; FragmentHostManager(Context context, FragmentService manager, View rootView) { mContext = PluginManager.getInstance(context).getAllPluginContext(context); mContext = context; mManager = manager; mRootView = rootView; mConfigChanges.applyNewConfig(context.getResources()); Loading Loading
packages/SystemUI/res/layout/navigation_bar_window.xml 0 → 100644 +26 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ** ** Copyright 2017, 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. */ --> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:systemui="http://schemas.android.com/apk/res-auto" android:id="@+id/navigation_bar_frame" android:layout_height="match_parent" android:layout_width="match_parent"> </FrameLayout>
packages/SystemUI/src/com/android/systemui/SysUiServiceProvider.java 0 → 100644 +23 −0 Original line number Diff line number Diff line /* * Copyright (C) 2017 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.systemui; /** * The interface for getting core components of SysUI. Exists for Testability * since tests don't have SystemUIApplication as their ApplicationContext. */ public interface SysUiServiceProvider { <T> T getComponent(Class<T> interfaceType); }
packages/SystemUI/src/com/android/systemui/SystemUI.java +1 −1 Original line number Diff line number Diff line Loading @@ -25,7 +25,7 @@ import java.io.FileDescriptor; import java.io.PrintWriter; import java.util.Map; public abstract class SystemUI { public abstract class SystemUI implements SysUiServiceProvider { public Context mContext; public Map<Class<?>, Object> mComponents; Loading
packages/SystemUI/src/com/android/systemui/SystemUIApplication.java +5 −1 Original line number Diff line number Diff line Loading @@ -55,7 +55,7 @@ import java.util.Map; /** * Application class for SystemUI. */ public class SystemUIApplication extends Application { public class SystemUIApplication extends Application implements SysUiServiceProvider { private static final String TAG = "SystemUIService"; private static final boolean DEBUG = false; Loading Loading @@ -239,4 +239,8 @@ public class SystemUIApplication extends Application { public SystemUI[] getServices() { return mServices; } public static <T> T getComponent(Context context, Class<T> interfaceType) { return ((SysUiServiceProvider) context.getApplicationContext()).getComponent(interfaceType); } }
packages/SystemUI/src/com/android/systemui/fragments/FragmentHostManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -52,7 +52,7 @@ public class FragmentHostManager { private FragmentLifecycleCallbacks mLifecycleCallbacks; FragmentHostManager(Context context, FragmentService manager, View rootView) { mContext = PluginManager.getInstance(context).getAllPluginContext(context); mContext = context; mManager = manager; mRootView = rootView; mConfigChanges.applyNewConfig(context.getResources()); Loading