Skip to content

Commit 224b9c4

Browse files
committed
add PrizeFlash
1 parent 6fa89d7 commit 224b9c4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1007
-0
lines changed

PrizeFlash/Android.mk

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
LOCAL_PATH:= $(call my-dir)
2+
include $(CLEAR_VARS)
3+
4+
LOCAL_MODULE_TAGS := optional
5+
6+
LOCAL_SRC_FILES := $(call all-subdir-java-files)
7+
LOCAL_PACKAGE_NAME := PrizeFlash
8+
LOCAL_CERTIFICATE := platform
9+
10+
LOCAL_PROGUARD_ENABLED := custom
11+
LOCAL_PROGUARD_FLAG_FILES := proguard.cfg
12+
LOCAL_PRIVILEGED_MODULE := true
13+
14+
include $(BUILD_PACKAGE)

PrizeFlash/AndroidManifest.xml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="com.prize.flash"
4+
android:versionCode="1"
5+
android:versionName="1.0"
6+
android:sharedUserId="android.uid.system" >
7+
<uses-sdk
8+
android:minSdkVersion="19"
9+
android:targetSdkVersion="21" />
10+
11+
<application android:icon="@drawable/icon" android:label="@string/app_name">
12+
<activity android:name="com.prize.flash.FlashLightMainActivity"
13+
android:label="@string/flashlight_string"
14+
android:icon="@drawable/ic_launcher_flashlight"
15+
android:screenOrientation="portrait"
16+
android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
17+
android:launchMode ="singleInstance">
18+
<intent-filter>
19+
<action android:name="android.intent.action.MAIN" />
20+
<category android:name="android.intent.category.LAUNCHER" />
21+
</intent-filter>
22+
</activity>
23+
<!--prize-modify-by-zhongweilin-->
24+
<!-- <provider android:name="com.prize.flash.FlashProvider" android:exported="true"
25+
android:authorities="com.android.flash" /> -->
26+
</application>
27+
</manifest>

PrizeFlash/proguard.cfg

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
-optimizationpasses 5
2+
-dontusemixedcaseclassnames
3+
-dontskipnonpubliclibraryclasses
4+
-dontpreverify
5+
-verbose
6+
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
7+
8+
-keep public class * extends android.app.Activity
9+
-keep public class * extends android.app.Application
10+
-keep public class * extends android.app.Service
11+
-keep public class * extends android.content.BroadcastReceiver
12+
-keep public class * extends android.content.ContentProvider
13+
-keep public class * extends android.app.backup.BackupAgentHelper
14+
-keep public class * extends android.preference.Preference
15+
-keep public class com.android.vending.licensing.ILicensingService
16+
# 保持自定义控件类不被混淆 start
17+
-keepclasseswithmembers class * {
18+
public <init>(android.content.Context, android.util.AttributeSet);
19+
}
20+
-keepclasseswithmembers class * {
21+
public <init>(android.content.Context, android.util.AttributeSet, int);
22+
}
23+
24+
-keepclasseswithmembers class * {
25+
void onClick*(...);
26+
}
27+
-keepclasseswithmembers class * {
28+
*** *Callback(...);
29+
}
30+
31+
# keep setters in Views so that animations can still work.
32+
# see http://proguard.sourceforge.net/manual/examples.html#beans
33+
-keepclassmembers public class * extends android.view.View {
34+
void set*(***);
35+
*** get*();
36+
}
37+
# 保持自定义控件类不被混淆 end
38+
39+
-keepclasseswithmembernames class * {
40+
native <methods>;
41+
}
42+
43+
-keepclasseswithmembernames class * {
44+
public <init>(android.content.Context, android.util.AttributeSet);
45+
}
46+
47+
-keepclasseswithmembernames class * {
48+
public <init>(android.content.Context, android.util.AttributeSet, int);
49+
}
50+
51+
-keepclassmembers enum * {
52+
public static **[] values();
53+
public static ** valueOf(java.lang.String);
54+
}
55+
56+
-keep class * implements android.os.Parcelable {
57+
public static final android.os.Parcelable$Creator *;
58+
}
66.2 KB

PrizeFlash/res/drawable-hdpi/icon.png

4.05 KB
4.35 KB
15.5 KB
4.27 KB
48.6 KB
4.16 KB

PrizeFlash/res/drawable-ldpi/icon.png

4.05 KB
15.5 KB
4.27 KB
48.6 KB
4.16 KB

PrizeFlash/res/drawable-mdpi/icon.png

4.05 KB
4.05 KB
6.51 KB
14.4 KB
12 KB
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<selector xmlns:android="http://schemas.android.com/apk/res/android">
3+
<item android:state_enabled="true" android:drawable="@drawable/flashligh_open" />
4+
<item android:state_enabled="false" android:drawable="@drawable/flashligh_close"/>
5+
<item android:drawable="@drawable/flashligh_close" />
6+
</selector>

PrizeFlash/res/drawable/icon.png

4.05 KB

PrizeFlash/res/layout/flashlight.xml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<FrameLayout 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:id="@+id/flash_bg"
6+
android:background="@drawable/flashlight_open_close_seletor">
7+
<com.prize.flash.FlashSwitch
8+
android:id="@+id/flash_switch"
9+
android:layout_width="wrap_content"
10+
android:layout_height="wrap_content"
11+
android:layout_marginBottom="@dimen/flash_button_bottommargin"
12+
android:layout_gravity="bottom|center_horizontal"
13+
android:background="@drawable/flashligh_switch_bg">
14+
<ImageView
15+
android:layout_width="wrap_content"
16+
android:layout_height="wrap_content"
17+
android:layout_alignParentTop="true"
18+
android:layout_centerHorizontal="true"
19+
android:background="@drawable/thumb"/>
20+
21+
</com.prize.flash.FlashSwitch>
22+
</FrameLayout>
+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- Copyright (c) 2009, The Android Open Source Project
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
-->
16+
<resources>
17+
<!-- flashlight.xml start-xucm -->
18+
<dimen name="flash_button_leftmargin">160dp</dimen>
19+
<dimen name="flash_button_bottommargin">84dp</dimen>
20+
<dimen name="flash_button_bottommargin_nav">74dp</dimen>
21+
<!-- flashlight.xml end-xucm -->
22+
23+
</resources>
+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- Copyright (c) 2009, The Android Open Source Project
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
-->
16+
<resources>
17+
<!-- flashlight.xml start-xucm -->
18+
<dimen name="flash_button_leftmargin">160dp</dimen>
19+
<dimen name="flash_button_bottommargin">84dp</dimen>
20+
<dimen name="flash_button_bottommargin_nav">74dp</dimen>
21+
<!-- flashlight.xml end-xucm -->
22+
23+
</resources>
+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- Copyright (c) 2009, The Android Open Source Project
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
-->
16+
<resources>
17+
18+
<!-- flashlight.xml start-xucm -->
19+
<dimen name="flash_button_leftmargin">135dp</dimen>
20+
<dimen name="flash_button_bottommargin">84dp</dimen>
21+
<dimen name="flash_button_bottommargin_nav">74dp</dimen>
22+
<!-- flashlight.xml end-xucm -->
23+
24+
</resources>
+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- Copyright (c) 2009, The Android Open Source Project
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
-->
16+
<resources>
17+
18+
<!-- flashlight.xml start-xucm -->
19+
<dimen name="flash_button_leftmargin">160dp</dimen>
20+
<dimen name="flash_button_bottommargin">70dp</dimen>
21+
<dimen name="flash_button_bottommargin_nav">60dp</dimen>
22+
<!-- flashlight.xml end-xucm -->
23+
24+
</resources>
+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!-- Copyright (C) 2007 The Android Open Source Project
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
-->
16+
17+
<resources xmlns:android="http://schemas.android.com/apk/res/android"
18+
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
19+
<string name="flashlight_string">手电筒</string>
20+
<string name="app_name">手电筒</string>
21+
<string name="flashlowlightremind">电量过低,不能开启此功能</string>
22+
</resources>
+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!-- Copyright (C) 2007 The Android Open Source Project
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
-->
16+
17+
<resources xmlns:android="http://schemas.android.com/apk/res/android"
18+
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
19+
<string name="flashlight_string">手電筒</string>
20+
<string name="app_name">手電筒</string>
21+
<string name="flashlowlightremind">電量過低,不能開啟此功能</string>
22+
</resources>

PrizeFlash/res/values/dimens.xml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- Copyright (c) 2009, The Android Open Source Project
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
-->
16+
<resources>
17+
<!-- flashlight.xml start-xucm -->
18+
<dimen name="flash_button_leftmargin">160dp</dimen>
19+
<dimen name="flash_button_bottommargin">84dp</dimen>
20+
<dimen name="flash_button_bottommargin_nav">74dp</dimen>
21+
<!-- flashlight.xml end-xucm -->
22+
23+
</resources>

PrizeFlash/res/values/strings.xml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<string name="hello">Hello World, BootFlashlight!</string>
4+
<string name="app_name">flashlight</string>
5+
<string name="flashlight_string">flashlight</string>
6+
<string name="flashlowlightremind">Power is too low, can not open this function</string>
7+
</resources>

0 commit comments

Comments
 (0)