Loading core/java/android/content/Intent.java +13 −0 Original line number Diff line number Diff line Loading @@ -2190,6 +2190,19 @@ public class Intent implements Parcelable, Cloneable { public static final String ACTION_HEADSET_PLUG = "android.intent.action.HEADSET_PLUG"; /** * Broadcast Action: WiFi Display video is enabled or disabled * * <p>The intent will have the following extra values: * <ul> * <li><em>state</em> - 0 for disabled, 1 for enabled. </li> * </ul> * @hide */ public static final String ACTION_WIFI_DISPLAY_VIDEO = "org.codeaurora.intent.action.WIFI_DISPLAY_VIDEO"; /** * Broadcast Action: An analog audio speaker/headset plugged in or unplugged. * Loading core/java/android/provider/Settings.java +13 −0 Original line number Diff line number Diff line Loading @@ -7643,6 +7643,19 @@ public final class Settings { */ public static final String MULTI_SIM_DATA_CALL_SUBSCRIPTION = "multi_sim_data_call"; /** * Subscription set by user for data call on a multi sim device. The difference from * MULTI_SIM_DATA_CALL_SUBSCRIPTION is that this is the subscription that user set * originally. Where as MULTI_SIM_DATA_CALL_SUBSCRIPTION holds the current data call * subscription value, which could be different from user preferred value due to * temporary DDS switch for say a silent DDS switch for MMS transaction. * The value may change dynamically in case of a SIM removal or de activation. * The supported values are 0 = SUB1, 1 = SUB2, 2 = SUB3, etc. * @hide */ public static final String MULTI_SIM_DEFAULT_DATA_CALL_SUBSCRIPTION = "multi_sim_defaut_data_call"; /** * Subscription to be used for SMS on a multi sim device. The supported values * are 0 = SUB1, 1 = SUB2 and etc. Loading core/res/res/values/strings.xml +3 −0 Original line number Diff line number Diff line Loading @@ -3993,6 +3993,9 @@ <!-- Storage description for USB storage. [CHAR LIMIT=NONE] --> <string name="storage_usb">USB storage</string> <!-- Storage description for UICC storage. [CHAR LIMIT=NONE] --> <string name="storage_uicc">UICC storage</string> <!-- Button text for the edit menu in input method extract mode. [CHAR LIMIT=16] --> <string name="extract_edit_menu_button">Edit</string> Loading packages/SystemUI/src/com/android/systemui/statusbar/MSimSignalClusterView.java +4 −2 Original line number Diff line number Diff line Loading @@ -195,9 +195,11 @@ public class MSimSignalClusterView public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent event) { // Standard group layout onPopulateAccessibilityEvent() implementations // ignore content description, so populate manually if (mWifiVisible && mWifiGroup.getContentDescription() != null) if (mWifiVisible && mWifiGroup != null && mWifiGroup.getContentDescription() != null) event.getText().add(mWifiGroup.getContentDescription()); if (mMobileVisible && mMobileGroup[MSimConstants.DEFAULT_SUBSCRIPTION]. if (mMobileVisible && mMobileGroup[MSimConstants.DEFAULT_SUBSCRIPTION] != null && mMobileGroup[MSimConstants.DEFAULT_SUBSCRIPTION]. getContentDescription() != null) event.getText().add(mMobileGroup[MSimConstants.DEFAULT_SUBSCRIPTION]. getContentDescription()); Loading policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +24 −2 Original line number Diff line number Diff line Loading @@ -567,6 +567,8 @@ public class PhoneWindowManager implements WindowManagerPolicy { private static final int MSG_DISPATCH_MEDIA_KEY_REPEAT_WITH_WAKE_LOCK = 4; private static final int MSG_DISPATCH_VOLKEY_WITH_WAKE_LOCK = 5; boolean mWifiDisplayConnected; private class PolicyHandler extends Handler { @Override public void handleMessage(Message msg) { Loading Loading @@ -1307,6 +1309,12 @@ public class PhoneWindowManager implements WindowManagerPolicy { mVibrator = (Vibrator)context.getSystemService(Context.VIBRATOR_SERVICE); // register for WIFI Display intents IntentFilter wifiDisplayFilter = new IntentFilter( Intent.ACTION_WIFI_DISPLAY_VIDEO); Intent wifidisplayIntent = context.registerReceiver( mWifiDisplayReceiver, wifiDisplayFilter); mLongPressVibePattern = getLongIntArray(mContext.getResources(), com.android.internal.R.array.config_longPressVibePattern); mVirtualKeyVibePattern = getLongIntArray(mContext.getResources(), Loading Loading @@ -5154,6 +5162,21 @@ public class PhoneWindowManager implements WindowManagerPolicy { } } BroadcastReceiver mWifiDisplayReceiver = new BroadcastReceiver() { public void onReceive(Context context, Intent intent) { String action = intent.getAction(); if (action.equals(Intent.ACTION_WIFI_DISPLAY_VIDEO)) { int state = intent.getIntExtra("state", 0); if(state == 1) { mWifiDisplayConnected = true; } else { mWifiDisplayConnected = false; } updateRotation(true); } } }; @Override public void screenTurnedOff(int why) { EventLog.writeEvent(70000, 0); Loading Loading @@ -5378,8 +5401,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { // enable 180 degree rotation while docked. preferredRotation = mDeskDockEnablesAccelerometer ? sensorRotation : mDeskDockRotation; } else if ((mHdmiPlugged) && mDemoHdmiRotationLock) { } else if ((mHdmiPlugged || mWifiDisplayConnected) && mDemoHdmiRotationLock) { // Ignore sensor when plugged into HDMI when demo HDMI rotation lock enabled. // Note that the dock orientation overrides the HDMI orientation. preferredRotation = mDemoHdmiRotation; Loading Loading
core/java/android/content/Intent.java +13 −0 Original line number Diff line number Diff line Loading @@ -2190,6 +2190,19 @@ public class Intent implements Parcelable, Cloneable { public static final String ACTION_HEADSET_PLUG = "android.intent.action.HEADSET_PLUG"; /** * Broadcast Action: WiFi Display video is enabled or disabled * * <p>The intent will have the following extra values: * <ul> * <li><em>state</em> - 0 for disabled, 1 for enabled. </li> * </ul> * @hide */ public static final String ACTION_WIFI_DISPLAY_VIDEO = "org.codeaurora.intent.action.WIFI_DISPLAY_VIDEO"; /** * Broadcast Action: An analog audio speaker/headset plugged in or unplugged. * Loading
core/java/android/provider/Settings.java +13 −0 Original line number Diff line number Diff line Loading @@ -7643,6 +7643,19 @@ public final class Settings { */ public static final String MULTI_SIM_DATA_CALL_SUBSCRIPTION = "multi_sim_data_call"; /** * Subscription set by user for data call on a multi sim device. The difference from * MULTI_SIM_DATA_CALL_SUBSCRIPTION is that this is the subscription that user set * originally. Where as MULTI_SIM_DATA_CALL_SUBSCRIPTION holds the current data call * subscription value, which could be different from user preferred value due to * temporary DDS switch for say a silent DDS switch for MMS transaction. * The value may change dynamically in case of a SIM removal or de activation. * The supported values are 0 = SUB1, 1 = SUB2, 2 = SUB3, etc. * @hide */ public static final String MULTI_SIM_DEFAULT_DATA_CALL_SUBSCRIPTION = "multi_sim_defaut_data_call"; /** * Subscription to be used for SMS on a multi sim device. The supported values * are 0 = SUB1, 1 = SUB2 and etc. Loading
core/res/res/values/strings.xml +3 −0 Original line number Diff line number Diff line Loading @@ -3993,6 +3993,9 @@ <!-- Storage description for USB storage. [CHAR LIMIT=NONE] --> <string name="storage_usb">USB storage</string> <!-- Storage description for UICC storage. [CHAR LIMIT=NONE] --> <string name="storage_uicc">UICC storage</string> <!-- Button text for the edit menu in input method extract mode. [CHAR LIMIT=16] --> <string name="extract_edit_menu_button">Edit</string> Loading
packages/SystemUI/src/com/android/systemui/statusbar/MSimSignalClusterView.java +4 −2 Original line number Diff line number Diff line Loading @@ -195,9 +195,11 @@ public class MSimSignalClusterView public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent event) { // Standard group layout onPopulateAccessibilityEvent() implementations // ignore content description, so populate manually if (mWifiVisible && mWifiGroup.getContentDescription() != null) if (mWifiVisible && mWifiGroup != null && mWifiGroup.getContentDescription() != null) event.getText().add(mWifiGroup.getContentDescription()); if (mMobileVisible && mMobileGroup[MSimConstants.DEFAULT_SUBSCRIPTION]. if (mMobileVisible && mMobileGroup[MSimConstants.DEFAULT_SUBSCRIPTION] != null && mMobileGroup[MSimConstants.DEFAULT_SUBSCRIPTION]. getContentDescription() != null) event.getText().add(mMobileGroup[MSimConstants.DEFAULT_SUBSCRIPTION]. getContentDescription()); Loading
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +24 −2 Original line number Diff line number Diff line Loading @@ -567,6 +567,8 @@ public class PhoneWindowManager implements WindowManagerPolicy { private static final int MSG_DISPATCH_MEDIA_KEY_REPEAT_WITH_WAKE_LOCK = 4; private static final int MSG_DISPATCH_VOLKEY_WITH_WAKE_LOCK = 5; boolean mWifiDisplayConnected; private class PolicyHandler extends Handler { @Override public void handleMessage(Message msg) { Loading Loading @@ -1307,6 +1309,12 @@ public class PhoneWindowManager implements WindowManagerPolicy { mVibrator = (Vibrator)context.getSystemService(Context.VIBRATOR_SERVICE); // register for WIFI Display intents IntentFilter wifiDisplayFilter = new IntentFilter( Intent.ACTION_WIFI_DISPLAY_VIDEO); Intent wifidisplayIntent = context.registerReceiver( mWifiDisplayReceiver, wifiDisplayFilter); mLongPressVibePattern = getLongIntArray(mContext.getResources(), com.android.internal.R.array.config_longPressVibePattern); mVirtualKeyVibePattern = getLongIntArray(mContext.getResources(), Loading Loading @@ -5154,6 +5162,21 @@ public class PhoneWindowManager implements WindowManagerPolicy { } } BroadcastReceiver mWifiDisplayReceiver = new BroadcastReceiver() { public void onReceive(Context context, Intent intent) { String action = intent.getAction(); if (action.equals(Intent.ACTION_WIFI_DISPLAY_VIDEO)) { int state = intent.getIntExtra("state", 0); if(state == 1) { mWifiDisplayConnected = true; } else { mWifiDisplayConnected = false; } updateRotation(true); } } }; @Override public void screenTurnedOff(int why) { EventLog.writeEvent(70000, 0); Loading Loading @@ -5378,8 +5401,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { // enable 180 degree rotation while docked. preferredRotation = mDeskDockEnablesAccelerometer ? sensorRotation : mDeskDockRotation; } else if ((mHdmiPlugged) && mDemoHdmiRotationLock) { } else if ((mHdmiPlugged || mWifiDisplayConnected) && mDemoHdmiRotationLock) { // Ignore sensor when plugged into HDMI when demo HDMI rotation lock enabled. // Note that the dock orientation overrides the HDMI orientation. preferredRotation = mDemoHdmiRotation; Loading