Skip to content

Commit f91fa98

Browse files
committed
Merge branch 'remote' into mkl-mr1
2 parents 67f9889 + cf2a054 commit f91fa98

Some content is hidden

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

41 files changed

+914
-405
lines changed

Android.mk

+12-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ LOCAL_STATIC_JAVA_LIBRARIES := android-support-v13 \
2727
android-support-v7-recyclerview \
2828
guava
2929

30+
3031
LOCAL_SRC_FILES := $(call all-java-files-under, src) \
3132
$(call all-java-files-under, WallpaperPicker/src) \
3233
$(call all-renderscript-files-under, src) \
@@ -49,10 +50,19 @@ LOCAL_AAPT_FLAGS += --rename-manifest-package com.mokee.launcher
4950
LOCAL_OVERRIDES_PACKAGES := Launcher3
5051

5152
LOCAL_PROGUARD_FLAG_FILES := proguard.flags
52-
LOCAL_PROGUARD_ENABLED := disabled
53+
LOCAL_PROGUARD_ENABLED := full
54+
55+
REMOTE_FOLDER_UPDATER ?= $(LOCAL_PATH)/RemoteFolder
56+
include $(REMOTE_FOLDER_UPDATER)/Android.mk
5357

5458
include $(BUILD_PACKAGE)
5559

60+
include $(CLEAR_VARS)
61+
62+
REMOTE_FOLDER_UPDATER ?= $(LOCAL_PATH)/RemoteFolder
63+
include $(REMOTE_FOLDER_UPDATER)/Android-prebuilt-libs.mk
64+
65+
include $(BUILD_MULTI_PREBUILT)
5666

5767
#
5868
# Protocol Buffer Debug Utility in Java
@@ -72,6 +82,7 @@ LOCAL_JAR_MANIFEST := util/etc/manifest.txt
7282

7383
include $(BUILD_HOST_JAVA_LIBRARY)
7484

85+
7586
#
7687
# Protocol Buffer Debug Utility Wrapper Script
7788
#

AndroidManifest.xml

+1
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
7070
<uses-permission android:name="android.permission.BROADCAST_STICKY"/>
7171
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
72+
<uses-permission android:name="android.permission.INTERNET" />
7273
<uses-permission android:name="com.android.launcher.permission.READ_SETTINGS" />
7374
<uses-permission android:name="com.android.launcher.permission.WRITE_SETTINGS" />
7475
<uses-permission android:name="com.android.launcher3.permission.READ_SETTINGS" />

RemoteFolder/Android-prebuilt-libs.mk

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Empty file needed to mirror lib makefile in overlay

RemoteFolder/Android.mk

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
LOCAL_SRC_FILES += $(call all-java-files-under, RemoteFolder/src)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
package com.android.launcher3;
2+
3+
import android.content.res.Resources;
4+
import android.graphics.drawable.Drawable;
5+
import android.view.View;
6+
import android.view.ViewGroup;
7+
8+
import java.util.ArrayList;
9+
10+
/**
11+
* Manages adding and removing the remote folder from the workspace.
12+
*/
13+
public class RemoteFolderManager {
14+
15+
public RemoteFolderManager(final Launcher launcher) { }
16+
17+
/**
18+
* Create a remote folder view.
19+
* @param icon folder icon view on the workspace.
20+
* @return a view for the remote folder.
21+
*/
22+
public Folder createRemoteFolder(final FolderIcon icon, ViewGroup root) { return null; }
23+
24+
/**
25+
* Get a drawable for the supplied item in the folder icon preview.
26+
* @param items list of views in the folder.
27+
* @param position index of icon to retreive.
28+
* @return an icon to draw in the folder preview.
29+
*/
30+
public Drawable getFolderIconDrawable(final ArrayList<View> items,
31+
final int position) { return null; }
32+
33+
/**
34+
* Called when Launcher finishes binding items from the model.
35+
*/
36+
public void bindFinished() { }
37+
38+
/**
39+
* Called when the setting for remote folder is updated.
40+
* @param newValue the new setting for remote folder
41+
*/
42+
public void onSettingChanged(final boolean newValue) { }
43+
44+
/**
45+
* Called when the remote folder is dropped into the delete area on the workspace.
46+
*/
47+
public void onFolderDeleted() { }
48+
49+
/**
50+
* Called when the app drawer is opened.
51+
*/
52+
public void onAppDrawerOpened() { }
53+
54+
/**
55+
* Called when new apps are added to launcher.
56+
* @param apps list of added apps.
57+
*/
58+
public void onBindAddApps(ArrayList<AppInfo> apps) { }
59+
60+
/**
61+
* Called when launcher loads apps and applies them to the drawer.
62+
*/
63+
public void onSetApps() { }
64+
65+
/**
66+
* Called when the info icon is clicked
67+
*/
68+
public void onInfoIconClicked() { }
69+
70+
/**
71+
* Change the appearance of FolderIcon for our RemoteFolder by adding a badge
72+
* @param icon the FolderIcon to update
73+
* @return a FolderIcon with an added ImageView
74+
*/
75+
public static FolderIcon addBadgeToFolderIcon(FolderIcon icon) {
76+
return icon;
77+
}
78+
79+
/**
80+
* Called when the view holder is created for the remote header.
81+
* @param holder remote view holder.
82+
*/
83+
public void onCreateViewHolder(final AppDrawerListAdapter.ViewHolder holder) { }
84+
/**
85+
* Called when the view holder is bound for the remote header.
86+
* @param holder remote view holder.
87+
* @param indexedInfo header info.
88+
*/
89+
public void onBindViewHolder(final AppDrawerListAdapter.ViewHolder holder,
90+
final AppDrawerListAdapter.AppItemIndexedInfo indexedInfo) { }
91+
92+
/**
93+
* Get the String to be used for the RemoteFolder name and its corresponding Settings option
94+
* @return the name RemoteFolder and its Setting option should use
95+
*/
96+
public static String getFeatureTitle(Resources res) { return null; }
97+
}

proguard.flags

+39
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
-keepattributes SourceFile,LineNumberTable,InnerClasses
2+
-keep class com.inmobi.** { *; }
3+
-dontwarn com.inmobi.**
4+
-dontwarn com.google.android.gms**
5+
16
-keep class com.android.launcher3.Launcher {
27
public void previousScreen(android.view.View);
38
public void nextScreen(android.view.View);
@@ -57,3 +62,37 @@
5762
public float getAnimationProgress();
5863
public void setAnimationProgress(float);
5964
}
65+
66+
-keep class * extends java.util.ListResourceBundle {
67+
protected Object[][] getContents();
68+
}
69+
70+
-keep public class com.google.android.gms.common.internal.safeparcel.SafeParcelable {
71+
public static final *** NULL;
72+
}
73+
74+
-keepnames @com.google.android.gms.common.annotation.KeepName class *
75+
-keepclassmembernames class * {
76+
@com.google.android.gms.common.annotation.KeepName *;
77+
}
78+
79+
-keepnames class * implements android.os.Parcelable {
80+
public static final ** CREATOR;
81+
}
82+
83+
-keep class android.content.res.** { *; }
84+
-dontwarn android.content.res.*
85+
86+
-keep class android.view.inputmethod.** { *; }
87+
-dontwarn android.view.inputmethod.*
88+
89+
-keep class com.google.android.gms.common.api.GoogleApiClient { public *; }
90+
-keep class com.google.android.gms.common.api.GoogleApiClient$* {public *;}
91+
-keep class com.google.android.gms.location.LocationServices {public *;}
92+
-keep class com.google.android.gms.location.FusedLocationProviderApi {public *;}
93+
-keep class com.google.android.gms.location.ActivityRecognition {public *;}
94+
-keep class com.google.android.gms.location.ActivityRecognitionApi {public *;}
95+
-keep class com.google.android.gms.location.ActivityRecognitionResult {public *;}
96+
-keep class com.google.android.gms.location.DetectedActivity {public *;}
97+
-keep class com.google.android.gms.ads.identifier.AdvertisingIdClient{public *;}
98+
-keep class com.google.android.gms.ads.identifier.AdvertisingIdClient$Info{public *;}

res/drawable/download_badge.png

2.65 KB
Loading

res/drawable/triangle_icon.png

12.3 KB
Loading

res/layout/app_drawer_item.xml

+32-27
Original file line numberDiff line numberDiff line change
@@ -15,57 +15,62 @@
1515
limitations under the License.
1616
-->
1717
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
18-
xmlns:autofit="http://schemas.android.com/apk/res-auto"
19-
android:splitMotionEvents="false"
20-
android:layout_width="match_parent"
21-
android:layout_height="wrap_content">
18+
xmlns:autofit="http://schemas.android.com/apk/res-auto"
19+
android:splitMotionEvents="false"
20+
android:layout_width="match_parent"
21+
android:layout_height="wrap_content">
22+
23+
<!-- Layout in back to front render order -->
2224
<View
2325
android:id="@+id/fading_background_back"
2426
android:alpha="0"
2527
android:layout_width="fill_parent"
2628
android:layout_height="fill_parent"
27-
android:layout_alignTop="@+id/drawer_item_flow"
29+
android:layout_alignParentTop="true"
2830
android:layout_alignBottom="@+id/drawer_item_flow"
2931
android:background="@color/app_drawer_drag_background" />
3032

31-
<!-- Layout in back to front render order -->
33+
<include
34+
android:id="@+id/custom_header_layout"
35+
layout="@layout/app_drawer_item_custom_header" />
36+
3237
<LinearLayout
33-
android:id="@+id/drawer_item_flow"
34-
android:layout_alignParentEnd="true"
35-
android:layout_toEndOf="@+id/drawer_item_title"
36-
android:layout_width="match_parent"
37-
android:layout_height="wrap_content"
38-
android:orientation="horizontal" />
38+
android:id="@+id/drawer_item_flow"
39+
android:layout_alignParentEnd="true"
40+
android:layout_toEndOf="@+id/drawer_item_title"
41+
android:layout_width="match_parent"
42+
android:layout_height="wrap_content"
43+
android:layout_below="@id/custom_header_layout"
44+
android:orientation="horizontal" />
3945

4046
<View
4147
android:id="@+id/fading_background_front"
4248
android:alpha="0"
4349
android:layout_width="fill_parent"
4450
android:layout_height="fill_parent"
45-
android:layout_alignTop="@id/drawer_item_flow"
51+
android:layout_alignParentTop="true"
4652
android:layout_alignBottom="@id/drawer_item_flow"
4753
android:background="@color/app_drawer_drag_background" />
4854

4955
<com.android.launcher3.AutoFitTextView
50-
android:id="@+id/drawer_item_title"
51-
android:layout_width="@dimen/app_drawer_char_width"
52-
android:layout_height="fill_parent"
53-
android:layout_marginTop="6dp"
54-
android:layout_marginBottom="24dp"
55-
android:layout_marginStart="6dp"
56-
android:layout_alignTop="@id/drawer_item_flow"
56+
android:id="@id/drawer_item_title"
57+
android:layout_width="@dimen/drawer_header_text_char_width"
58+
android:layout_height="wrap_content"
59+
android:layout_marginTop="@dimen/drawer_header_text_margin_top"
60+
android:layout_marginBottom="@dimen/drawer_header_text_margin_bottom"
61+
android:layout_marginStart="@dimen/drawer_header_text_margin_start"
62+
android:layout_alignTop="@id/custom_header_layout"
63+
android:layout_alignWithParentIfMissing="true"
5764
android:layout_alignBottom="@id/drawer_item_flow"
58-
android:layout_centerVertical="true"
5965
android:includeFontPadding="false"
6066
android:gravity="center"
6167
android:singleLine="true"
62-
autofit:minTextSize="8sp"
63-
android:textSize="24sp"
64-
android:layout_gravity="center"
68+
autofit:minTextSize="@dimen/drawer_header_text_min_text_size"
69+
android:textSize="@dimen/drawer_header_text_size"
6570
android:fontFamily="sans-serif-light"
6671
android:textColor="@android:color/white"
67-
android:shadowRadius="4.0"
68-
android:shadowDy="2"
69-
android:shadowColor="#b0000000"/>
72+
android:shadowRadius="@dimen/drawer_header_text_shadow_radius"
73+
android:shadowDy="@dimen/drawer_header_text_shadow_dy"
74+
android:shadowColor="@color/drawer_header_text_shadow"/>
7075

7176
</RelativeLayout>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<merge xmlns:android="http://schemas.android.com/apk/res/android">
3+
</merge>

res/layout/remote_folder.xml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<merge xmlns:android="http://schemas.android.com/apk/res/android">
3+
4+
</merge>

res/layout/user_folder.xml

+9-6
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,17 @@
2323
android:paddingStart="@dimen/folder_preview_padding"
2424
android:paddingEnd="@dimen/folder_preview_padding"
2525
android:paddingBottom="@dimen/folder_preview_padding"
26-
android:layout_gravity="center"
26+
android:layout_margin="@dimen/folder_margin"
27+
android:layout_gravity="bottom|center_horizontal"
2728
android:background="@drawable/folder_bg">
2829

30+
<include layout="@layout/remote_folder"
31+
android:layout_width="wrap_content"
32+
android:layout_height="wrap_content" />
33+
2934
<ScrollView
3035
android:id="@+id/scroll_view"
31-
android:layout_width="match_parent"
36+
android:layout_width="wrap_content"
3237
android:layout_height="wrap_content"
3338
android:layout_gravity="center_horizontal">
3439
<com.android.launcher3.CellLayout
@@ -41,7 +46,7 @@
4146

4247
<RelativeLayout
4348
android:layout_width="match_parent"
44-
android:layout_height="match_parent"
49+
android:layout_height="wrap_content"
4550
android:id="@+id/folder_name_lock_container">
4651

4752
<ImageView
@@ -50,7 +55,6 @@
5055
android:layout_height="@dimen/folder_lock_icon"
5156
android:padding="@dimen/folder_name_padding"
5257
android:layout_alignParentEnd="true"
53-
android:layout_alignParentBottom="true"
5458
android:src="@drawable/folder_unlocked" />
5559

5660
<com.android.launcher3.FolderEditText
@@ -73,8 +77,7 @@
7377
android:textSize="18sp"
7478
android:layout_toStartOf="@id/folder_lock"
7579
android:layout_alignTop="@id/folder_lock"
76-
android:layout_alignParentStart="true"
77-
android:layout_alignParentBottom="true"/>
80+
android:layout_alignParentStart="true"/>
7881

7982
</RelativeLayout>
8083
</com.android.launcher3.Folder>

res/values-hr/cm_arrays.xml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--Generated by crowdin.com-->
3+
<!--
4+
Copyright (C) 2014 The CyanogenMod Project
5+
6+
Licensed under the Apache License, Version 2.0 (the "License");
7+
you may not use this file except in compliance with the License.
8+
You may obtain a copy of the License at
9+
10+
http://www.apache.org/licenses/LICENSE-2.0
11+
12+
Unless required by applicable law or agreed to in writing, software
13+
distributed under the License is distributed on an "AS IS" BASIS,
14+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
See the License for the specific language governing permissions and
16+
limitations under the License.
17+
-->
18+
<resources>
19+
<string-array name="transition_effect_entries">
20+
<item>Ništa</item>
21+
<item>Povećaj</item>
22+
<item>Smanji</item>
23+
<item>Zakreni gore</item>
24+
<item>Zakreni dolje</item>
25+
<item>Kocka unutra</item>
26+
<item>Kocka van</item>
27+
<item>Stog</item>
28+
<item>Harmonika</item>
29+
<item>Flip</item>
30+
<item>Cilindar unutra</item>
31+
<item>Cilindar van</item>
32+
<item>Vrtuljak</item>
33+
<item>Pregled</item>
34+
</string-array>
35+
</resources>

0 commit comments

Comments
 (0)