Skip to content

Commit 288011a

Browse files
SKULSHADYGenkzsz11
authored andcommitted
SystemUI: FPS Info improvements
Signed-off-by: Anushek Prasal <anushekprasal@gmail.com>
1 parent b781737 commit 288011a

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

packages/SystemUI/src/com/android/systemui/qs/tiles/FPSInfoTile.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*
22
* Copyright (C) 2017-2020 crDroidAndroid Project
3+
* Copyright (C) 2020 Havoc-OS
34
*
45
* Licensed under the Apache License, Version 2.0 (the "License");
56
* you may not use this file except in compliance with the License.
@@ -20,6 +21,7 @@
2021
import android.provider.Settings;
2122
import android.provider.Settings.System;
2223
import android.service.quicksettings.Tile;
24+
import android.text.TextUtils;
2325

2426
import com.android.systemui.plugins.qs.QSTile.BooleanState;
2527
import com.android.systemui.qs.SystemSetting;
@@ -106,6 +108,14 @@ protected String composeChangeAnnouncement() {
106108
return mContext.getString(R.string.quick_settings_fpsinfo_label);
107109
}
108110

111+
@Override
112+
public boolean isAvailable() {
113+
final String fpsInfoSysNode = mContext.getResources().getString(
114+
R.string.config_fpsInfoSysNode);
115+
boolean fpsInfoSupported = !TextUtils.isEmpty(fpsInfoSysNode);
116+
return fpsInfoSupported;
117+
}
118+
109119
@Override
110120
public int getMetricsCategory() {
111121
return MetricsEvent.NUSANTARA_TILE;

0 commit comments

Comments
 (0)