summaryrefslogtreecommitdiffstats
path: root/core/java
diff options
context:
space:
mode:
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/app/admin/DevicePolicyManager.java10
-rw-r--r--core/java/android/bluetooth/BluetoothAdapter.java19
-rw-r--r--core/java/android/bluetooth/IBluetooth.aidl1
-rw-r--r--core/java/android/os/NullVibrator.java1
-rw-r--r--core/java/android/provider/Settings.java7
-rw-r--r--core/java/android/widget/OverScroller.java8
6 files changed, 41 insertions, 5 deletions
diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java
index 2d729c7..c505b0b 100644
--- a/core/java/android/app/admin/DevicePolicyManager.java
+++ b/core/java/android/app/admin/DevicePolicyManager.java
@@ -124,6 +124,12 @@ public class DevicePolicyManager {
*
* <p> If provisioning fails, the managedProfile is removed so the device returns to its
* previous state.
+ *
+ * <p>If launched with {@link android.app.Activity#startActivityForResult(Intent, int)} a
+ * result code of {@link android.app.Activity#RESULT_OK} implies that the synchronous part of
+ * the provisioning flow was successful, although this doesn't guarantee the full flow will
+ * succeed. Conversely a result code of {@link android.app.Activity#RESULT_CANCELED} implies
+ * that the user backed-out of provisioning, or some precondition for provisioning wasn't met.
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_PROVISION_MANAGED_PROFILE
@@ -158,6 +164,10 @@ public class DevicePolicyManager {
*
* <p> If provisioning fails, the device is factory reset.
*
+ * <p>A result code of {@link android.app.Activity#RESULT_OK} implies that the synchronous part
+ * of the provisioning flow was successful, although this doesn't guarantee the full flow will
+ * succeed. Conversely a result code of {@link android.app.Activity#RESULT_CANCELED} implies
+ * that the user backed-out of provisioning, or some precondition for provisioning wasn't met.
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_PROVISION_MANAGED_DEVICE
diff --git a/core/java/android/bluetooth/BluetoothAdapter.java b/core/java/android/bluetooth/BluetoothAdapter.java
index 97afafa..1f3ff51 100644
--- a/core/java/android/bluetooth/BluetoothAdapter.java
+++ b/core/java/android/bluetooth/BluetoothAdapter.java
@@ -1002,6 +1002,25 @@ public final class BluetoothAdapter {
}
/**
+ * Factory reset bluetooth settings.
+ *
+ * <p>Requires the {@link android.Manifest.permission#BLUETOOTH_PRIVILEGED}
+ * permission
+ *
+ * @return true to indicate that the config file was successfully cleared
+ *
+ * @hide
+ */
+ public boolean factoryReset() {
+ try {
+ if (mService != null) {
+ return mService.factoryReset();
+ }
+ } catch (RemoteException e) {Log.e(TAG, "", e);}
+ return false;
+ }
+
+ /**
* Get the UUIDs supported by the local Bluetooth adapter.
*
* <p>Requires {@link android.Manifest.permission#BLUETOOTH}
diff --git a/core/java/android/bluetooth/IBluetooth.aidl b/core/java/android/bluetooth/IBluetooth.aidl
index 7a894ae..66f3418 100644
--- a/core/java/android/bluetooth/IBluetooth.aidl
+++ b/core/java/android/bluetooth/IBluetooth.aidl
@@ -92,6 +92,7 @@ interface IBluetooth
ParcelFileDescriptor createSocketChannel(int type, in String serviceName, in ParcelUuid uuid, int port, int flag);
boolean configHciSnoopLog(boolean enable);
+ boolean factoryReset();
boolean isMultiAdvertisementSupported();
boolean isPeripheralModeSupported();
diff --git a/core/java/android/os/NullVibrator.java b/core/java/android/os/NullVibrator.java
index f14d965..19b452f 100644
--- a/core/java/android/os/NullVibrator.java
+++ b/core/java/android/os/NullVibrator.java
@@ -43,7 +43,6 @@ public class NullVibrator extends Vibrator {
*/
@Override
public void vibrate(int uid, String opPkg, long milliseconds, AudioAttributes attributes) {
- vibrate(milliseconds);
}
/**
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 6f98788..bb09b05 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -7554,6 +7554,13 @@ public final class Settings {
}
/**
+ * Value of the ringer before entering zen mode.
+ *
+ * @hide
+ */
+ public static final String ZEN_MODE_RINGER_LEVEL = "zen_mode_ringer_level";
+
+ /**
* Opaque value, changes when persisted zen mode configuration changes.
*
* @hide
diff --git a/core/java/android/widget/OverScroller.java b/core/java/android/widget/OverScroller.java
index 98bfd7d..50569d7 100644
--- a/core/java/android/widget/OverScroller.java
+++ b/core/java/android/widget/OverScroller.java
@@ -678,7 +678,7 @@ public class OverScroller {
void startScroll(int start, int distance, int duration) {
mFinished = false;
- mStart = start;
+ mCurrentPosition = mStart = start;
mFinal = start + distance;
mStartTime = AnimationUtils.currentAnimationTimeMillis();
@@ -712,7 +712,7 @@ public class OverScroller {
boolean springback(int start, int min, int max) {
mFinished = true;
- mStart = mFinal = start;
+ mCurrentPosition = mStart = mFinal = start;
mVelocity = 0;
mStartTime = AnimationUtils.currentAnimationTimeMillis();
@@ -804,7 +804,7 @@ public class OverScroller {
final float totalDuration = (float) Math.sqrt(
2.0 * (distanceToApex + distanceToEdge) / Math.abs(mDeceleration));
mStartTime -= (int) (1000.0f * (totalDuration - durationToApex));
- mStart = end;
+ mCurrentPosition = mStart = end;
mVelocity = (int) (- mDeceleration * totalDuration);
}
@@ -873,7 +873,7 @@ public class OverScroller {
// Duration from start to null velocity
if (mDuration < mSplineDuration) {
// If the animation was clamped, we reached the edge
- mStart = mFinal;
+ mCurrentPosition = mStart = mFinal;
// TODO Better compute speed when edge was reached
mVelocity = (int) mCurrVelocity;
mDeceleration = getDeceleration(mVelocity);