[EVO 4G Themes and Apps] JsChiSurf:
Update 3/14/2011: This mod was originally an exact port of the original referenced below, however, I've taken it a step further (and modified this post accordingly), to reflect the fact that in addition to the ability to remove am/pm from the 12-hour clock, you are now also presented with the option, via the 'Settings'/'Date & Time' menu, to remove the clock all together as well.

Okay guys, I originally "partially" ported this functionality by simply forcing the removal of the AM/PM indicators from the status bar clock all together.

However, I received a few PMs regarding the potential of doing the same as was done by s0niqu3 in his original mod, and since I had some free time this weekend, I decided to take a look. I have to be honest, I hate porting someone else's work, as I find it easier to just do it from scratch, rather than figuring out what someone else did, but the original mod did give me a good jump off point to implement this for our Sense based ROMs. Credit to s0niqu3 for the original mod.

The mod requires modifications to BOTH your Setting.apk file, as well as the services.jar framework file. So, I used as a starting point the services.jar file I've supplied in my Power Control Widgets thread, v2.1.1 (the most up to date version).

If you are running a 3.70 based ROM that does not use the power control widgets, or if your services.jar file has been further modified, you will have to manually modify your own services.jar file, and incorporate the changes I've made to the services.jar to support this feature, and as such, at the end of this post, I have included the single method that you should replace. As such, this post contains links to 2 different flashable zips. The first zip is the complete mod, which includes BOTH Settings.apk and services.jar. The second zip contains the Settings.apk file only, should you wish/need to modify your own services.jar file directly.

To access this feature / option, after flashing the supplied zip, click Menu, Settings, then Date & Time, and you will see the following:

Stock clock settings (default, no change):

Remove am/pm toggled:

Remove clock completely:

As you can see in the above screen shots, a new screen preferences have been added to the Date & Time menu. The first, labeled 'Show clock', is defaulted to 'on', and when un-checked, will disable the display of your clock in the status bar. The second, labeled "Do not display AM/PM", will cause the default AM/PM indicator to be removed while utilizing the 12-hour format time, when you have the clock set to visible. Unchecking this option will cause the AM/PM to return. Also, I added dependencies to the checkbox options, so that when/if the clock is disabled from display all together, the dependent options become unavailable as well.

Download Complete Mod for Clock Display Options <---Flash via recovery

Download Settings.apk Mod ONLY for supporting Clock Display Options <---Flash via recovery

Note: The complete mod replaces a framework file, and as such, your initial boot after flashing will take a while, as your Dalvik cache gets rebuilt. This mod REQUIRES your ROM to be deodexed (not stock rooted w/o flashing a custom ROM). Also, if you have made any other custom edits to your services.jar file, this will revert to stock. If you do NOT want to lose, consider modifying your own services.jar per the instructions below.

To manually modify your services.jar file to support the above referenced features, decompile your services.jar file and open /com/android/server/status/StatusBarPolicy.smali, and wholesale replace the updateClock() method in your existing file with the following tweaked version I've provided:

.method private final updateClock()V
.locals 7

.prologue
.line 940
iget-object v0, p0, Lcom/android/server/status/StatusBarPolicy;->mCalendar:Ljava/util/Calendar;

invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

move-result-wide v1

invoke-virtual {v0, v1, v2}, Ljava/util/Calendar;->setTimeInMillis(J)V

.line 941
iget-object v0, p0, Lcom/android/server/status/StatusBarPolicy;->mClockData:Lcom/android/server/status/IconData;

iget-object v1, p0, Lcom/android/server/status/StatusBarPolicy;->mContext:Landroid/content/Context;

invoke-static {v1}, Landroid/text/format/DateFormat;->getTimeFormat(Landroid/content/Context;)Ljava/text/DateFormat;

move-result-object v1

iget-object v2, p0, Lcom/android/server/status/StatusBarPolicy;->mCalendar:Ljava/util/Calendar;

invoke-virtual {v2}, Ljava/util/Calendar;->getTime()Ljava/util/Date;

move-result-object v2

invoke-virtual {v1, v2}, Ljava/text/DateFormat;->format(Ljava/util/Date;)Ljava/lang/String;

move-result-object v1

iget-object v4, p0, Lcom/android/server/status/StatusBarPolicy;->mContext:Landroid/content/Context;

invoke-virtual {v4}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

move-result-object v4

const-string v2, "am_pm"

const/4 v3, 0x0

invoke-static {v4, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

move-result v4

if-eqz v4, :cond_1

const-string v5, " PM"

const-string v6, ""

invoke-virtual {v1, v5, v6}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;

move-result-object v1

const-string v5, " AM"

const-string v6, ""

invoke-virtual {v1, v5, v6}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;

move-result-object v1

:goto_0
iget-object v4, p0, Lcom/android/server/status/StatusBarPolicy;->mContext:Landroid/content/Context;

invoke-virtual {v4}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

move-result-object v4

const-string v2, "time_display"

const/4 v3, 0x1

invoke-static {v4, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

move-result v4

if-nez v4, :cond_0

const-string v1, ""

:cond_0
iput-object v1, v0, Lcom/android/server/status/IconData;->text:Ljava/lang/CharSequence;

.line 942
iget-object v0, p0, Lcom/android/server/status/StatusBarPolicy;->mService:Lcom/android/server/status/StatusBarService;

iget-object v1, p0, Lcom/android/server/status/StatusBarPolicy;->mClockIcon:Landroid/os/IBinder;

iget-object v2, p0, Lcom/android/server/status/StatusBarPolicy;->mClockData:Lcom/android/server/status/IconData;

const/4 v3, 0x0

invoke-virtual {v0, v1, v2, v3}, Lcom/android/server/status/StatusBarService;->updateIcon(Landroid/os/IBinder;Lcom/android/server/status/IconData;Lcom/android/server/status/NotificationData;)V

.line 943
return-void

:cond_1
iget-object v0, p0, Lcom/android/server/status/StatusBarPolicy;->mClockData:Lcom/android/server/status/IconData;

invoke-direct {p0}, Lcom/android/server/status/StatusBarPolicy;->getSmallTime()Ljava/lang/CharSequence;

move-result-object v1

goto :goto_0
.end method

Once manually completing the mod above, you can then use the supplied Setting.apk file in conjunction with your manually edited services.jar file to toggle am/pm on off, or the display of the clock all together.