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

Commit 46655948 authored by Bharat Singh's avatar Bharat Singh
Browse files

[SysUI][Floaty] Add new layout for root view

* Adds new root layout to be inflated for new window
* Adds ComposeInitializer to help with compose initialization

Bug: 399263897
Flag: com.android.systemui.shared.enable_lpp_squeeze_effect
Change-Id: Iee8322be6457b861cae8b155130b39bddb546eee
parent 4ff5ee1c
Loading
Loading
Loading
Loading
+50 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2025 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.effects.ui.compose

import android.content.Context
import android.util.AttributeSet
import androidx.compose.runtime.Composable
import androidx.compose.ui.platform.AbstractComposeView
import com.android.systemui.compose.ComposeInitializer

class EffectsWindowRoot : AbstractComposeView {
    constructor(context: Context) : super(context)

    constructor(context: Context, attrs: AttributeSet) : super(context, attrs)

    constructor(
        context: Context,
        attrs: AttributeSet,
        defStyleAttr: Int,
    ) : super(context, attrs, defStyleAttr)

    override fun onAttachedToWindow() {
        ComposeInitializer.onAttachedToWindow(this)
        super.onAttachedToWindow()
    }

    override fun onDetachedFromWindow() {
        super.onDetachedFromWindow()
        ComposeInitializer.onDetachedFromWindow(this)
    }

    @Composable
    override fun Content() {

    }
}
 No newline at end of file