Explicit GridLayout alignment to fix warnings.
Also show lockdown VPN dialog whenever relaunched. Change-Id: Ib8aecbd4a7f9d61906f65fee39f1e819c79aabb4
This commit is contained in:
@@ -53,13 +53,14 @@
|
|||||||
android:id="@+id/op_time"
|
android:id="@+id/op_time"
|
||||||
android:layout_column="1"
|
android:layout_column="1"
|
||||||
android:layout_row="1"
|
android:layout_row="1"
|
||||||
android:layout_gravity="fill_horizontal"
|
android:layout_gravity="fill_horizontal|top"
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
android:textAlignment="viewStart" />
|
android:textAlignment="viewStart" />
|
||||||
|
|
||||||
<Switch android:id="@+id/switchWidget"
|
<Switch android:id="@+id/switchWidget"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_marginStart="8dip"
|
android:layout_marginStart="8dip"
|
||||||
android:layout_column="2"
|
android:layout_column="2"
|
||||||
android:layout_row="0"
|
android:layout_row="0"
|
||||||
|
@@ -50,13 +50,14 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/op_name"
|
android:id="@+id/op_name"
|
||||||
android:layout_width="0dip"
|
android:layout_width="0dip"
|
||||||
android:layout_gravity="fill_horizontal"
|
android:layout_gravity="fill_horizontal|top"
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
android:textAlignment="viewStart" />
|
android:textAlignment="viewStart" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/op_time"
|
android:id="@+id/op_time"
|
||||||
android:layout_marginStart="8dip"
|
android:layout_marginStart="8dip"
|
||||||
|
android:layout_gravity="top"
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall" />
|
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||||
|
|
||||||
</GridLayout>
|
</GridLayout>
|
||||||
|
@@ -52,7 +52,7 @@
|
|||||||
android:id="@android:id/progress"
|
android:id="@android:id/progress"
|
||||||
android:layout_height="12dip"
|
android:layout_height="12dip"
|
||||||
android:layout_columnSpan="2"
|
android:layout_columnSpan="2"
|
||||||
android:layout_gravity="fill_horizontal"
|
android:layout_gravity="fill_horizontal|top"
|
||||||
android:layout_marginTop="4dip"
|
android:layout_marginTop="4dip"
|
||||||
android:max="100"
|
android:max="100"
|
||||||
android:progressDrawable="@drawable/data_usage_bar"
|
android:progressDrawable="@drawable/data_usage_bar"
|
||||||
@@ -61,7 +61,7 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:id="@android:id/summary"
|
android:id="@android:id/summary"
|
||||||
android:layout_width="0dip"
|
android:layout_width="0dip"
|
||||||
android:layout_gravity="fill_horizontal"
|
android:layout_gravity="fill_horizontal|top"
|
||||||
android:layout_columnSpan="2"
|
android:layout_columnSpan="2"
|
||||||
android:layout_marginTop="4dip"
|
android:layout_marginTop="4dip"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
|
@@ -58,13 +58,14 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/app_size"
|
android:id="@+id/app_size"
|
||||||
android:layout_width="0dip"
|
android:layout_width="0dip"
|
||||||
android:layout_gravity="fill_horizontal"
|
android:layout_gravity="fill_horizontal|top"
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
android:textAlignment="viewStart" />
|
android:textAlignment="viewStart" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/app_disabled"
|
android:id="@+id/app_disabled"
|
||||||
android:layout_marginStart="8dip"
|
android:layout_marginStart="8dip"
|
||||||
|
android:layout_gravity="top"
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall" />
|
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||||
|
|
||||||
</GridLayout>
|
</GridLayout>
|
||||||
|
@@ -62,7 +62,7 @@
|
|||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="0dip"
|
android:layout_width="0dip"
|
||||||
android:layout_gravity="fill_horizontal">
|
android:layout_gravity="fill_horizontal|top">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/description"
|
android:id="@+id/description"
|
||||||
|
@@ -54,7 +54,7 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/provider_id"
|
android:id="@+id/provider_id"
|
||||||
android:layout_width="0dip"
|
android:layout_width="0dip"
|
||||||
android:layout_gravity="fill_horizontal"
|
android:layout_gravity="fill_horizontal|top"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:ellipsize="marquee"
|
android:ellipsize="marquee"
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
@@ -91,12 +91,6 @@ public class VpnSettings extends SettingsPreferenceFragment implements
|
|||||||
setHasOptionsMenu(true);
|
setHasOptionsMenu(true);
|
||||||
addPreferencesFromResource(R.xml.vpn_settings2);
|
addPreferencesFromResource(R.xml.vpn_settings2);
|
||||||
|
|
||||||
final boolean pickLockdown = getActivity()
|
|
||||||
.getIntent().getBooleanExtra(EXTRA_PICK_LOCKDOWN, false);
|
|
||||||
if (pickLockdown) {
|
|
||||||
LockdownConfigFragment.show(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (savedState != null) {
|
if (savedState != null) {
|
||||||
VpnProfile profile = VpnProfile.decode(savedState.getString("VpnKey"),
|
VpnProfile profile = VpnProfile.decode(savedState.getString("VpnKey"),
|
||||||
savedState.getByteArray("VpnProfile"));
|
savedState.getByteArray("VpnProfile"));
|
||||||
@@ -162,6 +156,12 @@ public class VpnSettings extends SettingsPreferenceFragment implements
|
|||||||
public void onResume() {
|
public void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
|
|
||||||
|
final boolean pickLockdown = getActivity()
|
||||||
|
.getIntent().getBooleanExtra(EXTRA_PICK_LOCKDOWN, false);
|
||||||
|
if (pickLockdown) {
|
||||||
|
LockdownConfigFragment.show(this);
|
||||||
|
}
|
||||||
|
|
||||||
// Check KeyStore here, so others do not need to deal with it.
|
// Check KeyStore here, so others do not need to deal with it.
|
||||||
if (!mKeyStore.isUnlocked()) {
|
if (!mKeyStore.isUnlocked()) {
|
||||||
if (!mUnlocking) {
|
if (!mUnlocking) {
|
||||||
|
Reference in New Issue
Block a user