一:取消用户模式
(frameworks/)
diff --git a/base/packages/SystemUI/res/layout/keyguard_status_bar.xml b/base/packages/SystemUI/res/layout/keyguard_status_bar.xml
index b5f917a..9eb3ce9 100644
--- a/base/packages/SystemUI/res/layout/keyguard_status_bar.xml
+++ b/base/packages/SystemUI/res/layout/keyguard_status_bar.xml
@@ -29,6 +29,7 @@
android:layout_width="@dimen/multi_user_switch_width_keyguard"
android:layout_height="@dimen/status_bar_header_height_keyguard"
android:layout_alignParentEnd="true"
+ android:visibility="gone"
android:background="@drawable/ripple_drawable"
android:layout_marginEnd="@dimen/multi_user_switch_keyguard_margin">
<ImageView android:id="@+id/multi_user_avatar"
@@ -41,7 +42,7 @@
<LinearLayout android:id="@+id/system_icons_super_container"
android:layout_width="wrap_content"
android:layout_height="@dimen/status_bar_header_height"
- android:layout_toStartOf="@id/multi_user_switch"
+ android:layout_alignParentEnd="true"
android:layout_alignWithParentIfMissing="true"
android:layout_marginStart="16dp"
android:paddingEnd="@dimen/system_icons_keyguard_padding_end">
diff --git a/base/packages/SystemUI/res/layout/status_bar_expanded_header.xml b/base/packages/SystemUI/res/layout/status_bar_expanded_header.xml
index 5eca471..8659a02 100644
--- a/base/packages/SystemUI/res/layout/status_bar_expanded_header.xml
+++ b/base/packages/SystemUI/res/layout/status_bar_expanded_header.xml
@@ -35,6 +35,7 @@
<com.android.systemui.statusbar.phone.MultiUserSwitch android:id="@+id/multi_user_switch"
android:layout_width="@dimen/multi_user_switch_width_collapsed"
android:layout_height="@dimen/status_bar_header_height"
+ android:visibility="gone"
android:layout_alignParentEnd="true"
android:background="@drawable/ripple_drawable" >
<ImageView android:id="@+id/multi_user_avatar"
@@ -50,7 +51,7 @@
android:layout_height="@dimen/status_bar_header_height"
android:clipChildren="false"
android:clipToPadding="false"
- android:layout_toStartOf="@id/multi_user_switch">
+ android:layout_alignParentEnd="true">
<com.android.systemui.statusbar.phone.SettingsButton android:id="@+id/settings_button"
style="@android:style/Widget.Material.Button.Borderless"
(packages/apps/Settings/src/com/android/settings/SettingsActivity.java)
diff --git a/src/com/android/settings/SettingsActivity.java b/src/com/android/settings/SettingsActivity.java
index 8527713..2312ab9 100644
--- a/src/com/android/settings/SettingsActivity.java
+++ b/src/com/android/settings/SettingsActivity.java
@@ -1393,6 +1393,7 @@ public class SettingsActivity extends Activity
|| Utils.isMonkeyRunning()) {
removeTile = true;
}
+ removeTile = true;
} else if (id == R.id.nfc_payment_settings) {
if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_NFC)) {
removeTile = true;
(frameworks/)
diff --git a/av/media/mtp/MtpServer.cpp b/av/media/mtp/MtpServer.cpp
index 769c9b7..29a2f9d 100755
--- a/av/media/mtp/MtpServer.cpp
+++ b/av/media/mtp/MtpServer.cpp
@@ -499,7 +499,7 @@ MtpResponseCode MtpServer::doGetDeviceInfo() {
mData.putString(string); // Manufacturer
property_get("ro.product.model", prop_value, "MTP Device");
- string.set(prop_value);
+ string.set("不加下划线的mtp名称");
mData.putString(string); // Model
string.set("1.0");
mData.putString(string); // Device Version
diff --git a/base/media/java/android/mtp/MtpDatabase.java b/base/media/java/android/mtp/MtpDatabase.java
index 0100695..4898a23 100755
--- a/base/media/java/android/mtp/MtpDatabase.java
+++ b/base/media/java/android/mtp/MtpDatabase.java
@@ -41,6 +41,7 @@ import java.io.File;
import java.io.IOException;
import java.util.HashMap;
import java.util.Locale;
+import android.os.SystemProperties;
/**
* {@hide}
@@ -844,17 +845,82 @@ public class MtpDatabase {
private int getDeviceProperty(int property, long[] outIntValue, char[] outStringValue) {
Log.d(TAG, "getDeviceProperty property = 0x" + Integer.toHexString(property));
+ String value = "",deviceName;
+ int length = 0,lengthDeviceName = 0;
switch (property) {
case MtpConstants.DEVICE_PROPERTY_SYNCHRONIZATION_PARTNER:
+ //Ainge
+ // writable string properties kept in shared preferences
+ value = mDeviceProperties.getString(Integer.toString(property), "");
+ length = value.length();
+ if (length > 255) {
+ length = 255;
+ }
+ value.getChars(0, length, outStringValue, 0);
+ outStringValue[length] = 0;
+ /// M: Added for USB Develpment debug, more log for more debuging help @{
+ if(length > 0) {
+ Log.d(TAG, "getDeviceProperty property = " + Integer.toHexString(property));
+ Log.d(TAG, "getDeviceProperty value = " + value + ", length = " + length);
+ }
+ Log.d(TAG, "getDeviceProperty length = " + length);
+
+ /// M: Added Modification for ALPS00278882 @{
+ // Return the device name for the PC display if the FriendlyName is empty!!
+ deviceName = "不加下划线的ptp名称";
+
+ lengthDeviceName = deviceName.length();
+ if (lengthDeviceName > 255) {
+ lengthDeviceName = 255;
+ }
+ if(lengthDeviceName >0) {
+ deviceName.getChars(0, lengthDeviceName, outStringValue, 0);
+ outStringValue[lengthDeviceName] = 0;
+ Log.d(TAG, "getDeviceProperty deviceName = " + deviceName + ", lengthDeviceName = " + lengthDeviceName);
+ } else {
+ Log.d(TAG, "getDeviceProperty lengthDeviceName = " + lengthDeviceName);
+ }
+ /// M: @}
+ //Ainge
+ return MtpConstants.RESPONSE_OK;
case MtpConstants.DEVICE_PROPERTY_DEVICE_FRIENDLY_NAME:
// writable string properties kept in shared preferences
- String value = mDeviceProperties.getString(Integer.toString(property), "");
- int length = value.length();
+ value = mDeviceProperties.getString(Integer.toString(property), "");
+ length = value.length();
if (length > 255) {
length = 255;
}
value.getChars(0, length, outStringValue, 0);