DO NOT MERGE: Revert "BLE peripheral mode (4/4): Settings change for advertising preference."

This is cherry pick from master/klp-dev changes.
This reverts commit eb56b9ccb8.

Conflicts:
	src/com/android/settings/bluetooth/BluetoothDiscoverableEnabler.java
	src/com/android/settings/bluetooth/BluetoothSettings.java
	src/com/android/settings/bluetooth/LocalDeviceProfilesSettings.java

Change-Id: I2ce6b9eb0e335ba1b9aa4e1cb61a041f00d9aa87

Conflicts:
	src/com/android/settings/bluetooth/BluetoothAdvertisingEnabler.java
	src/com/android/settings/bluetooth/BluetoothDiscoverableEnabler.java
	src/com/android/settings/bluetooth/BluetoothSettings.java
	src/com/android/settings/bluetooth/LocalDeviceProfilesSettings.java
This commit is contained in:
Wei Wang
2014-02-27 16:28:34 -08:00
parent 27259b53e6
commit 41f5437def
16 changed files with 53 additions and 578 deletions

View File

@@ -16,15 +16,11 @@
package com.android.settings.bluetooth;
import android.app.Activity;
import android.app.AlertDialog;
import android.bluetooth.BluetoothClass;
import android.bluetooth.BluetoothProfile;
import android.content.Context;
import android.content.DialogInterface;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.widget.Toast;
import com.android.settings.R;
@@ -106,18 +102,4 @@ final class Utils {
Toast.makeText(context, message, Toast.LENGTH_SHORT).show();
}
}
/**
* Get application name of the calling activity. Returns empty string on errors.
*/
static String getCallingApp(Activity activity) {
final PackageManager pm = activity.getApplicationContext().getPackageManager();
ApplicationInfo applicationInfo;
try {
applicationInfo = pm.getApplicationInfo(activity.getCallingPackage(), 0);
} catch (final NameNotFoundException e) {
applicationInfo = null;
}
return (applicationInfo == null) ? "" : pm.getApplicationLabel(applicationInfo).toString();
}
}