I've been trying to add a custom accent to my Focus S. Most tools available don't yet work (advance config is one) but the interlop unlock by using a provxml does work.
I've tried this
Code:
<wap-provisioningdoc>
<characteristic type="Registry">
<characteristic type="HKLM\ControlPanel\Themes\1\Accents">
<parm name="11" value="4286808708" datatype="integer" />
</characteristic>
<characteristic type="HKLM\ControlPanel\Themes\0\Accents">
<parm name="11" value="4286808708" datatype="integer" />
</characteristic>
<characteristic type="HKLM\ControlPanel\Themes\AccentsDisplayName\ 0409">
<parm name="11" value="Gray" datatype="string" />
</characteristic>
</characteristic>
</wap-provisioningdoc>
and this to eliminate variables
Code:
<wap-provisioningdoc>
<characteristic type="Registry">
<characteristic type="HKLM\ControlPanel\Themes\1\Accents">
<parm name="1" value="-8158588" datatype="integer" />
</characteristic>
<characteristic type="HKLM\ControlPanel\Themes\0\Accents">
<parm name="1" value="-8158588" datatype="integer" />
</characteristic>
<characteristic type="HKLM\ControlPanel\Themes\AccentsDisplayName\ 0409">
<parm name="1" value="Gray" datatype="string" />
</characteristic>
<characteristic type="HKLM\ControlPanel\Themes\1\Accents">
<parm name="2" value="FF838284" datatype="integer" />
</characteristic>
<characteristic type="HKLM\ControlPanel\Themes\0\Accents">
<parm name="2" value="FF838284" datatype="integer" />
</characteristic>
<characteristic type="HKLM\ControlPanel\Themes\AccentsDisplayName\ 0409">
<parm name="2" value="Gray" datatype="string" />
</characteristic>
<characteristic type="HKLM\ControlPanel\Themes\1\Accents">
<parm name="3" value="4286808708" datatype="integer" />
</characteristic>
<characteristic type="HKLM\ControlPanel\Themes\0\Accents">
<parm name="3" value="4286808708" datatype="integer" />
</characteristic>
<characteristic type="HKLM\ControlPanel\Themes\AccentsDisplayName\ 0409">
<parm name="3" value="Gray" datatype="string" />
</characteristic>
<characteristic type="HKLM\ControlPanel\Themes\1\Accents">
<parm name="4" value="0xFF838284" datatype="integer" />
</characteristic>
<characteristic type="HKLM\ControlPanel\Themes\0\Accents">
<parm name="4" value="0xFF838284" datatype="integer" />
</characteristic>
<characteristic type="HKLM\ControlPanel\Themes\AccentsDisplayName\ 0409">
<parm name="4" value="Gray" datatype="string" />
</characteristic>
</characteristic>
</wap-provisioningdoc>
but it doesn't work.
Any help would gratefully be appreciated.
Quick question: did you save the file as Unicode? I think the Samsung tools expect Unicode provxml files. Or maybe it's the other way around, I forget.
GoodDayToDie said:
Quick question: did you save the file as Unicode? I think the Samsung tools expect Unicode provxml files. Or maybe it's the other way around, I forget.
Click to expand...
Click to collapse
I edited other provxml files that I know work. I edited them with notepad and with visual studio, lol I've tried everything.
I tried to do this myself when I had a Focus S with no success.
I wonder how Marvin_S's On-Device ProvXML TOOL gets this to work.
Hopefully he can chime in, hopefully he can get the tool working on the Focus S
ManelScout4Life said:
I wonder how Marvin_S's On-Device ProvXML TOOL gets this to work.
Hopefully he can chime in, hopefully he can get the tool working on the Focus S
Click to expand...
Click to collapse
Im using first gen dlls so a small chance it will work... Are u saying anything trough this app worked on the focus s? If non of the default edits work than dont even bother, ill need to update the app for the samsung s than.
Samsung indeed uses Unicode. Otherwise it wont work. Again there are no focus s dlls in there so idk if it will work, but let me know, otherwise I can add a focus s dll.
Marvin_S said:
Im using first gen dlls so a small chance it will work... Are u saying anything trough this app worked on the focus s? If non of the default edits work than dont even bother, ill need to update the app for the samsung s than.
Samsung indeed uses Unicode. Otherwise it wont work. Again there are no focus s dlls in there so idk if it will work, but let me know, otherwise I can add a focus s dll.
Click to expand...
Click to collapse
No, your tool does not work at all on the S, it opens but none of the functions work.
However, I can add provxml files with the filedeployer xaps.
I'm also unsure what the proper provxml file should look like for changing accents.
ManelScout4Life said:
No, your tool does not work at all on the S, it opens but none of the functions work.
However, I can add provxml files with the filedeployer xaps.
I'm also unsure what the proper provxml file should look like for changing accents.
Click to expand...
Click to collapse
As expected.
Very simple just save it in Unicode, than it should work man.
Also if you want to bind it in an app, I've found some native stuff to work with on the Samsung S
Code:
Nevermind
EDIT:
The api is listed here, there might be a way to update the app
EDIT2:
Code:
public void Initialize()
{
ComBridge.RegisterComDll("WirelessManager_SecProxyClient.dll", new Guid("6992E452-12CB-4cb7-A9C8-5CC548159A69"));
this.m_CoClass = new COSecWin32Proxy();
this.m_CoInterface = (ISecProxyWin32Interface) this.m_CoClass;
}
[ComImport, Guid("6992E452-12CB-4cb7-A9C8-5CC548159A69"), ClassInterface(ClassInterfaceType.None)]
public class COSecWin32Proxy
{
}
[ComImport, Guid("2A9C50C0-77AC-4a12-9E26-17395ADF8870"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface ISecProxyWin32Interface
{
void GetProxyVersion(out uint version);
void Reserved();
void ChekcAPI(uint apiID, out uint result);
void RegistrySetString(uint HKEY, string pwszPath, string valueName, string value);
void RegistryGetString(uint HKEY, string pwszPath, string valueName, out string value);
void RegistrySetDWORD(uint HKEY, string pwszPath, string valueName, uint value);
void RegistryGetDWORD(uint HKEY, string pwszPath, string valueName, out uint value);
void CreateFile(string lpFileName, uint dwDesiredAccess, uint dwShareMode, uint dwCreationDisposition, uint dwFlagsAndAttributes, out uint phCreateFile);
void CloseHandle(uint hObject);
void ReadFile(uint hFile, out byte[] lpBuffer, uint nNumberOfBytesToRead, out uint lpNumberOfBytesRead);
void WriteFile(uint hFile, byte[] lpBuffer, uint nNumberOfBytesToWrite, out uint lpNumberOfBytesWritten);
void GetFileSize(uint hFile, out uint lpFileSizeHigh);
void CopyFile(string lpExistingFileName, string lpNewFileName, int bFailIfExists);
void DeleteFile(string lpFileName);
void LaunchExe(string szExe, string szArg);
}
Should be the code Ill need to add to the app (not sure if it will work though, ill have to scan the app further).
Marvin_S said:
As expected.
Very simple just save it in Unicode, than it should work man.
Also if you want to bind it in an app, I've found some native stuff to work with on the Samsung S
Code:
namespace Samsung.Phone.Native
{
public class Con
{
// Fields
private COSecCONProxy m_CoClass;
private ISecProxyCONInterface m_CoInterface;
private static Con m_single;
// Methods
static Con();
private Con();
public static void BluetoothCloseAudio();
public static void BluetoothOpenAudio();
public static ISecProxyCONInterface CallInterface();
public ISecProxyCONInterface GetComInterface();
public static Con GetInstance();
public static void GetRadioState(int device, out bool state);
public static void GetWirelessState(out bool state);
public void Initialize();
public static void SetRadioState(int device, bool state);
public static void SetWirelessState(bool state);
public static void WlanGetIpInfo(out string IpAddr, out string Subnet, out string Gateway, out string Dns, out string Wins, out bool DhcpMode);
public static void WlanGetStatus(out string macAddr, out string ssid, out int status, out int rssi, out int security);
public static void WlanSetIpInfo(string IpAddr, string Subnet, string Gateway, string Dns, string Wins, bool DhcpMode);
}
[ComImport, ClassInterface(ClassInterfaceType.None), Guid("3E16DD96-1BB8-4ed4-A74F-EE16307A147E")]
public class COSecCONProxy
{
}
[ComImport, ClassInterface(ClassInterfaceType.None), Guid("89DE267C-9F5A-43f5-895C-B891F0F64C6E")]
public class COSecRILProxy
{
}
[ComImport, Guid("A1EF1A51-6156-4882-A9D3-202881BC7A05"), ClassInterface(ClassInterfaceType.None)]
public class COSecSYSProxy
{
}
[ComImport, Guid("6992E452-12CB-4cb7-A9C8-5CC548159A69"), ClassInterface(ClassInterfaceType.None)]
public class COSecWin32Proxy
{
}
[ComImport, Guid("9ADD1CCA-FB7B-4f31-A496-9FC565DB0272"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface ISecProxyCONInterface
{
void GetProxyVersion(out uint version);
void Reserved();
void ChekcAPI(uint apiID, out uint result);
void WlanGetIpInfo(out string IpAddr, out string Subnet, out string Gateway, out string Dns, out string Wins, out bool DhcpMode);
void WlanSetIpInfo(string IpAddr, string Subnet, string Gateway, string Dns, string Wins, bool DhcpMode);
void WlanGetStatus(out string macAddr, out string ssid, out int status, out int rssi, out int security);
void SetRadioState(int device, bool state);
void GetRadioState(int device, out bool state);
void SetWirelessState(bool state);
void GetWirelessState(out bool state);
void BluetoothOpenAudio();
void BluetoothCloseAudio();
}
[ComImport, InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("CA785B58-3211-46ee-B2B8-13F0CFA18C17")]
public interface ISecProxyRILInterface
{
void GetProxyVersion(out uint version);
void Reserved();
void ChekcAPI(uint apiID, out uint result);
void GetIMSI(out string IMSI);
void GetIMEI(out string IMEI);
void GetLockingStatus(uint m_dwLockFacility, out uint pdwLockStatus, out uint pdwResult);
void GetCallWaitingStatus(out uint pdwInfoClass, out uint pdwResult);
void SetCallWaitingStatus(uint dwInfoClass, uint dwStatus, out uint pdwResult);
void GetOperatorList([MarshalAs(UnmanagedType.SafeArray)] out byte[] info, out uint pdwCount, out uint pdwResult);
void SetCurrentOperator(uint dwMode, IntPtr info, out uint pdwResult);
void GetCallForwardingSettings(uint dwReason, uint dwAddressID, out uint pdwStatus, out uint pdwNumType, out string pwszAddress, out uint pdwDelayTime, out uint pdwResult);
void AddCallForwardingSettings(uint dwReason, uint dwInfoClass, string wszAddress, uint dwDelayTime, out uint pdwResult);
void RemoveCallForwardingSettings(uint dwReason, uint dwInfoClass, out uint pdwResult);
void RIL_Devspecific2DWORD(uint dwCmdID, out uint pdwParam1, out uint pdwParam2, out uint pdwResult);
void GetCallBarringStatus(uint dwType, uint dwInfoClass, string szPassword, out uint pdwBarringStatus, out uint pdwResult);
void SetCallBarringStatus(uint dwType, uint dwInfoClass, string szPassword, uint dwBarringStatus, out uint pdwResult);
void GetAudioMute(out uint dwEnable);
void SetAudioMute(uint dwEnable);
void Hangup();
void PerformImeiCompare(out string strSalesCode, out uint dwResult, out string strErrorMessage);
void SetLockingStatus(uint m_dwLockFacility, string pPasswd, out uint m_dwStatus, out uint pdwResult);
void CallBlockerUpdateInfo(string pwszUpdatedUserInfo, uint dwOpMode, out uint dwResult);
void GetCBConfig(out uint dwTotal, out uint dwSize, out byte[] lpBuffer);
void SetCBConfig(uint dwTotal, uint dwSize, byte[] lpBuffer);
}
[ComImport, InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("E05255E0-ED8F-4898-B3C3-4F8C5E29A2C1")]
public interface ISecProxySYSInterface
{
void ChekcAPI(uint apiID, out uint result);
}
[ComImport, Guid("2A9C50C0-77AC-4a12-9E26-17395ADF8870"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface ISecProxyWin32Interface
{
void GetProxyVersion(out uint version);
void Reserved();
void ChekcAPI(uint apiID, out uint result);
void RegistrySetString(uint HKEY, string pwszPath, string valueName, string value);
void RegistryGetString(uint HKEY, string pwszPath, string valueName, out string value);
void RegistrySetDWORD(uint HKEY, string pwszPath, string valueName, uint value);
void RegistryGetDWORD(uint HKEY, string pwszPath, string valueName, out uint value);
void CreateFile(string lpFileName, uint dwDesiredAccess, uint dwShareMode, uint dwCreationDisposition, uint dwFlagsAndAttributes, out uint phCreateFile);
void CloseHandle(uint hObject);
void ReadFile(uint hFile, out byte[] lpBuffer, uint nNumberOfBytesToRead, out uint lpNumberOfBytesRead);
void WriteFile(uint hFile, byte[] lpBuffer, uint nNumberOfBytesToWrite, out uint lpNumberOfBytesWritten);
void GetFileSize(uint hFile, out uint lpFileSizeHigh);
void CopyFile(string lpExistingFileName, string lpNewFileName, int bFailIfExists);
void DeleteFile(string lpFileName);
void LaunchExe(string szExe, string szArg);
}
public class RIL
{
// Fields
private COSecRILProxy m_CoClass;
private ISecProxyRILInterface m_CoInterface;
private static RIL m_single;
// Methods
static RIL();
private RIL();
public static void AddCallForwardingSettings(uint dwReason, uint dwInfoClass, string wszAddress, uint dwDelayTime, out uint pdwResult);
public static void CallBlockerUpdateInfo(string pwszUpdatedUserInfo, uint dwOpMode, out uint dwResult);
public static ISecProxyRILInterface CallInterface();
public static void GetAudioMute(out uint dwEnable);
public static void GetCallBarringStatus(uint dwType, uint dwInfoClass, string szPassword, out uint pdwBarringStatus, out uint pdwResult);
public static void GetCallForwardingSettings(uint dwReason, uint dwAddressID, out uint pdwStatus, out uint pdwNumType, out string pwszAddress, out uint pdwDelayTime, out uint pdwResult);
public static void GetCallWaitingStatus(out uint pdwInfoClass, out uint pdwResult);
public ISecProxyRILInterface GetComInterface();
public static void GetIMEI(out string IMEI);
public static void GetIMSI(out string IMSI);
public static RIL GetInstance();
public static void GetLockingStatus(uint m_dwLockFacility, out uint pdwLockStatus, out uint pdwResult);
public static void GetOperatorList(out byte[] info, out uint pdwCount, out uint pdwResult);
public void Initialize();
public static void PerformImeiCompare(out string strSalesCode, out uint dwResult, out string strErrorMessage);
public static void RemoveCallForwardingSettings(uint dwReason, uint dwInfoClass, out uint pdwResult);
public static void RIL_Devspecific2DWORD(uint dwCmdID, out uint pdwParam1, out uint pdwParam2, out uint pdwResult);
public static void SetAudioMute(uint dwEnable);
public static void SetCallBarringStatus(uint dwType, uint dwInfoClass, string szPassword, uint dwBarringStatus, out uint pdwResult);
public static void SetCallWaitingStatus(uint dwInfoClass, uint dwStatus, out uint pdwResult);
public static void SetCurrentOperator(uint dwMode, IntPtr info, out uint pdwResult);
}
public class RilCBMsgConfig
{
// Fields
public uint cbSize;
public List<RILRANGE> channelList;
public uint dwBroadcastMsgLangs;
public uint dwParams;
public bool fAccept;
// Methods
public RilCBMsgConfig();
public void AddChannel(RILRANGE range);
public bool Contains(RILRANGE range);
public uint GetCbSize();
public RILCBMSGCONFIG GetConfigStruct();
public static RILRANGE GetRange(int channel);
public static byte[] MakeRawData(RilCBMsgConfig cbConfg);
public static RilCBMsgConfig ParseData(uint total, uint size, byte[] rawData);
public override string ToString();
// Nested Types
[StructLayout(LayoutKind.Sequential)]
public struct RILCBMSGCONFIG
{
public uint cbSize;
public uint dwParams;
public uint dwBroadcastMsgLangs;
public bool fAccept;
[MarshalAs(UnmanagedType.ByValArray, SizeConst=1)]
public byte[] channelList;
}
[StructLayout(LayoutKind.Sequential)]
public struct RILRANGE
{
public uint dwMin;
public uint dwMax;
}
}
[StructLayout(LayoutKind.Sequential)]
public struct RILOPERATORNAMES
{
public uint cbSize;
public uint dwParams;
public string szLongName;
public string szShortName;
public string szNumName;
public string szCountryCode;
}
public class Sys
{
// Fields
private COSecSYSProxy m_CoClass;
private ISecProxySYSInterface m_CoInterface;
private static Sys m_single;
// Methods
static Sys();
private Sys();
public static ISecProxySYSInterface CallInterface();
public ISecProxySYSInterface GetComInterface();
public static Sys GetInstance();
public void Initialize();
}
public class Win32
{
// Fields
public static uint CREATE_ALWAYS;
public static uint CREATE_NEW;
public static uint FILE_ATTRIBUTE_ARCHIVE;
public static uint FILE_ATTRIBUTE_COMPRESSED;
public static uint FILE_ATTRIBUTE_DIRECTORY;
public static uint FILE_ATTRIBUTE_ENCRYPTED;
public static uint FILE_ATTRIBUTE_HIDDEN;
public static uint FILE_ATTRIBUTE_INROM;
public static uint FILE_ATTRIBUTE_NORMAL;
public static uint FILE_ATTRIBUTE_NOT_CONTENT_INDEXED;
public static uint FILE_ATTRIBUTE_OFFLINE;
public static uint FILE_ATTRIBUTE_READONLY;
public static uint FILE_ATTRIBUTE_REPARSE_POINT;
public static uint FILE_ATTRIBUTE_ROMMODULE;
public static uint FILE_ATTRIBUTE_ROMSTATICREF;
public static uint FILE_ATTRIBUTE_SPARSE_FILE;
public static uint FILE_ATTRIBUTE_SYSTEM;
public static uint FILE_ATTRIBUTE_TEMPORARY;
public static uint FILE_FLAG_BACKUP_SEMANTICS;
public static uint FILE_FLAG_DELETE_ON_CLOSE;
public static uint FILE_FLAG_NO_BUFFERING;
public static uint FILE_FLAG_OVERLAPPED;
public static uint FILE_FLAG_POSIX_SEMANTICS;
public static uint FILE_FLAG_RANDOM_ACCESS;
public static uint FILE_FLAG_SEQUENTIAL_SCAN;
public static uint FILE_FLAG_WRITE_THROUGH;
public static uint FILE_SHARE_DELETE;
public static uint FILE_SHARE_READ;
public static uint FILE_SHARE_WRITE;
public static uint GENERIC_ALL;
public static uint GENERIC_EXECUTE;
public static uint GENERIC_READ;
public static uint GENERIC_WRITE;
public static uint HKEY_CLASSES_ROOT;
public static uint HKEY_CURRENT_USER;
public static uint HKEY_LOCAL_MACHINE;
public static uint HKEY_USERS;
private COSecWin32Proxy m_CoClass;
private ISecProxyWin32Interface m_CoInterface;
private static Win32 m_single;
public static uint MODULE_ATTR_NODEBUG;
public static uint MODULE_ATTR_NOT_TRUSTED;
public static uint OPEN_ALWAYS;
public static uint OPEN_EXISTING;
public static uint OPEN_FOR_LOADER;
public static string REG_WM_BUSY_FLAG;
public static string REG_WM_GPRS_ALWAYSON;
public static string REG_WM_GPRS_APN;
public static string REG_WM_GPRS_AUTH_TYPE;
public static string REG_WM_GPRS_NAME;
public static string REG_WM_GPRS_PASSWORD;
public static string REG_WM_GPRS_PROFILES_TO_DELETE;
public static string REG_WM_GPRS_UNAME;
public static string REG_WM_MMS_APN;
public static string REG_WM_MMS_MMSC;
public static string REG_WM_MMS_MSGSIZE;
public static string REG_WM_MMS_NAME;
public static string REG_WM_MMS_PROFILES_TO_DELETE;
public static string REG_WM_MMS_PROXY;
public static string REG_WM_PROXY_ADDR;
public static string REG_WM_PROXY_APN;
public static string REG_WM_PROXY_DOMAIN;
public static string REG_WM_PROXY_NAME;
public static string REG_WM_PROXY_PORT;
public static string REG_WM_PROXY_PROFILES_TO_DELETE;
public static string REG_WM_ROOT;
public static uint TRUNCATE_EXISTING;
// Methods
static Win32();
private Win32();
public static ISecProxyWin32Interface CallInterface();
public static void CloseHandle(uint hObject);
public static void CopyFile(string lpExistingFileName, string lpNewFileName, int bFailIfExists);
public static void CreateFile(string lpFileName, uint dwDesiredAccess, uint dwShareMode, uint dwCreationDisposition, uint dwFlagsAndAttributes, out uint phCreateFile);
public static void DeleteFile(string lpFileName);
public ISecProxyWin32Interface GetComInterface();
public static void GetFileSize(uint hFile, out uint lpFileSizeHigh);
public static Win32 GetInstance();
public void Initialize();
public static void LaunchExe(string szExe, string szArg);
public static void ReadFile(uint hFile, out byte[] lpBuffer, uint nNumberOfBytesToRead, out uint lpNumberOfBytesRead);
public static void RegistryGetDWORD(uint HKEY, string pwszPath, string valueName, out uint value);
public static void RegistryGetString(uint HKEY, string pwszPath, string valueName, out string value);
public static void RegistrySetDWORD(uint HKEY, string pwszPath, string valueName, uint value);
public static void RegistrySetString(uint HKEY, string pwszPath, string valueName, string value);
public static void WriteFile(uint hFile, byte[] lpBuffer, uint nNumberOfBytesToWrite, out uint lpNumberOfBytesWritten);
}
}
It seems the API I need to make DiagProvXML work is still there. I might give it an update to support the Focus S (also Focus W & co.)
Ill need somebody with a Focus S to test it for me also.
Click to expand...
Click to collapse
I can test it but which one of the codes in the opening post is done correctly?
@Marvin_S: If you do a search you can find my post from a couple weeks back with various tests for the Samsung gen2 DLLs. They are indeed different from the gen1 DLLs, but offer a lot of exciting new capabilities. Unfortunately, there's also some kind of check or block on third-party use of the DLLs. I'm not yet sure exactly what caused it to not work. I'm still working on that, though.
EDIT: You've been able to make that work? My test app either produced an error message (file not found, of all things) or simply crashed each time I tried to use one of those APIs.
GoodDayToDie said:
@Marvin_S: If you do a search you can find my post from a couple weeks back with various tests for the Samsung gen2 DLLs. They are indeed different from the gen1 DLLs, but offer a lot of exciting new capabilities. Unfortunately, there's also some kind of check or block on third-party use of the DLLs. I'm not yet sure exactly what caused it to not work. I'm still working on that, though.
EDIT: You've been able to make that work? My test app either produced an error message (file not found, of all things) or simply crashed each time I tried to use one of those APIs.
Click to expand...
Click to collapse
No, untested, just inspected the samsung xap. I already assumed it would not work, but I posted it here for future reference for myself.
Ah too bad, can you call any api at all? For example the launchexe? it seems like they renamed rapiconfig.exe into ConfigXML.exe (or maybe rapiconfig is still there) it seems that ConfigXML.exe does not accept raw xml indeed but rather canned commands.
I included the source for the app, so feel free to take a look (and read the thread of tester comments, since I don't have a suitable device for testing).
Registry access: failed.
Filesystem access (yes the new DLLs seem to offer it): failed.
Provxml: failed
Other, trivial things: failed.
The OEM apps all contain a file simply called "_" which is a simple text file containing hex data as a string. I suspect the problems may be related to this file. If it's some kind of signature, that's going to be very hard to fake.
Here is the test app and source
[XAP][SOURCE][MANGO] Samsung gen2 interop test app v2
Any news from anyone?
It seems the ALARM and NOTIFICATION sources aren't shown in GWD. But they may be useable by modding the xml. Likely as sources for a hand, text, digital clock etc.
Code:
package com.samsung.gwd.source;
import java.util.HashMap;
public class Source
{
public static final String SOURCE_CALORIE_CAL = "cal";
public static final String SOURCE_CALORIE_KCAL = "kcal";
public static final String SOURCE_CALORIE_UNIT_CAL = "(cal)";
public static final String SOURCE_CALORIE_UNIT_KCAL = "(kcal)";
public static final String SOURCE_DISTANCE_M = "m";
public static final String SOURCE_DISTANCE_KM = "km";
public static final String SOURCE_DISTANCE_MILE = "mile";
public static final String SOURCE_DISTANCE_UNIT_M = "(m)";
public static final String SOURCE_DISTANCE_UNIT_KM = "(km)";
public static final String SOURCE_DISTANCE_UNIT_MILE = "(mile)";
public static final String SOURCE_SPEED_M = "m/s";
public static final String SOURCE_SPEED_KM = "km/h";
public static final String SOURCE_SPEED_MILE = "mile/h";
public static final String SOURCE_SPEED_UNIT_M = "(m/s)";
public static final String SOURCE_SPEED_UNIT_KM = "(km/h)";
public static final String SOURCE_SPEED_UNIT_MILE = "(mile/h)";
public static final String SOURCE_TEMPERATURE_C = "�C";
public static final String SOURCE_TEMPERATURE_F = "�F";
public static final String SOURCE_TEMPERATURE_K = "�K";
public static final String SOURCE_TEMPERATURE_UNIT_C = "(�C)";
public static final String SOURCE_TEMPERATURE_UNIT_F = "(�F)";
public static final String SOURCE_TEMPERATURE_UNIT_K = "(�K)";
public static final String SOURCE_HUMIDITY_PERCENT = "%";
public static final String SOURCE_HUMIDITY_UNIT_PERCENT = "(%)";
public static final String WEATHER_DISPLAY_TYPE_ICON = "Icon";
public static final String WEATHER_DISPLAY_TYPE_MAIN = "Main";
public static final String WEATHER_DISPLAY_TYPE_DESCRIPTION = "Description";
public static final String WEATHER_DISPLAY_TYPE_NUMBER = "Number";
public static final String WEATHER_DISPLAY_TYPE_ID = "ID";
public static final Source NONE = new Source("None", "none", 0.0D, 0.0D, false, 0.0D, 0.0D, null, new String[] { "None" });
public static final Source HOUR = new Source("Hour in Day", "hour0-23", 0.0D, 24.0D, true, 0.0D, 720.0D, null, new String[] { "%d" });
public static final Source HOUR_MINUTE = new Source("Hour in Day", "hour0-23.minute", 0.0D, 24.0D, true, 0.0D, 720.0D, null, new String[] { "%f" });
public static final Source MINUTE = new Source("Minute in Hours", "minute", 0.0D, 60.0D, false, 0.0D, 360.0D, null, new String[] { "%d" });
public static final Source MINUTE_SECOND = new Source("Minute in Hours", "minute.second", 0.0D, 60.0D, true, 0.0D, 360.0D, null, new String[] { "%f" });
public static final Source SECOND = new Source("Second in Minute", "second", 0.0D, 60.0D, false, 0.0D, 360.0D, null, new String[] { "%d" });
public static final Source SECOND_SWEEP = new Source("Second in Minute", "second.millisecond", 0.0D, 60.0D, true, 0.0D, 360.0D, null, new String[] { "%f" });
public static final Source DAY = new Source("Day of Month", "day", 0.0D, 31.0D, false, 0.0D, 360.0D, null, new String[] { "%d" });
public static final Source MONTH = new Source("Month of Year", "month", 0.0D, 12.0D, false, 0.0D, 360.0D, null, new String[] { "%d" });
public static final Source DAY_OF_WEEK = new Source("Day of Week", "dayOfWeek", 1.0D, 8.0D, false, 0.0D, 360.0D, null, new String[] { "%d" });
public static final Source DAY_OF_YEAR = new Source("Day of Year", "month0-11.day", 0.0D, 12.0D, true, 0.0D, 360.0D, null, new String[] { "%d" });
public static final Source BATTERY_PERCENT = new Source("Battery %", "battery.percent", 0.0D, 100.0D, false, 0.0D, 360.0D,
null, new String[] { "%d %", "%d", "% %d" });
public static final Source BATTERY_LEVEL = new Source("Battery Level", "battery.level", 0.0D, 4.0D, false, 0.0D, 360.0D,
null, new String[] { "%d" });
public static final Source BATTERY_CHARGING_STATUS = new Source("Battery charging status", "battery.chargingStatus", 0.0D, 1.0D, false, 0.0D, 180.0D,
null, new String[] { "%d" });
public static final Source PEDOMETER_STEP_PERCENT = new Source("Steps %", "pedometer.stepPercent", 0.0D, 100.0D, false, 0.0D, 360.0D,
"http://tizen.org/privilege/healthinfo", new String[] { "%d %", "%d", "% %d" });
public static final Source PEDOMETER_CALORIE = new Source("Burned calorie", "pedometer.calorie", 0.0D, 1000000.0D, false, 0.0D, 360.0D,
"http://tizen.org/privilege/healthinfo", new String[] { "%d kcal",
"%d (kcal)" },
new String[] { "kcal" },
new String[] { "0" },
"kcal", "0");
public static final Source PEDOMETER_DISTANCE = new Source("Moved distance", "pedometer.distance", 0.0D, 10000.0D, false, 0.0D, 360.0D,
"http://tizen.org/privilege/healthinfo", new String[] { "%d km",
"%d m",
"%d mile",
"%d (km)",
"%d (m)",
"%d (mile)" },
new String[] { "m", "km", "mile" },
new String[] { "0", "1", "2", "3" },
"km", "1");
public static final Source PEDOMETER_SPEED = new Source("Speed", "stepsPerSec", 0.0D, 20.0D, false, 0.0D, 360.0D,
"http://tizen.org/privilege/healthinfo", new String[] { "%d km/h",
"%d m/s",
"%d mile/h",
"%d (km/h)",
"%d (m/s)",
"%d (mile/h)" },
new String[] { "m/s", "km/h", "mile/h" },
new String[] { "0", "1", "2", "3" },
"km/h", "1");
public static final Source PEDOMETER_STEP_COUNT = new Source("Step counts", "pedometer.step", 0.0D, 10000.0D, false, 0.0D, 360.0D,
"http://tizen.org/privilege/healthinfo", new String[] { "%d steps", "%d" });
public static final Source PEDOMETER_STEP_GOAL = new Source("Steps goal", "pedometer.target", 0.0D, 100.0D, false, 0.0D, 360.0D,
"http://tizen.org/privilege/healthinfo", new String[] { "%d steps", "%d" });
public static final Source PEDOMETER_FLOOR = new Source("Floor", "floor", 0.0D, 100.0D, false, 0.0D, 360.0D,
"http://tizen.org/privilege/healthinfo", new String[] { "%d floor", "%d" });
public static final Source HEARTRATE = new Source("Heart rate (bpm)", "heartrate.recent", 0.0D, 200.0D, false, 0.0D, 360.0D,
"http://tizen.org/privilege/healthinfo", new String[] { "%d bpm", "%d" });
public static final Source WATER_INTAKE = new Source("Water Intake", "water", 0.0D, 100.0D, false, 0.0D, 360.0D,
"http://tizen.org/privilege/healthinfo", new String[] { "%d" });
public static final Source WATER_GOAL = new Source("Water Goal", "water.goal", 0.0D, 100.0D, false, 0.0D, 360.0D,
null, new String[] { "%d" });
public static final Source CAFFEINE_INTAKE = new Source("Caffeine Intake", "caffeine", 0.0D, 100.0D, false, 0.0D, 360.0D,
"http://tizen.org/privilege/healthinfo", new String[] { "%d" });
public static final Source CAFFEINE_GOAL = new Source("Caffeine Goal", "caffeine.goal", 0.0D, 100.0D, false, 0.0D, 360.0D,
null, new String[] { "%d" });
public static final Source ALARM_HOUR = new Source("Alarm hour", "alarm.hour0-23", 0.0D, 24.0D, false, 0.0D, 360.0D,
"http://tizen.org/privilege/alarm.get", new String[] { "%d" });
public static final Source ALARM_MINUTE = new Source("Alarm minute", "alarm.minute", 0.0D, 60.0D, false, 0.0D, 360.0D,
"http://tizen.org/privilege/alarm.get", new String[] { "%d" });
public static final Source ALARM_STATE = new Source("Alarm state", "alarm.state", 0.0D, 2.0D, false, 0.0D, 360.0D,
"http://tizen.org/privilege/alarm.get", new String[] { "%d" });
public static final Source MOONPHASE_POSITION = new Source("Moon Phase Position", "moonphase.position", 0.0D, 28.0D, true, 0.0D, 360.0D,
null, new String[] { "%f" },
null,
new String[] { "0", "1", "2", "3", "4", "5" },
null, "0");
public static final Source MOONPHASE_TYPE = new Source("Moon Phase Type", "moonphase.type", 0.0D, 8.0D, false, 0.0D, 360.0D,
null, new String[] { "%d" });
public static final Source NOTIFICATION_UNREAD = new Source("Notification unread", "notification.unread", 0.0D, 100.0D, false, 0.0D, 360.0D,
"http://tizen.org/privilege/notification", new String[] { "%d" });
public static final Source WEATHER_TYPE = new Source("Weather Type", "Weather Type", 0.0D, 100.0D, false, 0.0D, 360.0D,
null, new String[] { "Main",
"Icon",
"Description",
"Number",
"ID" });
public static final Source CURRENT_TEMPERATURE = new Source("Current Temperature", "Current Temperature", -50.0D, 50.0D, false, 0.0D, 360.0D,
null, new String[] { "%f �C",
"%f �F",
"%f �K",
"%f (�C)",
"%f (�F)",
"%f (�K)" },
new String[] { "�C", "�F", "�K" },
new String[] { "0", "1", "2", "3" },
"�C", "1");
public static final Source WEATHER_HUMIDITY = new Source("Weather Humidity", "Weather Humidity", 0.0D, 100.0D, false, 0.0D, 360.0D,
null,
new String[] { "%d %",
"%d (%)" },
new String[] { "%" },
new String[] { "0" },
"%", "0");
public static final Source WEATHER_CITY_NAME = new Source("City Name", "City Name", 0.0D, 100.0D, false, 0.0D, 360.0D,
null, new String[] { "%d" });
public static final Source WEATHER_LAST_UPDATE_TIME = new Source("Last update Time", "Last update Time", 0.0D, 100.0D, false, 0.0D, 360.0D,
null, new String[] { "M/d HH:mm", "HH : mm" });
private static final HashMap<String, Source> map = new HashMap();
public final String name;
public final String id;
public double startValue;
public double endValue;
public boolean real;
public double startAngle;
public double endAngle;
public final String privilege;
public final String[] display;
public final String[] unit;
public final String[] precision;
public final String defaultUnit;
public final String defaultPrecision;
static
{
map.put(NONE.id, NONE);
map.put(HOUR_MINUTE.id, HOUR_MINUTE);
map.put(HOUR.id, HOUR);
map.put(MINUTE.id, MINUTE);
map.put(MINUTE_SECOND.id, MINUTE_SECOND);
map.put(SECOND.id, SECOND);
map.put(SECOND_SWEEP.id, SECOND_SWEEP);
map.put(DAY.id, DAY);
map.put(MONTH.id, MONTH);
map.put(DAY_OF_WEEK.id, DAY_OF_WEEK);
map.put(DAY_OF_YEAR.id, DAY_OF_YEAR);
map.put(BATTERY_PERCENT.id, BATTERY_PERCENT);
map.put(BATTERY_LEVEL.id, BATTERY_LEVEL);
map.put(BATTERY_CHARGING_STATUS.id, BATTERY_CHARGING_STATUS);
map.put(PEDOMETER_STEP_PERCENT.id, PEDOMETER_STEP_PERCENT);
map.put(PEDOMETER_CALORIE.id, PEDOMETER_CALORIE);
map.put(PEDOMETER_DISTANCE.id, PEDOMETER_DISTANCE);
map.put(PEDOMETER_SPEED.id, PEDOMETER_SPEED);
map.put(PEDOMETER_STEP_COUNT.id, PEDOMETER_STEP_COUNT);
map.put(PEDOMETER_STEP_GOAL.id, PEDOMETER_STEP_GOAL);
map.put(PEDOMETER_FLOOR.id, PEDOMETER_FLOOR);
map.put(HEARTRATE.id, HEARTRATE);
map.put(WATER_INTAKE.id, WATER_INTAKE);
map.put(WATER_GOAL.id, WATER_GOAL);
map.put(CAFFEINE_INTAKE.id, CAFFEINE_INTAKE);
map.put(CAFFEINE_GOAL.id, CAFFEINE_GOAL);
map.put(ALARM_HOUR.id, ALARM_HOUR);
map.put(ALARM_MINUTE.id, ALARM_MINUTE);
map.put(ALARM_STATE.id, ALARM_STATE);
map.put(MOONPHASE_POSITION.id, MOONPHASE_POSITION);
map.put(MOONPHASE_TYPE.id, MOONPHASE_TYPE);
map.put(NOTIFICATION_UNREAD.id, NOTIFICATION_UNREAD);
map.put(WEATHER_TYPE.id, WEATHER_TYPE);
map.put(CURRENT_TEMPERATURE.id, CURRENT_TEMPERATURE);
map.put(WEATHER_HUMIDITY.id, WEATHER_HUMIDITY);
map.put(WEATHER_CITY_NAME.id, WEATHER_CITY_NAME);
map.put(WEATHER_LAST_UPDATE_TIME.id, WEATHER_LAST_UPDATE_TIME);
map.put(NONE.name, NONE);
map.put(HOUR_MINUTE.name, HOUR_MINUTE);
map.put(HOUR.name, HOUR);
map.put(MINUTE.name, MINUTE);
map.put(MINUTE_SECOND.name, MINUTE_SECOND);
map.put(SECOND.name, SECOND);
map.put(SECOND_SWEEP.name, SECOND_SWEEP);
map.put(DAY.name, DAY);
map.put(MONTH.name, MONTH);
map.put(DAY_OF_WEEK.name, DAY_OF_WEEK);
map.put(DAY_OF_YEAR.name, DAY_OF_YEAR);
map.put(BATTERY_PERCENT.name, BATTERY_PERCENT);
map.put(BATTERY_LEVEL.name, BATTERY_LEVEL);
map.put(BATTERY_CHARGING_STATUS.name, BATTERY_CHARGING_STATUS);
map.put(PEDOMETER_STEP_PERCENT.name, PEDOMETER_STEP_PERCENT);
map.put(PEDOMETER_CALORIE.name, PEDOMETER_CALORIE);
map.put(PEDOMETER_DISTANCE.name, PEDOMETER_DISTANCE);
map.put(PEDOMETER_SPEED.name, PEDOMETER_SPEED);
map.put(PEDOMETER_STEP_COUNT.name, PEDOMETER_STEP_COUNT);
map.put(PEDOMETER_STEP_GOAL.name, PEDOMETER_STEP_GOAL);
map.put(PEDOMETER_FLOOR.name, PEDOMETER_FLOOR);
map.put(HEARTRATE.name, HEARTRATE);
map.put(WATER_INTAKE.name, WATER_INTAKE);
map.put(WATER_GOAL.name, WATER_GOAL);
map.put(CAFFEINE_INTAKE.name, CAFFEINE_INTAKE);
map.put(CAFFEINE_GOAL.name, CAFFEINE_GOAL);
map.put(ALARM_HOUR.name, ALARM_HOUR);
map.put(ALARM_MINUTE.name, ALARM_MINUTE);
map.put(ALARM_STATE.name, ALARM_STATE);
map.put(MOONPHASE_POSITION.name, MOONPHASE_POSITION);
map.put(MOONPHASE_TYPE.name, MOONPHASE_TYPE);
map.put(NOTIFICATION_UNREAD.name, NOTIFICATION_UNREAD);
map.put(WEATHER_TYPE.name, WEATHER_TYPE);
map.put(CURRENT_TEMPERATURE.name, CURRENT_TEMPERATURE);
map.put(WEATHER_HUMIDITY.name, WEATHER_HUMIDITY);
map.put(WEATHER_CITY_NAME.name, WEATHER_CITY_NAME);
map.put(WEATHER_LAST_UPDATE_TIME.name, WEATHER_LAST_UPDATE_TIME);
}
public Source(String name, String id, double startValue, double endValue, boolean real, double startAngle, double endAngle, String privilege, String[] display, String[] unit, String[] precision, String defaultUnit, String defaultPrecision)
{
this.name = name;
this.id = id;
this.startValue = startValue;
this.endValue = endValue;
this.real = real;
this.startAngle = startAngle;
this.endAngle = endAngle;
this.privilege = privilege;
this.display = display;
this.unit = unit;
this.precision = precision;
this.defaultUnit = defaultUnit;
this.defaultPrecision = defaultPrecision;
}
public Source(String name, String id, double startValue, double endValue, boolean real, double startAngle, double endAngle, String privilege, String[] display)
{
this(name, id, startValue, endValue, real, startAngle, endAngle, privilege, display, null, null, null, null);
}
public Source(Source source)
{
this(source.name, source.id, source.startValue, source.endValue, source.real, source.startAngle, source.endAngle, source.privilege, source.display, source.unit, source.precision, source.defaultUnit, source.defaultPrecision);
}
public boolean equals(Object obj)
{
if ((obj instanceof Source)) {
return (this.name.equals(((Source)obj).name)) && (this.id.equals(((Source)obj).id)) &&
(this.startValue == ((Source)obj).startValue) && (this.endValue == ((Source)obj).endValue) && (this.real == ((Source)obj).real) &&
(this.startAngle == ((Source)obj).startAngle) && (this.endAngle == ((Source)obj).endAngle);
}
return false;
}
public static Source findById(String id)
{
Source result = (Source)map.get(id);
if (result == null) {
return NONE;
}
return result;
}
public static Source findByName(String name)
{
return (Source)map.get(name);
}
}