Skip to content

Commit

Permalink
Merge pull request #350 from SecUpwN/development
Browse files Browse the repository at this point in the history
WIP-Release v0.1.25-alpha-build-35
  • Loading branch information
SecUpwN committed Mar 13, 2015
2 parents 4cca796 + fc4064f commit e924755
Show file tree
Hide file tree
Showing 19 changed files with 772 additions and 115 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
# CHANGELOG of 'AIMSICD'
----------------------

#### 13.03.2015 - [WIP-Release v0.1.25-alpha-build-35](https://github.com/SecUpwN/Android-IMSI-Catcher-Detector/releases/tag/v0.1.25-alpha-b35)

* Changed: Tried to fix the progress bar in the `RequestTask` Download Request
* Updated: Polished CellTracker from junk comments, added TAGs to Helpers and Device
* Added: New tab strip across the view pager to make it obvious that it can be swiped
* Added: New CreditsRoll with awesome Star Wars theme in the About-Menu of our AIMSICD
* Fixed: NC detection logic and added more Logs to be removed or verbose, once working
* Fixed: Better log function in `CellTracker.java` and corrected TAG in `DeviceAPI17`

---

#### 05.03.2015 - [WIP-Release v0.1.25-alpha-build-34](https://github.com/SecUpwN/Android-IMSI-Catcher-Detector/releases/tag/v0.1.25-alpha-b34)

* Updated: `SCREENSHOTS` have been updated to reflect the latest changes of UI/UX
Expand Down
1 change: 1 addition & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ dependencies {
// compile 'com.github.amlcurran.showcaseview:library:5.0.0'
compile fileTree(dir: 'libs', include: '*.jar')
compile project(':third_party:rootshell')
compile files ('libs/nineoldandroids-2.4.0.jar')
compile 'com.android.support:support-v4:19.1.0'
compile 'org.osmdroid:osmdroid-android:4.2'
compile 'eu.lp0.slf4j:slf4j-android:1.7+'
Expand Down
Binary file added app/libs/nineoldandroids-2.4.0.jar
Binary file not shown.
6 changes: 4 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.SecUpwN.AIMSICD"
android:versionCode="25"
android:versionName="0.1.25-alpha-b34">
android:versionName="0.1.25-alpha-b35">

<!-- If we ever wanna make this a system app, we can add the following 2 lines above:
coreApp="true"
Expand Down Expand Up @@ -181,7 +181,9 @@
<action android:name="android.provider.Telephony.SMS_RECEIVED"/>
</intent-filter>
</receiver>

<activity android:name=".activities.CreditsRollActivity"
android:theme="@android:style/Theme.Black"
android:screenOrientation="portrait"> </activity>
</application>

</manifest>
9 changes: 8 additions & 1 deletion app/src/main/java/com/SecUpwN/AIMSICD/AIMSICD.java
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ public void onItemClick(AdapterView<?> parent, View view, int position, long id)
/** Swaps fragments in the main content view */
void selectItem(int position) {
NavDrawerItem selectedItem = mNavConf.getNavItems().get(position);
String title = selectedItem.getLabel();

/**
* This is a work-around for Issue 42601
Expand All @@ -251,11 +252,15 @@ void selectItem(int position) {
getSupportFragmentManager().beginTransaction()
.replace(R.id.content_frame, mDetailsFrag).commit();
mDetailsFrag.setCurrentPage(0);
// exception: title here does not match nav drawer label
title = getString(R.string.app_name_short);
break;
case 102:
getSupportFragmentManager().beginTransaction()
.replace(R.id.content_frame, mDetailsFrag).commit();
mDetailsFrag.setCurrentPage(1);
// exception: title here does not match nav drawer label
title = getString(R.string.app_name_short);
break;
case 103:
getSupportFragmentManager().beginTransaction()
Expand All @@ -265,6 +270,8 @@ void selectItem(int position) {
getSupportFragmentManager().beginTransaction()
.replace(R.id.content_frame, mDetailsFrag).commit();
mDetailsFrag.setCurrentPage(2);
// exception: title here does not match nav drawer label
title = getString(R.string.app_name_short);
break;
case 303:
getSupportFragmentManager().beginTransaction()
Expand Down Expand Up @@ -364,7 +371,7 @@ void selectItem(int position) {
mDrawerList.setItemChecked(position, true);

if ( selectedItem.updateActionBarTitle()) {
setTitle(selectedItem.getLabel());
setTitle(title);
}

if ( this.mDrawerLayout.isDrawerOpen(this.mDrawerList)) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
package com.SecUpwN.AIMSICD.activities;

/*
* Copyright 2014 Frakbot (Sebastiano Poggi and Francesco Pontillo)
*
* 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.*/

/*
Edited by Paul Kinsella paulkinsella29@yahoo.ie
*/

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.animation.LinearInterpolator;
import android.widget.SeekBar;
import android.widget.Toast;

import com.SecUpwN.AIMSICD.R;
import com.SecUpwN.AIMSICD.fragments.CreditsRollView;
import com.SecUpwN.AIMSICD.utils.MiscUtils;
import com.nineoldandroids.animation.Animator;
import com.nineoldandroids.animation.ObjectAnimator;
import com.nineoldandroids.animation.ValueAnimator;

//import android.animation.Animator;
//import android.animation.ObjectAnimator;
//import android.animation.ValueAnimator;


public class CreditsRollActivity extends Activity implements SeekBar.OnSeekBarChangeListener {

private static final float SCROLL_ANIM_DURATION = 20000; // [ms] = 30 s

private CreditsRollView mCreditsRollView;
private boolean mScrolling;
private SeekBar mSeekBar;
private ValueAnimator mScrollAnimator;

protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.creditroll);

mSeekBar = (SeekBar) findViewById(R.id.seekbar);
mSeekBar.setOnSeekBarChangeListener(this);

mCreditsRollView = (CreditsRollView) findViewById(R.id.creditsroll);
mCreditsRollView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (!mScrolling) {
mCreditsRollView.setText(MiscUtils.setAssetsString(getApplicationContext()));
animateScroll();
}
else {
stopScrollAnimation();
}
}
});

if (!mScrolling) {
mCreditsRollView.setText(MiscUtils.setAssetsString(getApplicationContext()));
animateScroll();
}
}

@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
mCreditsRollView.setScrollPosition(progress / 100000f); // We have increments of 1/100000 %
}

@Override
public void onStartTrackingTouch(SeekBar seekBar) {
if (mScrolling) {
stopScrollAnimation();
}
}

@Override
public void onStopTrackingTouch(SeekBar seekBar) {
// Don't care
}

private void animateScroll() {
mScrolling = true;
mScrollAnimator = ObjectAnimator.ofInt(mSeekBar, "progress", mSeekBar.getProgress(), mSeekBar.getMax());
mScrollAnimator.setDuration(
(long) (SCROLL_ANIM_DURATION * (4 - (float) mSeekBar.getProgress() / mSeekBar.getMax())));
mScrollAnimator.setInterpolator(new LinearInterpolator());
mScrollAnimator.addListener(new Animator.AnimatorListener() {
@Override
public void onAnimationStart(Animator animation) {
// Don't care
}

@Override
public void onAnimationEnd(Animator animation) {
mScrolling = false;
}

@Override
public void onAnimationCancel(Animator animation) {
// Don't care
}

@Override
public void onAnimationRepeat(Animator animation) {
// Don't care
}
});
mScrollAnimator.start();
}

private void stopScrollAnimation() {
if (mScrollAnimator != null) {
mScrollAnimator.cancel();
mScrollAnimator = null;
}
}
}

Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
package com.SecUpwN.AIMSICD.adapters;

import android.content.Context;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.SecUpwN.AIMSICD.R;
import com.SecUpwN.AIMSICD.fragments.CellInfoFragment;
import com.SecUpwN.AIMSICD.fragments.DbViewerFragment;
import com.SecUpwN.AIMSICD.fragments.DeviceFragment;
Expand All @@ -12,9 +14,11 @@
* Adapter to allow swiping between various detail fragments
*/
public class DetailsPagerAdapter extends FragmentPagerAdapter {
Context context;

public DetailsPagerAdapter(FragmentManager fm) {
public DetailsPagerAdapter(FragmentManager fm, Context context) {
super(fm);
this.context = context;
}

@Override
Expand All @@ -40,6 +44,17 @@ public long getItemId(int position) {
return -1;
}

@Override
public CharSequence getPageTitle(int position) {
switch (position) {
case 0: return context.getString(R.string.device_info);
case 1: return context.getString(R.string.cell_info_title);
case 2: return context.getString(R.string.db_viewer);
}

return "";
}

@Override
public int getCount() {
return 3;
Expand Down
24 changes: 20 additions & 4 deletions app/src/main/java/com/SecUpwN/AIMSICD/fragments/AboutFragment.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.SecUpwN.AIMSICD.fragments;

import com.SecUpwN.AIMSICD.R;
import com.SecUpwN.AIMSICD.activities.CreditsRollActivity;

import android.app.Activity;
import android.content.Context;
Expand All @@ -21,13 +22,14 @@
public class AboutFragment extends Fragment {

private Context mContext;

Button btncredits;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
Bundle savedInstanceState) {

View v = inflater.inflate(R.layout.about_fragment, container, false);
String version;
btncredits = (Button) v.findViewById(R.id.aimsicd_credits_link);

PackageManager manager = mContext.getPackageManager();
try {
Expand Down Expand Up @@ -82,8 +84,8 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,
setLink(tv, R.string.aimsicd_license_link);

//Credits Link
tv = v.findViewById(R.id.aimsicd_credits_link);
setLink(tv, R.string.aimsicd_credits_link);
//tv = v.findViewById(R.id.aimsicd_credits_link);
//setLink(tv, R.string.aimsicd_credits_link);
}
return v;
}
Expand All @@ -97,6 +99,20 @@ public void onClick(View view) {
startActivity(intent);
}
});

btncredits.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
try {
Intent i = new Intent(mContext, CreditsRollActivity.class);
startActivity(i);

} catch (Exception e) {
e.printStackTrace();
}
}
});

}

@Override
Expand Down
Loading

0 comments on commit e924755

Please sign in to comment.