Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d5b7c452 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Move navigation bar logic to its own class"

parents d8cb7dcc 49fa016a
Loading
Loading
Loading
Loading
+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>
+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);
}
+1 −1
Original line number Diff line number Diff line
@@ -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;

+5 −1
Original line number Diff line number Diff line
@@ -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;
@@ -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);
    }
}
+1 −1
Original line number Diff line number Diff line
@@ -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