resolve merge conflicts of 1723bc14eb to stage-aosp-master
Change-Id: I11054806dbd263b2adaedb21458c33b7407bb7d6
This commit is contained in:
27
packages/SystemUI/res/drawable/stat_sys_signal_in.xml
Normal file
27
packages/SystemUI/res/drawable/stat_sys_signal_in.xml
Normal file
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2016 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:autoMirrored="true"
|
||||
android:width="17dp"
|
||||
android:height="17dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:name="in"
|
||||
android:fillColor="#FFFFFFFF"
|
||||
android:pathData="M8.7,12.2l-2.0,3.5l-2.0,-3.5z" />
|
||||
</vector>
|
||||
31
packages/SystemUI/res/drawable/stat_sys_signal_inout.xml
Normal file
31
packages/SystemUI/res/drawable/stat_sys_signal_inout.xml
Normal file
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2016 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:autoMirrored="true"
|
||||
android:width="17dp"
|
||||
android:height="17dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:name="in"
|
||||
android:fillColor="#FFFFFFFF"
|
||||
android:pathData="M8.7,12.2l-2.0,3.5l-2.0,-3.5z" />
|
||||
<path
|
||||
android:name="out"
|
||||
android:fillColor="#FFFFFFFF"
|
||||
android:pathData="M0.5,15.7l2.0,-3.5l2.0,3.5z" />
|
||||
</vector>
|
||||
27
packages/SystemUI/res/drawable/stat_sys_signal_out.xml
Normal file
27
packages/SystemUI/res/drawable/stat_sys_signal_out.xml
Normal file
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2016 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:autoMirrored="true"
|
||||
android:width="17dp"
|
||||
android:height="17dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:name="out"
|
||||
android:fillColor="#FFFFFFFF"
|
||||
android:pathData="M0.5,15.7l2.0,-3.5l2.0,3.5z" />
|
||||
</vector>
|
||||
27
packages/SystemUI/res/drawable/stat_sys_wifi_in.xml
Normal file
27
packages/SystemUI/res/drawable/stat_sys_wifi_in.xml
Normal file
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2016 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:autoMirrored="true"
|
||||
android:width="18.41dp"
|
||||
android:height="17dp"
|
||||
android:viewportWidth="26.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:name="in"
|
||||
android:fillColor="#FFFFFFFF"
|
||||
android:pathData="M8.7,18.3l-2.0,3.5l-2.0,-3.5z" />
|
||||
</vector>
|
||||
31
packages/SystemUI/res/drawable/stat_sys_wifi_inout.xml
Normal file
31
packages/SystemUI/res/drawable/stat_sys_wifi_inout.xml
Normal file
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2016 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:autoMirrored="true"
|
||||
android:width="18.41dp"
|
||||
android:height="17dp"
|
||||
android:viewportWidth="26.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:name="in"
|
||||
android:fillColor="#FFFFFFFF"
|
||||
android:pathData="M8.7,18.3l-2.0,3.5l-2.0,-3.5z" />
|
||||
<path
|
||||
android:name="out"
|
||||
android:fillColor="#FFFFFFFF"
|
||||
android:pathData="M0.5,21.8l2.0,-3.5l2.0,3.5z" />
|
||||
</vector>
|
||||
27
packages/SystemUI/res/drawable/stat_sys_wifi_out.xml
Normal file
27
packages/SystemUI/res/drawable/stat_sys_wifi_out.xml
Normal file
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2016 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:autoMirrored="true"
|
||||
android:width="18.41dp"
|
||||
android:height="17dp"
|
||||
android:viewportWidth="26.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:name="out"
|
||||
android:fillColor="#FFFFFFFF"
|
||||
android:pathData="M0.5,21.8l2.0,-3.5l2.0,3.5z" />
|
||||
</vector>
|
||||
@@ -54,4 +54,10 @@
|
||||
android:src="@drawable/stat_sys_roaming"
|
||||
android:contentDescription="@string/accessibility_data_connection_roaming"
|
||||
android:visibility="gone" />
|
||||
<ImageView
|
||||
android:id="@+id/mobile_inout"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
</FrameLayout>
|
||||
|
||||
@@ -70,6 +70,11 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:alpha="0.0"
|
||||
/>
|
||||
<ImageView
|
||||
android:id="@+id/wifi_inout"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
/>
|
||||
</FrameLayout>
|
||||
<View
|
||||
android:id="@+id/wifi_signal_spacer"
|
||||
|
||||
@@ -75,6 +75,8 @@ public class SignalClusterView
|
||||
private boolean mWifiVisible = false;
|
||||
private int mWifiStrengthId = 0;
|
||||
private int mLastWifiStrengthId = -1;
|
||||
private int mWifiActivityId = 0;
|
||||
private int mLastWifiActivityId = -1;
|
||||
private boolean mIsAirplaneMode = false;
|
||||
private int mAirplaneIconId = 0;
|
||||
private int mLastAirplaneIconId = -1;
|
||||
@@ -89,6 +91,7 @@ public class SignalClusterView
|
||||
ViewGroup mEthernetGroup, mWifiGroup;
|
||||
View mNoSimsCombo;
|
||||
ImageView mVpn, mEthernet, mWifi, mAirplane, mNoSims, mEthernetDark, mWifiDark, mNoSimsDark;
|
||||
ImageView mWifiActivity;
|
||||
View mWifiAirplaneSpacer;
|
||||
View mWifiSignalSpacer;
|
||||
LinearLayout mMobileSignalGroup;
|
||||
@@ -180,6 +183,7 @@ public class SignalClusterView
|
||||
mWifiGroup = (ViewGroup) findViewById(R.id.wifi_combo);
|
||||
mWifi = (ImageView) findViewById(R.id.wifi_signal);
|
||||
mWifiDark = (ImageView) findViewById(R.id.wifi_signal_dark);
|
||||
mWifiActivity = (ImageView) findViewById(R.id.wifi_inout);
|
||||
mAirplane = (ImageView) findViewById(R.id.airplane);
|
||||
mNoSims = (ImageView) findViewById(R.id.no_sims);
|
||||
mNoSimsDark = (ImageView) findViewById(R.id.no_sims_dark);
|
||||
@@ -264,6 +268,10 @@ public class SignalClusterView
|
||||
mWifiVisible = statusIcon.visible && !mBlockWifi;
|
||||
mWifiStrengthId = statusIcon.icon;
|
||||
mWifiDescription = statusIcon.contentDescription;
|
||||
mWifiActivityId = activityIn && activityOut ? R.drawable.stat_sys_wifi_inout
|
||||
: activityIn ? R.drawable.stat_sys_wifi_in
|
||||
: activityOut ? R.drawable.stat_sys_wifi_out
|
||||
: 0;
|
||||
|
||||
apply();
|
||||
}
|
||||
@@ -283,6 +291,10 @@ public class SignalClusterView
|
||||
state.mMobileTypeDescription = typeContentDescription;
|
||||
state.mIsMobileTypeIconWide = statusType != 0 && isWide;
|
||||
state.mRoaming = roaming;
|
||||
state.mMobileActivityId = activityIn && activityOut ? R.drawable.stat_sys_signal_inout
|
||||
: activityIn ? R.drawable.stat_sys_signal_in
|
||||
: activityOut ? R.drawable.stat_sys_signal_out
|
||||
: 0;
|
||||
|
||||
apply();
|
||||
}
|
||||
@@ -405,6 +417,10 @@ public class SignalClusterView
|
||||
mWifiDark.setImageDrawable(null);
|
||||
mLastWifiStrengthId = -1;
|
||||
}
|
||||
if (mWifiActivity != null) {
|
||||
mWifiActivity.setImageDrawable(null);
|
||||
mLastWifiActivityId = -1;
|
||||
}
|
||||
|
||||
for (PhoneState state : mPhoneStates) {
|
||||
if (state.mMobile != null) {
|
||||
@@ -421,6 +437,10 @@ public class SignalClusterView
|
||||
state.mMobileType.setImageDrawable(null);
|
||||
state.mLastMobileTypeId = -1;
|
||||
}
|
||||
if (state.mMobileActivity != null) {
|
||||
state.mMobileActivity.setImageDrawable(null);
|
||||
state.mLastMobileActivityId = -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (mAirplane != null) {
|
||||
@@ -474,6 +494,12 @@ public class SignalClusterView
|
||||
setIconForView(mWifiDark, mWifiStrengthId);
|
||||
mLastWifiStrengthId = mWifiStrengthId;
|
||||
}
|
||||
if (mWifiActivityId != mLastWifiActivityId) {
|
||||
if (mWifiActivityId != 0) {
|
||||
setIconForView(mWifiActivity, mWifiActivityId);
|
||||
}
|
||||
mLastWifiActivityId = mWifiActivityId;
|
||||
}
|
||||
mWifiGroup.setContentDescription(mWifiDescription);
|
||||
mWifiGroup.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
@@ -485,6 +511,8 @@ public class SignalClusterView
|
||||
(mWifiVisible ? "VISIBLE" : "GONE"),
|
||||
mWifiStrengthId));
|
||||
|
||||
mWifiActivity.setVisibility(mWifiActivityId != 0 ? View.VISIBLE : View.GONE);
|
||||
|
||||
boolean anyMobileVisible = false;
|
||||
int firstMobileTypeId = 0;
|
||||
for (PhoneState state : mPhoneStates) {
|
||||
@@ -561,6 +589,8 @@ public class SignalClusterView
|
||||
applyDarkIntensity(
|
||||
StatusBarIconController.getDarkIntensity(mTintArea, mWifi, mDarkIntensity),
|
||||
mWifi, mWifiDark);
|
||||
setTint(mWifiActivity,
|
||||
StatusBarIconController.getTint(mTintArea, mWifiActivity, mIconTint));
|
||||
applyDarkIntensity(
|
||||
StatusBarIconController.getDarkIntensity(mTintArea, mEthernet, mDarkIntensity),
|
||||
mEthernet, mEthernetDark);
|
||||
@@ -585,15 +615,17 @@ public class SignalClusterView
|
||||
private class PhoneState {
|
||||
private final int mSubId;
|
||||
private boolean mMobileVisible = false;
|
||||
private int mMobileStrengthId = 0, mMobileTypeId = 0;
|
||||
private int mMobileStrengthId = 0, mMobileTypeId = 0, mMobileActivityId = 0;
|
||||
private int mLastMobileStrengthId = -1;
|
||||
private int mLastMobileTypeId = -1;
|
||||
private int mLastMobileActivityId = -1;
|
||||
private boolean mIsMobileTypeIconWide;
|
||||
private String mMobileDescription, mMobileTypeDescription;
|
||||
|
||||
private ViewGroup mMobileGroup;
|
||||
private ImageView mMobile, mMobileDark, mMobileType, mMobileRoaming;
|
||||
public boolean mRoaming;
|
||||
private ImageView mMobileActivity;
|
||||
|
||||
public PhoneState(int subId, Context context) {
|
||||
ViewGroup root = (ViewGroup) LayoutInflater.from(context)
|
||||
@@ -608,6 +640,7 @@ public class SignalClusterView
|
||||
mMobileDark = (ImageView) root.findViewById(R.id.mobile_signal_dark);
|
||||
mMobileType = (ImageView) root.findViewById(R.id.mobile_type);
|
||||
mMobileRoaming = (ImageView) root.findViewById(R.id.mobile_roaming);
|
||||
mMobileActivity = (ImageView) root.findViewById(R.id.mobile_inout);
|
||||
}
|
||||
|
||||
public boolean apply(boolean isSecondaryIcon) {
|
||||
@@ -622,6 +655,11 @@ public class SignalClusterView
|
||||
mMobileType.setImageResource(mMobileTypeId);
|
||||
mLastMobileTypeId = mMobileTypeId;
|
||||
}
|
||||
|
||||
if (mLastMobileActivityId != mMobileActivityId) {
|
||||
mMobileActivity.setImageResource(mMobileActivityId);
|
||||
mLastMobileActivityId = mMobileActivityId;
|
||||
}
|
||||
mMobileGroup.setContentDescription(mMobileTypeDescription
|
||||
+ " " + mMobileDescription);
|
||||
mMobileGroup.setVisibility(View.VISIBLE);
|
||||
@@ -644,6 +682,7 @@ public class SignalClusterView
|
||||
|
||||
mMobileType.setVisibility(mMobileTypeId != 0 ? View.VISIBLE : View.GONE);
|
||||
mMobileRoaming.setVisibility(mRoaming ? View.VISIBLE : View.GONE);
|
||||
mMobileActivity.setVisibility(mMobileActivityId != 0 ? View.VISIBLE : View.GONE);
|
||||
|
||||
return mMobileVisible;
|
||||
}
|
||||
@@ -705,6 +744,8 @@ public class SignalClusterView
|
||||
setTint(mMobileType, StatusBarIconController.getTint(tintArea, mMobileType, tint));
|
||||
setTint(mMobileRoaming, StatusBarIconController.getTint(tintArea, mMobileRoaming,
|
||||
tint));
|
||||
setTint(mMobileActivity,
|
||||
StatusBarIconController.getTint(tintArea, mMobileActivity, tint));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -690,6 +690,7 @@ public class NetworkControllerImpl extends BroadcastReceiver
|
||||
mDemoMode = true;
|
||||
mDemoInetCondition = mInetCondition;
|
||||
mDemoWifiState = mWifiSignalController.getState();
|
||||
mDemoWifiState.ssid = "DemoMode";
|
||||
} else if (mDemoMode && command.equals(COMMAND_EXIT)) {
|
||||
if (DEBUG) Log.d(TAG, "Exiting demo mode");
|
||||
mDemoMode = false;
|
||||
@@ -735,6 +736,25 @@ public class NetworkControllerImpl extends BroadcastReceiver
|
||||
: Math.min(Integer.parseInt(level), WifiIcons.WIFI_LEVEL_COUNT - 1);
|
||||
mDemoWifiState.connected = mDemoWifiState.level >= 0;
|
||||
}
|
||||
String activity = args.getString("activity");
|
||||
if (activity != null) {
|
||||
switch (activity) {
|
||||
case "inout":
|
||||
mWifiSignalController.setActivity(WifiManager.DATA_ACTIVITY_INOUT);
|
||||
break;
|
||||
case "in":
|
||||
mWifiSignalController.setActivity(WifiManager.DATA_ACTIVITY_IN);
|
||||
break;
|
||||
case "out":
|
||||
mWifiSignalController.setActivity(WifiManager.DATA_ACTIVITY_OUT);
|
||||
break;
|
||||
default:
|
||||
mWifiSignalController.setActivity(WifiManager.DATA_ACTIVITY_NONE);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
mWifiSignalController.setActivity(WifiManager.DATA_ACTIVITY_NONE);
|
||||
}
|
||||
mDemoWifiState.enabled = show;
|
||||
mWifiSignalController.notifyListeners();
|
||||
}
|
||||
@@ -801,7 +821,23 @@ public class NetworkControllerImpl extends BroadcastReceiver
|
||||
}
|
||||
String activity = args.getString("activity");
|
||||
if (activity != null) {
|
||||
controller.setActivity(Integer.parseInt(activity));
|
||||
controller.getState().dataConnected = true;
|
||||
switch (activity) {
|
||||
case "inout":
|
||||
controller.setActivity(TelephonyManager.DATA_ACTIVITY_INOUT);
|
||||
break;
|
||||
case "in":
|
||||
controller.setActivity(TelephonyManager.DATA_ACTIVITY_IN);
|
||||
break;
|
||||
case "out":
|
||||
controller.setActivity(TelephonyManager.DATA_ACTIVITY_OUT);
|
||||
break;
|
||||
default:
|
||||
controller.setActivity(TelephonyManager.DATA_ACTIVITY_NONE);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
controller.setActivity(TelephonyManager.DATA_ACTIVITY_NONE);
|
||||
}
|
||||
controller.getState().enabled = show;
|
||||
controller.notifyListeners();
|
||||
|
||||
@@ -163,7 +163,7 @@ public class DemoModeFragment extends PreferenceFragment implements OnPreference
|
||||
intent.putExtra("sims", "1");
|
||||
intent.putExtra("nosim", "false");
|
||||
intent.putExtra("level", "4");
|
||||
intent.putExtra("datatypel", "");
|
||||
intent.putExtra("datatype", "lte");
|
||||
getContext().sendBroadcast(intent);
|
||||
|
||||
// Need to send this after so that the sim controller already exists.
|
||||
|
||||
Reference in New Issue
Block a user