Decided to start a new thread on this subject since I could not find any correct info about it.
I decompiled phone.apk to check wether there was a data usage monitor in there. If you use Anycut you can select it (from of Phone.apk). Only it looks like it is disabled. Carriers wish? The data usage monitor in Android 2.x (like in ICS) might be useful
Anyway, after decompiling Phone.apk and searching for "datausage" there it was.
Files that are interesting are in com/android/phone:
- DataUsageListener.smali
- DataUsage.smali
- Settings.smali
com/android/phone/DataUsageListener
android/net/ThrottleManager
This answers a question I already had for a while: /data/system/throttle with temp file like:
1:6:0:0:0:0:0:0:0:0:0:0:0:0:2:1347228000000:1349820000000
In Settings.smali there is:
and a ref to android.settings.secure:
This is W.I.P....... will come back soon
Cheers
I decompiled phone.apk to check wether there was a data usage monitor in there. If you use Anycut you can select it (from of Phone.apk). Only it looks like it is disabled. Carriers wish? The data usage monitor in Android 2.x (like in ICS) might be useful
Anyway, after decompiling Phone.apk and searching for "datausage" there it was.
Files that are interesting are in com/android/phone:
- DataUsageListener.smali
- DataUsage.smali
- Settings.smali
com/android/phone/DataUsageListener
android/net/ThrottleManager
This answers a question I already had for a while: /data/system/throttle with temp file like:
1:6:0:0:0:0:0:0:0:0:0:0:0:0:2:1347228000000:1349820000000
In Settings.smali there is:
Code:
:cond_a
const-string v6, "throttle"
invoke-virtual {p0, v6}, Lcom/android/phone/Settings;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v5
check-cast v5, Landroid/net/ThrottleManager;
.line 473
.local v5, tm:Landroid/net/ThrottleManager;
new-instance v6, Lcom/android/phone/DataUsageListener;
iget-object v7, p0, Lcom/android/phone/Settings;->mButtonDataUsage:Landroid/preference/Preference;
invoke-direct {v6, p0, v7, v3}, Lcom/android/phone/DataUsageListener;-><init>(Landroid/content/Context;Landroid/preference/Preference;Landroid/preference/PreferenceScreen;)V
iput-object v6, p0, Lcom/android/phone/Settings;->mDataUsageListener:Lcom/android/phone/DataUsageListener;
.line 475
const-string v6, "XEC"
sget-object v7, Lcom/android/phone/Settings;->salesCode:Ljava/lang/String;
invoke-virtual {v6, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v6
and a ref to android.settings.secure:
Code:
/**
3936 * The bandwidth throttle polling freqency in seconds
3937 * @hide
3938 */
3939 public static final String THROTTLE_POLLING_SEC = "throttle_polling_sec";
3940
3941 /**
3942 * The bandwidth throttle threshold (long)
3943 * @hide
3944 */
3945 public static final String THROTTLE_THRESHOLD_BYTES = "throttle_threshold_bytes";
3946
3947 /**
3948 * The bandwidth throttle value (kbps)
3949 * @hide
3950 */
3951 public static final String THROTTLE_VALUE_KBITSPS = "throttle_value_kbitsps";
3952
3953 /**
3954 * The bandwidth throttle reset calendar day (1-28)
3955 * @hide
3956 */
3957 public static final String THROTTLE_RESET_DAY = "throttle_reset_day";
3958
3959 /**
3960 * The throttling notifications we should send
3961 * @hide
3962 */
3963 public static final String THROTTLE_NOTIFICATION_TYPE = "throttle_notification_type";
3964
3965 /**
3966 * Help URI for data throttling policy
3967 * @hide
3968 */
3969 public static final String THROTTLE_HELP_URI = "throttle_help_uri";
3970
3971 /**
3972 * The length of time in Sec that we allow our notion of NTP time
3973 * to be cached before we refresh it
3974 * @hide
3975 */
3976 public static final String THROTTLE_MAX_NTP_CACHE_AGE_SEC =
3977 "throttle_max_ntp_cache_age_sec";
3978
3979 /**
3980 * The maximum size, in bytes, of a download that the download manager will transfer over
3981 * a non-wifi connection.
3982 * @hide
3983 */
3984 public static final String DOWNLOAD_MAX_BYTES_OVER_MOBILE =
3985 "download_manager_max_bytes_over_mobile";
3986
3987 /**
3988 * The recommended maximum size, in bytes, of a download that the download manager should
3989 * transfer over a non-wifi connection. Over this size, the use will be warned, but will
3990 * have the option to start the download over the mobile connection anyway.
3991 * @hide
3992 */
3993 public static final String DOWNLOAD_RECOMMENDED_MAX_BYTES_OVER_MOBILE =
3994 "download_manager_recommended_max_bytes_over_mobile";
3995
This is W.I.P....... will come back soon
Cheers
Last edited: