am 6195432b: Merge branch \'eclair-plus-aosp\' of ssh://android-git.corp.google.com:29418/platform/frameworks/base into eclair-mr2-plus-aosp
Merge commit '6195432b6fde3cda4bc7e2406c8f2975795933a7' * commit '6195432b6fde3cda4bc7e2406c8f2975795933a7': Fix for 2177367: Reduce duration of vibrate in RotaryLockScreen Fix issue #2176944: Need API so browser, others can determine memory size of device Fix issue #2177262: Improve animations Fix issue #2174566: HOT STABILITY: NPE in activity manager
This commit is contained in:
@@ -27,6 +27,7 @@ import android.os.RemoteException;
|
||||
import android.os.Handler;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.os.SystemProperties;
|
||||
import android.text.TextUtils;
|
||||
import java.util.List;
|
||||
|
||||
@@ -46,6 +47,26 @@ public class ActivityManager {
|
||||
mHandler = handler;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the approximate per-application memory class of the current
|
||||
* device. This gives you an idea of how hard a memory limit you should
|
||||
* impose on your application to let the overall system work best. The
|
||||
* returned value is in megabytes; the baseline Android memory class is
|
||||
* 16 (which happens to be the Java heap limit of those devices); some
|
||||
* device with more memory may return 24 or even higher numbers.
|
||||
*/
|
||||
public int getMemoryClass() {
|
||||
return staticGetMemoryClass();
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
static public int staticGetMemoryClass() {
|
||||
// Really brain dead right now -- just take this from the configured
|
||||
// vm heap size, and assume it is in megabytes and thus ends with "m".
|
||||
String vmHeapSize = SystemProperties.get("dalvik.vm.heapsize", "16m");
|
||||
return Integer.parseInt(vmHeapSize.substring(0, vmHeapSize.length()-1));
|
||||
}
|
||||
|
||||
/**
|
||||
* Information you can retrieve about tasks that the user has most recently
|
||||
* started or visited.
|
||||
|
||||
@@ -106,8 +106,8 @@ public class RotarySelector extends View {
|
||||
|
||||
// Vibration (haptic feedback)
|
||||
private Vibrator mVibrator;
|
||||
private static final long VIBRATE_SHORT = 30; // msec
|
||||
private static final long VIBRATE_LONG = 60; // msec
|
||||
private static final long VIBRATE_SHORT = 20; // msec
|
||||
private static final long VIBRATE_LONG = 20; // msec
|
||||
|
||||
/**
|
||||
* The drawable for the arrows need to be scrunched this many dips towards the rotary bg below
|
||||
|
||||
Reference in New Issue
Block a user