Merge "Fix backup for users hit by erroneous backup disabling" into nyc-mr1-dev
diff --git a/core/java/android/bluetooth/BluetoothDevice.java b/core/java/android/bluetooth/BluetoothDevice.java
index 6d6dfeb..cd5eff2 100644
--- a/core/java/android/bluetooth/BluetoothDevice.java
+++ b/core/java/android/bluetooth/BluetoothDevice.java
@@ -1596,7 +1596,7 @@
// BLE is not supported
return null;
}
- BluetoothGatt gatt = new BluetoothGatt(context, iGatt, this, transport);
+ BluetoothGatt gatt = new BluetoothGatt(iGatt, this, transport);
gatt.connect(autoConnect, callback);
return gatt;
} catch (RemoteException e) {Log.e(TAG, "", e);}
diff --git a/core/java/android/bluetooth/BluetoothGatt.java b/core/java/android/bluetooth/BluetoothGatt.java
index 800dd43..552c8d3 100644
--- a/core/java/android/bluetooth/BluetoothGatt.java
+++ b/core/java/android/bluetooth/BluetoothGatt.java
@@ -41,7 +41,6 @@
private static final boolean DBG = true;
private static final boolean VDBG = false;
- private final Context mContext;
private IBluetoothGatt mService;
private BluetoothGattCallback mCallback;
private int mClientIf;
@@ -496,9 +495,8 @@
}
};
- /*package*/ BluetoothGatt(Context context, IBluetoothGatt iGatt, BluetoothDevice device,
+ /*package*/ BluetoothGatt(IBluetoothGatt iGatt, BluetoothDevice device,
int transport) {
- mContext = context;
mService = iGatt;
mDevice = device;
mTransport = transport;
diff --git a/core/java/android/bluetooth/BluetoothGattServer.java b/core/java/android/bluetooth/BluetoothGattServer.java
index f451340..9f8d1a7 100644
--- a/core/java/android/bluetooth/BluetoothGattServer.java
+++ b/core/java/android/bluetooth/BluetoothGattServer.java
@@ -44,7 +44,6 @@
private static final boolean DBG = true;
private static final boolean VDBG = false;
- private final Context mContext;
private BluetoothAdapter mAdapter;
private IBluetoothGatt mService;
private BluetoothGattServerCallback mCallback;
@@ -307,8 +306,7 @@
/**
* Create a BluetoothGattServer proxy object.
*/
- /*package*/ BluetoothGattServer(Context context, IBluetoothGatt iGatt, int transport) {
- mContext = context;
+ /*package*/ BluetoothGattServer(IBluetoothGatt iGatt, int transport) {
mService = iGatt;
mAdapter = BluetoothAdapter.getDefaultAdapter();
mCallback = null;
diff --git a/core/java/android/bluetooth/BluetoothManager.java b/core/java/android/bluetooth/BluetoothManager.java
index 00058a9..29283e7 100644
--- a/core/java/android/bluetooth/BluetoothManager.java
+++ b/core/java/android/bluetooth/BluetoothManager.java
@@ -236,7 +236,7 @@
Log.e(TAG, "Fail to get GATT Server connection");
return null;
}
- BluetoothGattServer mGattServer = new BluetoothGattServer(context, iGatt,transport);
+ BluetoothGattServer mGattServer = new BluetoothGattServer(iGatt,transport);
Boolean regStatus = mGattServer.registerCallback(callback);
return regStatus? mGattServer : null;
} catch (RemoteException e) {
diff --git a/docs/html/guide/topics/ui/drag-drop.jd b/docs/html/guide/topics/ui/drag-drop.jd
index 4a87cd4..8e4297f 100644
--- a/docs/html/guide/topics/ui/drag-drop.jd
+++ b/docs/html/guide/topics/ui/drag-drop.jd
@@ -321,7 +321,7 @@
<p>
If the listener wants to continue receiving drag events for this operation, it must
return boolean <code>true</code> to the system.
- <\p>
+ </p>
</td>
</tr>
<tr>
diff --git a/docs/html/guide/topics/ui/multi-window.jd b/docs/html/guide/topics/ui/multi-window.jd
index dede557..bab582d 100644
--- a/docs/html/guide/topics/ui/multi-window.jd
+++ b/docs/html/guide/topics/ui/multi-window.jd
@@ -215,7 +215,7 @@
Set this attribute in your manifest's <a href=
"{@docRoot}guide/topics/manifest/activity-element"><code><activity></code></a>
node to indicate whether the activity supports <a href=
- "{@docRoot}training/tv/playback/picture-in-picture.jd">Picture-in-Picture</a>
+ "{@docRoot}training/tv/playback/picture-in-picture.html">Picture-in-Picture</a>
display. This attribute is ignored if <code>android:resizeableActivity</code>
is false.
</p>
diff --git a/docs/html/training/monitoring-device-state/battery-monitoring.jd b/docs/html/training/monitoring-device-state/battery-monitoring.jd
index db75aaf..bab9c9c 100644
--- a/docs/html/training/monitoring-device-state/battery-monitoring.jd
+++ b/docs/html/training/monitoring-device-state/battery-monitoring.jd
@@ -141,10 +141,11 @@
condition by listening for {@link android.content.Intent#ACTION_BATTERY_LOW} and {@link
android.content.Intent#ACTION_BATTERY_OKAY}.</p>
-<pre><receiver android:name=".BatteryLevelReceiver">
-<intent-filter>
- <action android:name="android.intent.action.ACTION_BATTERY_LOW"/>
- <action android:name="android.intent.action.ACTION_BATTERY_OKAY"/>
+<pre>
+<receiver android:name=".BatteryLevelReceiver">
+ <intent-filter>
+ <action android:name="android.intent.action.BATTERY_LOW"/>
+ <action android:name="android.intent.action.BATTERY_OKAY"/>
</intent-filter>
</receiver></pre>
diff --git a/services/core/java/com/android/server/pm/PackageManagerShellCommand.java b/services/core/java/com/android/server/pm/PackageManagerShellCommand.java
index e5ddfd0..b6cecc9 100644
--- a/services/core/java/com/android/server/pm/PackageManagerShellCommand.java
+++ b/services/core/java/com/android/server/pm/PackageManagerShellCommand.java
@@ -1147,14 +1147,15 @@
private int doWriteSplit(int sessionId, String inPath, long sizeBytes, String splitName,
boolean logSuccess) throws RemoteException {
final PrintWriter pw = getOutPrintWriter();
- if ("-".equals(inPath)) {
- inPath = null;
- } else if (inPath != null) {
- final File file = new File(inPath);
- if (file.isFile()) {
- sizeBytes = file.length();
- }
+ if (sizeBytes <= 0) {
+ pw.println("Error: must specify a APK size");
+ return 1;
}
+ if (inPath != null && !"-".equals(inPath)) {
+ pw.println("Error: APK content must be streamed");
+ return 1;
+ }
+ inPath = null;
final SessionInfo info = mInterface.getPackageInstaller().getSessionInfo(sessionId);
diff --git a/services/net/java/android/net/ip/IpManager.java b/services/net/java/android/net/ip/IpManager.java
index 215059d..ee67d953 100644
--- a/services/net/java/android/net/ip/IpManager.java
+++ b/services/net/java/android/net/ip/IpManager.java
@@ -358,6 +358,7 @@
}
public static final String DUMP_ARG = "ipmanager";
+ public static final String DUMP_ARG_CONFIRM = "confirm";
private static final int CMD_STOP = 1;
private static final int CMD_START = 2;
@@ -562,6 +563,12 @@
}
public void dump(FileDescriptor fd, PrintWriter writer, String[] args) {
+ if (args.length > 0 && DUMP_ARG_CONFIRM.equals(args[0])) {
+ // Execute confirmConfiguration() and take no further action.
+ confirmConfiguration();
+ return;
+ }
+
IndentingPrintWriter pw = new IndentingPrintWriter(writer, " ");
pw.println("APF dump:");
pw.increaseIndent();