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

Commit f3a8c97c authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Update fgs manager message and remove dot" into tm-dev am: bba9932a am: ded67684

parents 37e9b152 ded67684
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -543,6 +543,11 @@ public final class SystemUiDeviceConfigFlags {
     */
    public static final String TASK_MANAGER_ENABLED = "task_manager_enabled";

    /**
     * (boolean) Whether the task manager should show an attention grabbing dot when tasks changed.
     */
    public static final String TASK_MANAGER_SHOW_FOOTER_DOT = "task_manager_show_footer_dot";


    /**
     * (boolean) Whether the clipboard overlay is enabled.
+1 −1
Original line number Diff line number Diff line
@@ -2505,7 +2505,7 @@
    <!-- Title for dialog listing applications currently running [CHAR LIMIT=NONE]-->
    <string name="fgs_manager_dialog_title">Active apps</string>
    <!-- Detailed message for dialog listing applications currently running [CHAR LIMIT=NONE]-->
    <string name="fgs_manager_dialog_message">Even if you\u2019re not using these apps, they\u2019re still active and might affect battery life</string>
    <string name="fgs_manager_dialog_message">These apps are active and running, even when you\u2019re not using them. This improves their functionality, but it may also affect battery life.</string>
    <!-- Label of the button to stop an app from running [CHAR LIMIT=12]-->
    <string name="fgs_manager_app_item_stop_button_label">Stop</string>
    <!-- Label of the button to stop an app from running but the app is already stopped and the button is disabled [CHAR LIMIT=12]-->
+11 −2
Original line number Diff line number Diff line
@@ -44,6 +44,7 @@ import androidx.recyclerview.widget.DiffUtil
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.android.internal.config.sysui.SystemUiDeviceConfigFlags.TASK_MANAGER_ENABLED
import com.android.internal.config.sysui.SystemUiDeviceConfigFlags.TASK_MANAGER_SHOW_FOOTER_DOT
import com.android.systemui.Dumpable
import com.android.systemui.R
import com.android.systemui.animation.DialogLaunchAnimator
@@ -81,6 +82,8 @@ class FgsManagerController @Inject constructor(

    companion object {
        private val LOG_TAG = FgsManagerController::class.java.simpleName
        private const val DEFAULT_TASK_MANAGER_ENABLED = true
        private const val DEFAULT_TASK_MANAGER_SHOW_FOOTER_DOT = false
    }

    var changesSinceDialog = false
@@ -88,6 +91,8 @@ class FgsManagerController @Inject constructor(

    var isAvailable = false
        private set
    var showFooterDot = false
        private set

    private val lock = Any()

@@ -151,10 +156,14 @@ class FgsManagerController @Inject constructor(
            deviceConfigProxy.addOnPropertiesChangedListener(NAMESPACE_SYSTEMUI,
                    backgroundExecutor) {
                isAvailable = it.getBoolean(TASK_MANAGER_ENABLED, isAvailable)
                showFooterDot =
                        it.getBoolean(TASK_MANAGER_SHOW_FOOTER_DOT, showFooterDot)
            }

            isAvailable = deviceConfigProxy
                    .getBoolean(NAMESPACE_SYSTEMUI, TASK_MANAGER_ENABLED, true)
            isAvailable = deviceConfigProxy.getBoolean(NAMESPACE_SYSTEMUI,
                    TASK_MANAGER_ENABLED, DEFAULT_TASK_MANAGER_ENABLED)
            showFooterDot = deviceConfigProxy.getBoolean(NAMESPACE_SYSTEMUI,
                    TASK_MANAGER_SHOW_FOOTER_DOT, DEFAULT_TASK_MANAGER_SHOW_FOOTER_DOT)

            dumpManager.registerDumpable(this)

+2 −2
Original line number Diff line number Diff line
@@ -149,8 +149,8 @@ public class QSFgsManagerFooter implements View.OnClickListener,
            if (mFgsManagerController.shouldUpdateFooterVisibility()) {
                mRootView.setVisibility(mNumPackages > 0
                        && mFgsManagerController.isAvailable() ? View.VISIBLE : View.GONE);
                int dotVis =
                        mFgsManagerController.getChangesSinceDialog() ? View.VISIBLE : View.GONE;
                int dotVis = mFgsManagerController.getShowFooterDot()
                        && mFgsManagerController.getChangesSinceDialog() ? View.VISIBLE : View.GONE;
                mDotView.setVisibility(dotVis);
                mCollapsedDotView.setVisibility(dotVis);
                if (mVisibilityChangedListener != null) {