Commit 5fcaab43 authored by Sunny Goyal's avatar Sunny Goyal Committed by Android Git Automerger
Browse files

am ea9ad5ce: Merge remote-tracking branch \'origin/ub-launcher3-burnaby\' into mnc-dev

* commit 'ea9ad5ce': (76 commits)
  Restoring provider behavior for reloading app on old devices   > For older devices, launcher will only reload in case of inserts with specific query parameters   > For older devices, launcehr will notify content observers of any internal inserts   > Chaning TAG for Launcher provider as max logging tag is only 23 characters
  Removing items which are on invalid screen
  Preventing null pointer crash when opening a folder
  Revert workaround for move to default screen on home intent.
  Fixing NPE in recycler view scroll bar.
  Adding workaround for regression caused by ag/752175
  Adding gradle script for Android Studio
  Override the overscroll color for the widget rows.
  Adding graphic for all apps empty search screen.
  Using GET_UNINSTALLED_PACKAGES flag when getting packageInfo for a managed profile app
  Revert "Adding viewId for the QSB"
  Adding viewId for the QSB
  Fixing issue with missing scroll bar after fast-scrolling and searching.
  Fixing an issue where you would inadvertently start fastscrolling.
  Pending bind callbacks should be cleared before starting the loader, similar to startBinding
  Fixing widgets container inactive scroll bar color.
  Making the detached scrollbar catch up faster to the actual scroll position.
  Updating theme to use the light theme by default, instead of wallpaper theme   > This allows us to use all the goodness of material theme   > Cursor in folder edit text is no longer 1px wide
  Updating the target sdk to launcher
  Using the usermanager api to get creation time
  ...
parents e40f5ce4 ea9ad5ce
......@@ -8,3 +8,9 @@ tests/stress/gen/
WallpaperPicker/gen/
WallpaperPicker/.project.properties
bin/
.idea/
.gradle/
local.properties
gradle/
build/
gradlew*
\ No newline at end of file
......@@ -23,16 +23,25 @@ include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional
LOCAL_STATIC_JAVA_LIBRARIES := \
android-support-v4 \
android-support-v7-recyclerview
LOCAL_SRC_FILES := $(call all-java-files-under, src) \
$(call all-java-files-under, WallpaperPicker/src) \
$(call all-proto-files-under, protos)
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/WallpaperPicker/res $(LOCAL_PATH)/res
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/WallpaperPicker/res \
$(LOCAL_PATH)/res \
$(LOCAL_PATH)/../../../prebuilts/sdk/current/support/v7/recyclerview/res
LOCAL_PROGUARD_FLAG_FILES := proguard.flags
LOCAL_STATIC_JAVA_LIBRARIES := android-support-v4 android-support-v7-recyclerview
LOCAL_PROTOC_OPTIMIZE_TYPE := nano
LOCAL_PROTOC_FLAGS := --proto_path=$(LOCAL_PATH)/protos/
LOCAL_AAPT_FLAGS := --auto-add-overlay
LOCAL_AAPT_FLAGS := \
--auto-add-overlay \
--extra-packages android.support.v7.recyclerview
LOCAL_SDK_VERSION := current
LOCAL_PACKAGE_NAME := Launcher3
......
......@@ -20,7 +20,7 @@
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.launcher3">
<uses-sdk android:targetSdkVersion="21" android:minSdkVersion="16"/>
<uses-sdk android:targetSdkVersion="23" android:minSdkVersion="16"/>
<permission
android:name="com.android.launcher.permission.INSTALL_SHORTCUT"
......@@ -53,7 +53,6 @@
<uses-permission android:name="android.permission.SET_WALLPAPER_HINTS" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.BIND_APPWIDGET" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.BROADCAST_STICKY"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
......
......@@ -25,7 +25,7 @@
<item name="android:windowTranslucentNavigation">true</item>
</style>
<style name="Theme" parent="@android:style/Theme.DeviceDefault.Wallpaper.NoTitleBar">
<style name="Theme" parent="@style/BaseWallpaperTheme">
<item name="android:windowTranslucentStatus">true</item>
<item name="android:windowTranslucentNavigation">true</item>
</style>
......
......@@ -33,4 +33,11 @@
<item name="android:background">?android:attr/selectableItemBackgroundBorderless</item>
</style>
<style name="Theme" parent="@style/BaseWallpaperTheme">
<item name="android:windowTranslucentStatus">true</item>
<item name="android:windowTranslucentNavigation">true</item>
<item name="android:colorControlActivated">@color/launcher_accent_color</item>
<item name="android:colorAccent">@color/launcher_accent_color</item>
<item name="android:colorPrimary">@color/launcher_accent_color</item>
</style>
</resources>
\ No newline at end of file
......@@ -19,4 +19,6 @@
-->
<resources>
<color name="wallpaper_picker_translucent_gray">#66000000</color>
<color name="launcher_accent_color">#ff009688</color>
</resources>
......@@ -35,9 +35,15 @@
<item name="android:background">#88000000</item>
</style>
<style name="Theme" parent="@android:style/Theme.DeviceDefault.Wallpaper.NoTitleBar">
<style name="BaseWallpaperTheme" parent="@android:style/Theme.DeviceDefault.Light.NoActionBar">
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:colorBackgroundCacheHint">@null</item>
<item name="android:windowShowWallpaper">true</item>
<item name="android:windowNoTitle">true</item>
</style>
<style name="Theme" parent="@style/BaseWallpaperTheme"></style>
<style name="ActionBarSetWallpaperStyle" parent="@android:style/Widget.DeviceDefault.ActionButton">
<item name="android:textColor">#ffffffff</item>
<item name="android:background">?android:attr/selectableItemBackground</item>
......
......@@ -223,14 +223,12 @@ public class WallpaperCropActivity extends BaseActivity implements Handler.Callb
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
protected boolean isActivityDestroyed() {
return (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1)
&& isDestroyed();
return Utilities.ATLEAST_JB_MR1 && isDestroyed();
}
@Thunk void addReusableBitmap(TileSource src) {
synchronized (mReusableBitmaps) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT
&& src instanceof BitmapRegionTileSource) {
if (Utilities.ATLEAST_KITKAT && src instanceof BitmapRegionTileSource) {
Bitmap preview = ((BitmapRegionTileSource) src).getBitmap();
if (preview != null && preview.isMutable()) {
mReusableBitmaps.add(preview);
......
......@@ -100,6 +100,7 @@ public class WallpaperPickerActivity extends WallpaperCropActivity {
@Thunk LinearLayout mWallpapersView;
@Thunk HorizontalScrollView mWallpaperScrollContainer;
@Thunk View mWallpaperStrip;
@Thunk ActionMode.Callback mActionModeCallback;
@Thunk ActionMode mActionMode;
......@@ -379,6 +380,7 @@ public class WallpaperPickerActivity extends WallpaperCropActivity {
mProgressView = findViewById(R.id.loading);
mWallpaperScrollContainer = (HorizontalScrollView) findViewById(R.id.wallpaper_scroll_container);
mWallpaperStrip = findViewById(R.id.wallpaper_strip);
mCropView.setTouchCallback(new CropView.TouchCallback() {
ViewPropertyAnimator mAnim;
@Override
......@@ -386,15 +388,15 @@ public class WallpaperPickerActivity extends WallpaperCropActivity {
if (mAnim != null) {
mAnim.cancel();
}
if (mWallpaperScrollContainer.getAlpha() == 1f) {
if (mWallpaperStrip.getAlpha() == 1f) {
mIgnoreNextTap = true;
}
mAnim = mWallpaperScrollContainer.animate();
mAnim = mWallpaperStrip.animate();
mAnim.alpha(0f)
.setDuration(150)
.withEndAction(new Runnable() {
public void run() {
mWallpaperScrollContainer.setVisibility(View.INVISIBLE);
mWallpaperStrip.setVisibility(View.INVISIBLE);
}
});
mAnim.setInterpolator(new AccelerateInterpolator(0.75f));
......@@ -412,8 +414,8 @@ public class WallpaperPickerActivity extends WallpaperCropActivity {
if (mAnim != null) {
mAnim.cancel();
}
mWallpaperScrollContainer.setVisibility(View.VISIBLE);
mAnim = mWallpaperScrollContainer.animate();
mWallpaperStrip.setVisibility(View.VISIBLE);
mAnim = mWallpaperStrip.animate();
mAnim.alpha(1f)
.setDuration(150)
.setInterpolator(new DecelerateInterpolator(0.75f));
......@@ -548,7 +550,12 @@ public class WallpaperPickerActivity extends WallpaperCropActivity {
new View.OnClickListener() {
@Override
public void onClick(View v) {
if (mSelectedTile != null) {
// Ensure that a tile is slelected and loaded.
if (mSelectedTile != null && mCropView.getTileSource() != null) {
// Prevent user from selecting any new tile.
mWallpaperStrip.setVisibility(View.GONE);
actionBar.hide();
WallpaperTileInfo info = (WallpaperTileInfo) mSelectedTile.getTag();
info.onSave(WallpaperPickerActivity.this);
} else {
......@@ -713,10 +720,10 @@ public class WallpaperPickerActivity extends WallpaperCropActivity {
public void onStop() {
super.onStop();
mWallpaperScrollContainer = (HorizontalScrollView) findViewById(R.id.wallpaper_scroll_container);
if (mWallpaperScrollContainer.getAlpha() < 1f) {
mWallpaperScrollContainer.setAlpha(1f);
mWallpaperScrollContainer.setVisibility(View.VISIBLE);
mWallpaperStrip = findViewById(R.id.wallpaper_strip);
if (mWallpaperStrip.getAlpha() < 1f) {
mWallpaperStrip.setAlpha(1f);
mWallpaperStrip.setVisibility(View.VISIBLE);
}
}
......@@ -970,10 +977,8 @@ public class WallpaperPickerActivity extends WallpaperCropActivity {
if (partner == null || !partner.hideDefaultWallpaper()) {
// Add an entry for the default wallpaper (stored in system resources)
WallpaperTileInfo defaultWallpaperInfo =
(Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT)
? getPreKKDefaultWallpaperInfo()
: getDefaultWallpaper();
WallpaperTileInfo defaultWallpaperInfo = Utilities.ATLEAST_KITKAT
? getDefaultWallpaper() : getPreKKDefaultWallpaperInfo();
if (defaultWallpaperInfo != null) {
bundled.add(0, defaultWallpaperInfo);
}
......
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.7.0'
}
}
apply plugin: 'com.android.application'
apply plugin: 'com.google.protobuf'
android {
compileSdkVersion 23
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.android.launcher3"
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
debug {
minifyEnabled false
}
}
sourceSets {
main {
res.srcDirs = ['res', 'WallpaperPicker/res']
main.java.srcDirs = ['src', 'WallpaperPicker/src']
manifest.srcFile 'AndroidManifest.xml'
proto.srcDirs 'protos/'
}
}
}
repositories {
mavenCentral()
}
dependencies {
compile 'com.android.support:support-v4:+'
compile 'com.android.support:recyclerview-v7:+'
compile 'com.google.protobuf.nano:protobuf-javanano:3.0.0-alpha-2'
}
protobuf {
// Configure the protoc executable
protoc {
artifact = 'com.google.protobuf:protoc:3.0.0-alpha-3'
}
}
-keep class com.android.launcher3.allapps.AllAppsBackgroundDrawable {
public void setAlpha(int);
public int getAlpha();
}
-keep class com.android.launcher3.BaseRecyclerViewFastScrollBar {
public void setWidth(int);
public int getWidth();
public void setTrackAlpha(int);
public int getTrackAlpha();
public void setThumbWidth(int);
public int getThumbWidth();
public void setTrackWidth(int);
public int getTrackWidth();
}
-keep class com.android.launcher3.BaseRecyclerViewFastScrollPopup {
......@@ -63,4 +68,4 @@
-keep class com.android.launcher3.Workspace {
public float getBackgroundAlpha();
public void setBackgroundAlpha(float);
}
\ No newline at end of file
}
......@@ -101,7 +101,10 @@ message Favorite {
optional string iconPackage = 16;
optional string iconResource = 17;
optional bytes icon = 18;
// Added in backup version 4
optional TargetType targetType = 19 [default = TARGET_NONE];
optional int32 rank = 20;
}
message Screen {
......@@ -121,6 +124,7 @@ message Widget {
optional Resource icon = 4;
optional Resource preview = 5;
// Added in backup version 3
// Assume that a widget is resizable upto 2x2 if no data is available
optional int32 minSpanX = 6 [default = 2];
optional int32 minSpanY = 7 [default = 2];
......
res/drawable-hdpi/ic_all_apps_bg_hand.png

27.4 KB

res/drawable-hdpi/ic_all_apps_bg_icon_1.png

3.63 KB

res/drawable-hdpi/ic_all_apps_bg_icon_2.png

3.88 KB

res/drawable-hdpi/ic_all_apps_bg_icon_3.png

5.5 KB

res/drawable-hdpi/ic_all_apps_bg_icon_4.png

4.01 KB

res/drawable-hdpi/ic_arrow_back_grey.png

190 Bytes | W: | H:

res/drawable-hdpi/ic_arrow_back_grey.png

152 Bytes | W: | H:

res/drawable-hdpi/ic_arrow_back_grey.png
res/drawable-hdpi/ic_arrow_back_grey.png
res/drawable-hdpi/ic_arrow_back_grey.png
res/drawable-hdpi/ic_arrow_back_grey.png
  • 2-up
  • Swipe
  • Onion skin
res/drawable-hdpi/ic_search_grey.png

743 Bytes | W: | H:

res/drawable-hdpi/ic_search_grey.png

419 Bytes | W: | H:

res/drawable-hdpi/ic_search_grey.png
res/drawable-hdpi/ic_search_grey.png
res/drawable-hdpi/ic_search_grey.png
res/drawable-hdpi/ic_search_grey.png
  • 2-up
  • Swipe
  • Onion skin
res/drawable-mdpi/ic_all_apps_bg_hand.png

16.1 KB

Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment