Skip to content

Commit e6916df

Browse files
Merge pull request #154 from appdevforall/feat/ADFA-4593-help-debug-placeholder
ADFA-4593: debug-only placeholder tooltip for wired-but-empty controls
2 parents 195fbc5 + 4af4ecb commit e6916df

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

‎controller/app/src/main/java/org/iiab/controller/help/TooltipManager.java‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,13 @@ public void run() {
9797
public void run() {
9898
if (item == null) {
9999
Log.w(TAG, "No tooltip for category='" + category + "', tag='" + tag + "'");
100+
if (isDebuggable(context)) {
101+
// Debug-only: show a placeholder so the wiring is verifiable
102+
// even before content exists. Release builds stay silent.
103+
TooltipItem placeholder = new TooltipItem(category, tag,
104+
"<i>(no help yet \u2014 " + tag + ")</i>", "", new ArrayList<HelpLink>());
105+
showPopup(context, anchor, 0, placeholder, linkHandler);
106+
}
100107
return;
101108
}
102109
showPopup(context, anchor, 0, item, linkHandler);
@@ -269,6 +276,14 @@ public void onClick(View v) {
269276
}
270277
}
271278

279+
private static boolean isDebuggable(Context context) {
280+
try {
281+
return (context.getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0;
282+
} catch (Exception e) {
283+
return false;
284+
}
285+
}
286+
272287
public static void dismissActive() {
273288
try {
274289
if (activePopup != null) {

0 commit comments

Comments
 (0)