
When a new repo is being added, whether manually or via an incoming Intent, check the address and fingerprint against repos in the DB. If the repo is not in the DB, offer to add it. If the repo address is in the DB, then do more checks: * If that address has no fingerprint in the DB, then offer to add the new repo including that fingerprint. This might happen when upgrading a repo from unsigned to signed. * if the incoming info matches a repo in the DB, offer to enable that repo * if the address matches a repo in the DB but the incoming fingerprint does not match the fingerprint in the DB, warn the user, and tell them to delete the existing repo if they truly want to override the existing info
63 lines
2.3 KiB
XML
63 lines
2.3 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical" >
|
|
|
|
<TextView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/repo_add_url" />
|
|
|
|
<EditText
|
|
android:id="@+id/edit_uri"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:inputType="textUri"
|
|
android:maxLines="2"
|
|
android:text="https://" />
|
|
|
|
<TextView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/repo_add_fingerprint" />
|
|
|
|
<EditText
|
|
android:id="@+id/edit_fingerprint"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:digits="0123456789ABCDEFabcedf: "
|
|
android:inputType="textNoSuggestions"
|
|
android:maxLines="3"
|
|
android:typeface="monospace" />
|
|
|
|
<TextView
|
|
android:id="@+id/overwrite_message"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:drawableLeft="@android:drawable/ic_dialog_alert"
|
|
android:drawablePadding="20dp"
|
|
android:padding="20dp"
|
|
android:text="@string/repo_delete_to_overwrite"
|
|
android:textAppearance="@android:style/TextAppearance.Medium"
|
|
android:visibility="gone" />
|
|
|
|
</LinearLayout><!--
|
|
* Copyright (C) 2009 Roberto Jacinto
|
|
* roberto.jacinto@caixamagica.pt
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License
|
|
* as published by the Free Software Foundation; either version 2
|
|
* of the License, or (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
-->
|