From f63f95404ea848bfce43b09dea274d4b8b7c7744 Mon Sep 17 00:00:00 2001 From: Jake McGinty Date: Sun, 22 Jun 2014 16:14:05 -0700 Subject: [PATCH] remove ReviewIdentitiesActivity // FREEBIE --- AndroidManifest.xml | 6 +- .../contacts_identities_dark.png | Bin 949 -> 0 bytes .../contacts_identities_light.png | Bin 910 -> 0 bytes .../contacts_identities_dark.png | Bin 575 -> 0 bytes .../contacts_identities_light.png | Bin 546 -> 0 bytes .../contacts_identities_dark.png | Bin 1333 -> 0 bytes .../contacts_identities_light.png | Bin 1254 -> 0 bytes res/layout/review_identities.xml | 10 -- res/layout/review_identities_fragment.xml | 22 ----- res/values/arrays.xml | 4 - res/values/strings.xml | 1 - .../securesms/ConversationListActivity.java | 3 - .../securesms/ReviewIdentitiesActivity.java | 57 ----------- .../securesms/ReviewIdentitiesFragment.java | 92 ------------------ 14 files changed, 1 insertion(+), 194 deletions(-) delete mode 100644 res/drawable-hdpi/contacts_identities_dark.png delete mode 100644 res/drawable-hdpi/contacts_identities_light.png delete mode 100644 res/drawable-mdpi/contacts_identities_dark.png delete mode 100644 res/drawable-mdpi/contacts_identities_light.png delete mode 100644 res/drawable-xhdpi/contacts_identities_dark.png delete mode 100644 res/drawable-xhdpi/contacts_identities_light.png delete mode 100644 res/layout/review_identities.xml delete mode 100644 res/layout/review_identities_fragment.xml delete mode 100644 src/org/thoughtcrime/securesms/ReviewIdentitiesActivity.java delete mode 100644 src/org/thoughtcrime/securesms/ReviewIdentitiesFragment.java diff --git a/AndroidManifest.xml b/AndroidManifest.xml index c74ddf472d..2eb58acc42 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -172,11 +172,7 @@ android:label="@string/AndroidManifest__verify_identity" android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/> - - - diff --git a/res/drawable-hdpi/contacts_identities_dark.png b/res/drawable-hdpi/contacts_identities_dark.png deleted file mode 100644 index 158a24520d0fb320bdc1422f7e761725009a1b5a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d#! zClPxfZ(|77%7{JiP*E)Pmqfc{*sfGlepjuZ&V6k zy?z;E&ih5b^-m7cGTU8{R3fs~YZ_TqFL25uX$?y5*`@tyeO2phuDQ>=>de?JQmTu8 z(lIW^LAH?Z2?U0WhaC%89t-X#fBK07*qoM6N<$g4E)?RsaA1 diff --git a/res/drawable-mdpi/contacts_identities_dark.png b/res/drawable-mdpi/contacts_identities_dark.png deleted file mode 100644 index b14d071961ebaee13e038c093e9d643af7a72449..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 575 zcmV-F0>J%=P)kdg00068NklbYcEGatMm+Z9w?;j;@DnMN72_UD~mwW3jpKI4YnwWF|z zSDkfCgI1lYT#&NpmU{b~G9~MxDxF#!)u7cCyYuaPy^$4~GbiJ_p&)SBq|ZW0NiQ4; z0>i$`m@_Ao^~T;cz=YM@uV3+2vu(NkYW3<>=T_S_duJurA*&|V04>_Z#GKQvItVnG z@=TjrB}&z5^URc{AW);-IWaNq8|sjk%rPm;mV`ctoAFU-$+DEOO&dz7iM&Rdmz2!w z%8aKnJ`(W~_*c=&N{<(PEEB1`QO^phx!nANT)S`~U$)cYRyHLNNdU N002ovPDHLkV1ljj3#tGB diff --git a/res/drawable-mdpi/contacts_identities_light.png b/res/drawable-mdpi/contacts_identities_light.png deleted file mode 100644 index 67f74fb4381983b091a2300752b57c9c3a1653a7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 546 zcmV+-0^R+IP)kdg0005$Nkl9OG>0Yk>CZ)J&kzvbeKYS}jTXFDa8bfDPd)Tmsvgj0%_FBna9xj&3i=LB>7`G4J=Pq8 zYZjbs-2Jq)*Pd(EFZNY$&FcfZ`Zbx7Hg8f};}Rbjbk$WUqt3aj?7OG>TyVpxiV^3G zO1Yw6%2?eZbz4_al$90R_a+2=mK7A`<$Z8D1oQUAva*UQ)^#5Mmh6j^lvR9@bgFva z;gUWb)zfK78!F05BKwvO0E31N88T#8dk7L%t+=C0lV)9RTe0d^2s&#z2an3bqLQM5 z$d-(ZEs=tvlEuFUO0#rLkaF_!ay5ZUYdRh<@`oJOXL95?d#j9H(J|V!aYUR$2*G)C kX3ZRZ|Mid64^+hdRV`F81ONa407*qoM6N<$g4tI9+yDRo diff --git a/res/drawable-xhdpi/contacts_identities_dark.png b/res/drawable-xhdpi/contacts_identities_dark.png deleted file mode 100644 index 84cfac9cd051c1cef389a601454596c7503c9522..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1333 zcmV-516R3u&o~3MO);RuIIc4G|Tw8`M@p>P51VAR-{tD3Rk( zsj4cWC`v^kQWKZj&|GTL8bc*YOKm(c$=okzY=@>%|B+uGJehdx@%Tn~n)SWR>~q%o zzO&C-YpQ=Y9)va!ITaszE#}TKUbF@T6KL3_?#T6MJ>+_1czZmkZ z4!I;!kd_b^mylKvx#WW1stA1l#thIwYMvtWquU&S!w62#2t6I7X5ntGl)_?@l{QR7LkHe z-QaIF*&!x1Ls)-}64h*QMyp9k`bBWOC_i8`oN1JIAB~{&RaIt^zRlK zcOV2Wxav3V3LyjyTKvhxyp1S?5bQPLnqjZ$(QneI-63f9zPz}|Yu3%_`*T^5L7PLc z+rRwJnB#h!RxqZ0p{Kz%FBovyr~a(VmeT6O(xn7D?)EBPYweemm-cXJWs6Sz#>D;A ze%lsCeycW3rR{GBAq2O3VCq=5PfA8Y!3BHVTJe6{oEFJT*;hJ-ADEJeiuEn|3{hB=mZ;BwAuHn@2R-F+-?QII2?dd{68)okB@F4&u1%{B z-3Dd7?diG68y%GsNy;foyX>;GqO7E%$YC2ou+u4dIVq8%l%%ABagm%;c7|Ys!wQO$ zvK4W1k|H@rHC7k!lF4cFZbDL`)JU@mK5}Gg)2;P{H(ivJmsgONbkUohu(tFPU-hv< zsi`MQk#5Y+lU}Muf4}&QgZRdP^`TC;RovZRtH*SC&U3mvX6sbGl&?4G^x+&sTw2`y zvjrS;O+hpRMLEBns^t(uu)-}hbLbW;%AfCYOipoD%z|r<&2~MZ*Qr@}%TLO8Y|-I$ zeV%k@Rq{JMsn6>=%7weav;J5mYOfQs-Pc%M1*^*KxXX}9Ia!elj%xQ!O&T@Y>^|*| zx*(F3GigZI^?qqp)wpXGHzhylyyCQpV5&+!HEP6&QI|?tKK=T64}M-hNgfiDuaca} zX-HHVNn#%QJm|k;bdl50jeUsu_Hya(@b@LsPe~YZ$8zW!95JzE`nb3WM=CqS;so4l ztZH*wIMT-4yL17+TI48NeLU@1D*bJSXH4}=LCQZX+xWr-bhzq@$z|e-|LRzpfV~Es rb!M43Yrx+6ADeZnTixnbx4G^ADOgGq9R959?6#7ejzCYcUbG}EW zmo7VN*F$a6S5p|;C{BCiKQ-c(MGI~^?NA81Ot-Q8kIOKvD+Gs}cGH4Iw~Vx17^h?` zi{<4N-1kWcj>)H+t{p`3j)mZg`wH^%V#^jDuS+xfcf^Wyef`G}oZUnLszo>(fo znWES`tvfvi$IrmNJ^^)EcFFO!|x5Xl{Ti*4a-!{RoeI`~g5Q67xQF`_IiC-zW(0msh zvZ&xUb@%q#XP-H-yo?uHY~aA{w)@PIL#+oxK_)|n8DsK_b# z(!QqtqY@P(A^5;IKK4Qy=OtfSZaIiT2*F7U9-8+zVd_x#iQk7SlN#9}#RpLni;*Dhy7iehin96p^fPZ`zfLw@bcON{9ODIMwTA zBaP^f$gMeuA2}rE3|IT2_VzYCj(b1FaXr<3sXg!Z2Xh-J=vdB?^$A?|P_hnX1%IjT z<&=0w(;nLKI1w+ntf<@|>O+^;yMF4LtLyN^ei*p0WTXg=C(vZ(Xv^?_SRH!BRsP?mHetH zN1PXNh($07*qoM6N<$f~pK_-T(jq diff --git a/res/layout/review_identities.xml b/res/layout/review_identities.xml deleted file mode 100644 index 26b43e80d9..0000000000 --- a/res/layout/review_identities.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - diff --git a/res/layout/review_identities_fragment.xml b/res/layout/review_identities_fragment.xml deleted file mode 100644 index 3bb2346703..0000000000 --- a/res/layout/review_identities_fragment.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/res/values/arrays.xml b/res/values/arrays.xml index 9285df884d..6e2c2e57fa 100644 --- a/res/values/arrays.xml +++ b/res/values/arrays.xml @@ -128,24 +128,20 @@ @string/arrays__import_export @string/arrays__my_identity_key - @string/arrays__contact_keys import_export my_identity_key - contact_identity_keys @drawable/import_export_light @drawable/my_identity_light - @drawable/contacts_identities_light @drawable/import_export_dark @drawable/my_identity_dark - @drawable/contacts_identities_dark diff --git a/res/values/strings.xml b/res/values/strings.xml index b09d2b791c..61fc5bd2ed 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -670,7 +670,6 @@ Import / Export My identity key - Contact keys General diff --git a/src/org/thoughtcrime/securesms/ConversationListActivity.java b/src/org/thoughtcrime/securesms/ConversationListActivity.java index fdb97d74e8..cf95f92efc 100644 --- a/src/org/thoughtcrime/securesms/ConversationListActivity.java +++ b/src/org/thoughtcrime/securesms/ConversationListActivity.java @@ -128,9 +128,6 @@ public class ConversationListActivity extends PassphraseRequiredSherlockFragment } else if (selected.equals("my_identity_key")) { intent = new Intent(this, ViewLocalIdentityActivity.class); intent.putExtra("master_secret", masterSecret); - } else if (selected.equals("contact_identity_keys")) { - intent = new Intent(this, ReviewIdentitiesActivity.class); - intent.putExtra("master_secret", masterSecret); } else { return; } diff --git a/src/org/thoughtcrime/securesms/ReviewIdentitiesActivity.java b/src/org/thoughtcrime/securesms/ReviewIdentitiesActivity.java deleted file mode 100644 index 4f3cda5ad5..0000000000 --- a/src/org/thoughtcrime/securesms/ReviewIdentitiesActivity.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Copyright (C) 2011 Whisper Systems - * - * 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 3 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, see . - */ -package org.thoughtcrime.securesms; - -import android.os.Bundle; - -import com.actionbarsherlock.app.SherlockFragmentActivity; -import com.actionbarsherlock.view.MenuItem; - -import org.thoughtcrime.securesms.util.DynamicLanguage; -import org.thoughtcrime.securesms.util.DynamicTheme; - -public class ReviewIdentitiesActivity extends SherlockFragmentActivity { - - private final DynamicTheme dynamicTheme = new DynamicTheme(); - private final DynamicLanguage dynamicLanguage = new DynamicLanguage(); - - @Override - public void onCreate(Bundle bundle) { - dynamicTheme.onCreate(this); - dynamicLanguage.onCreate(this); - super.onCreate(bundle); - setContentView(R.layout.review_identities); - getSupportActionBar().setDisplayHomeAsUpEnabled(true); - } - - @Override - public void onResume() { - super.onResume(); - dynamicTheme.onResume(this); - dynamicLanguage.onResume(this); - getSupportActionBar().setTitle(R.string.AndroidManifest__manage_identity_keys); - } - - @Override - public boolean onOptionsItemSelected(MenuItem item) { - switch (item.getItemId()) { - case android.R.id.home: finish(); return true; - } - - return false; - } -} \ No newline at end of file diff --git a/src/org/thoughtcrime/securesms/ReviewIdentitiesFragment.java b/src/org/thoughtcrime/securesms/ReviewIdentitiesFragment.java deleted file mode 100644 index 73aae03e27..0000000000 --- a/src/org/thoughtcrime/securesms/ReviewIdentitiesFragment.java +++ /dev/null @@ -1,92 +0,0 @@ -package org.thoughtcrime.securesms; - -import android.content.Context; -import android.content.Intent; -import android.database.Cursor; -import android.os.Bundle; -import android.support.v4.app.LoaderManager; -import android.support.v4.content.Loader; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; -import android.widget.CursorAdapter; -import android.widget.ListView; - -import com.actionbarsherlock.app.SherlockListFragment; -import org.whispersystems.textsecure.crypto.MasterSecret; -import org.thoughtcrime.securesms.database.DatabaseFactory; -import org.thoughtcrime.securesms.database.IdentityDatabase; -import org.thoughtcrime.securesms.database.loaders.IdentityLoader; - -public class ReviewIdentitiesFragment extends SherlockListFragment - implements LoaderManager.LoaderCallbacks -{ - private MasterSecret masterSecret; - - @Override - public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle bundle) { - return inflater.inflate(R.layout.review_identities_fragment, container, false); - } - - @Override - public void onActivityCreated(Bundle bundle) { - super.onActivityCreated(bundle); - this.masterSecret = getSherlockActivity().getIntent().getParcelableExtra("master_secret"); - - initializeListAdapter(); - getLoaderManager().initLoader(0, null, this); - } - - @Override - public void onListItemClick(ListView listView, View view, int position, long id) { - Intent viewIntent = new Intent(getActivity(), ViewIdentityActivity.class); - viewIntent.putExtra("identity_key", ((IdentityKeyView)view).getIdentityKey()); - viewIntent.putExtra("title", ((IdentityKeyView)view).getRecipient().toShortString() + " " + - getString(R.string.ViewIdentityActivity_identity_fingerprint)); - startActivity(viewIntent); - } - - private void initializeListAdapter() { - this.setListAdapter(new IdentitiesListAdapter(getActivity(), null, masterSecret)); - getLoaderManager().restartLoader(0, null, this); - } - - @Override - public Loader onCreateLoader(int id, Bundle args) { - return new IdentityLoader(getActivity()); - } - - @Override - public void onLoadFinished(Loader loader, Cursor cursor) { - ((CursorAdapter)getListAdapter()).changeCursor(cursor); - } - - @Override - public void onLoaderReset(Loader loader) { - ((CursorAdapter)getListAdapter()).changeCursor(null); - } - - private class IdentitiesListAdapter extends CursorAdapter { - private final MasterSecret masterSecret; - private final LayoutInflater inflater; - - public IdentitiesListAdapter(Context context, Cursor cursor, MasterSecret masterSecret) { - super(context, cursor); - this.masterSecret = masterSecret; - this.inflater = LayoutInflater.from(context); - } - - @Override - public void bindView(View view, Context context, Cursor cursor) { - IdentityDatabase.Reader reader = DatabaseFactory.getIdentityDatabase(context) - .readerFor(masterSecret, cursor); - - ((IdentityKeyView)view).set(reader.getCurrent()); - } - - @Override - public View newView(Context context, Cursor cursor, ViewGroup parent) { - return inflater.inflate(R.layout.identity_key_view, parent, false); - } - } -} \ No newline at end of file