android: Hide app selection in profile editor on Android < 5

This commit is contained in:
Tobias Brunner
2017-09-04 10:41:25 +02:00
parent 0b4f7d646b
commit 98ab757284
2 changed files with 9 additions and 0 deletions
@@ -22,6 +22,7 @@ import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.AsyncTask;
import android.os.Build;
import android.os.Bundle;
import android.security.KeyChain;
import android.security.KeyChainAliasCallback;
@@ -187,6 +188,13 @@ public class VpnProfileDetailActivity extends AppCompatActivity
mName.setAdapter(completeAdapter);
mRemoteId.setAdapter(completeAdapter);
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP)
{
findViewById(R.id.apps).setVisibility(View.GONE);
mSelectSelectedAppsHandling.setVisibility(View.GONE);
mSelectApps.setVisibility(View.GONE);
}
mGateway.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {}
@@ -341,6 +341,7 @@
android:text="@string/profile_split_tunnelingv6_title" />
<TextView
android:id="@+id/apps"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"