Implement Indicator and IndicatorManager classes #579
Changes from all commits
b518e51
d647e27
2ae1ab6
8f23351
57ea34f
b5fcfd9
56afe70
3cee452
31a5b71
acf40a8
b113208
4eaad70
4d78528
589f91e
ffbc3f1
25869a4
82d19ef
503bf8d
f959560
3005e6a
1ac1f0b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,16 @@ | ||
package com.nokia.mid.ui.lcdui; | ||
|
||
/* | ||
* This class is undocumented. | ||
* | ||
* We think this class is needed when multiple background MIDlets | ||
* need to append an Indicator to the list of the system indicators. | ||
* We don't really need to do anything in appendIndicator, since | ||
* we're using the Notifications API to implement indicators. When | ||
* a notification is created, it is automatically shown to the user. | ||
* | ||
*/ | ||
|
||
public class IndicatorManager { | ||
private static IndicatorManager instance = null; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't seem to be implementing this; why are we removing the notification? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we don't need to implement this because it doesn't map to how the Notifications API work. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So we don't expect this function to ever be called? Logging won't hurt us in that case and it would alert us if our expectation is broken There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This function (and the Indicator constructor) are called at startup. I guess the IndicatorManager is needed when you have multiple MIDlets running simultaneously in the background, so each one needs an indicator. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm. It seems like in the future we might run into problems if an app creates an Indicator but doesn't intend to append it (or will append it conditionally at some later time). Let's cross that bridge if we ever get to it; we can land this as is and deal with issues in the future if they ever come up. |
||
|
||
|
@@ -12,7 +23,9 @@ public static IndicatorManager getIndicatorManager() { | |
} | ||
|
||
public int appendIndicator(Indicator indicator, boolean paramBoolean) { | ||
System.out.println("IndicatorManager.appendIndicator(L...Indicator;Z)I not implemented"); | ||
if (paramBoolean) { | ||
System.out.println("IndicatorManager.appendIndicator(L...Indicator;Z)I unexpected value"); | ||
} | ||
return 0; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the int supposed to be? Should we log the fact that we just drop it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure, it's always been 0 in my testing. Unfortunately there's no documentation available for this class (and for IndicatorManager).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK in that case let's just go with this until something breaks :)