Skip to content

Commit 7c48b9d

Browse files
committed
Importing DangerousApp.
1 parent 9991cc5 commit 7c48b9d

File tree

24 files changed

+512
-0
lines changed

24 files changed

+512
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.gradle
2+
/local.properties
3+
/.idea/workspace.xml
4+
.DS_Store
5+
app/build
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
apply plugin: 'android'
2+
3+
android {
4+
compileSdkVersion 18
5+
buildToolsVersion "19.0.1"
6+
7+
defaultConfig {
8+
minSdkVersion 13
9+
targetSdkVersion 18
10+
}
11+
12+
buildTypes {
13+
release {
14+
runProguard false
15+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
16+
}
17+
}
18+
}
19+
20+
dependencies {
21+
compile 'com.android.support:support-v4:+'
22+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="course.labs.dangerousapp"
4+
android:versionCode="1"
5+
android:versionName="1.0" >
6+
7+
<uses-sdk
8+
android:minSdkVersion="13"
9+
android:targetSdkVersion="18" />
10+
11+
<!--
12+
TODO - Using a permission element,
13+
define a custom permission with name
14+
"course.labs.permissions.DANGEROUS_ACTIVITY_PERM"
15+
and "dangerous" protection level.
16+
-->
17+
18+
<application
19+
android:allowBackup="true"
20+
android:icon="@drawable/ic_launcher"
21+
android:label="@string/app_name"
22+
android:theme="@style/AppTheme" >
23+
24+
<!-- TODO - enforce the custom permission on this Activity -->
25+
26+
<activity
27+
android:name=".DangerousActivity"
28+
android:label="@string/app_name" >
29+
30+
<!--
31+
TODO - add additional intent filter info so that this Activity
32+
will respond to an Implicit Intent with the action
33+
"course.labs.permissions.DANGEROUS_ACTIVITY"
34+
-->
35+
36+
37+
<intent-filter>
38+
<action android:name="android.intent.action.MAIN" />
39+
40+
<category android:name="android.intent.category.LAUNCHER" />
41+
</intent-filter>
42+
</activity>
43+
</application>
44+
45+
</manifest>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package course.labs.dangerousapp;
2+
3+
import android.app.Activity;
4+
import android.os.Bundle;
5+
6+
public class DangerousActivity extends Activity {
7+
8+
@Override
9+
protected void onCreate(Bundle savedInstanceState) {
10+
super.onCreate(savedInstanceState);
11+
setContentView(R.layout.activity_main);
12+
}
13+
14+
}
7.48 KB
Loading
3.69 KB
Loading
12.2 KB
Loading
24.2 KB
Loading
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
xmlns:tools="http://schemas.android.com/tools"
3+
android:layout_width="match_parent"
4+
android:layout_height="match_parent"
5+
android:paddingBottom="@dimen/activity_vertical_margin"
6+
android:paddingLeft="@dimen/activity_horizontal_margin"
7+
android:paddingRight="@dimen/activity_horizontal_margin"
8+
android:paddingTop="@dimen/activity_vertical_margin"
9+
tools:context=".DangerousActivity" >
10+
11+
<TextView
12+
android:layout_width="wrap_content"
13+
android:layout_height="wrap_content"
14+
android:text="@string/hello_world" />
15+
16+
</RelativeLayout>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
2+
3+
</menu>

0 commit comments

Comments
 (0)