Merge "QS custom tiles - better handling of invalid icons" into nyc-dev
diff --git a/api/system-current.txt b/api/system-current.txt
index 013d8f1..dd2f18b 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -32920,6 +32920,7 @@
method public abstract void onConnected();
method public abstract void onDisconnected();
method public final void updateRecommendations(java.util.List<android.printservice.recommendation.RecommendationInfo>);
+ field public static final java.lang.String SERVICE_INTERFACE = "android.printservice.recommendation.RecommendationService";
}
}
diff --git a/core/java/android/printservice/recommendation/RecommendationService.java b/core/java/android/printservice/recommendation/RecommendationService.java
index b7ea512..733629a 100644
--- a/core/java/android/printservice/recommendation/RecommendationService.java
+++ b/core/java/android/printservice/recommendation/RecommendationService.java
@@ -27,7 +27,6 @@
import android.os.Message;
import android.os.RemoteException;
import android.util.Log;
-import com.android.internal.annotations.GuardedBy;
import java.util.List;
@@ -46,8 +45,6 @@
/**
* The {@link Intent} action that must be declared as handled by a service in its manifest for
* the system to recognize it as a print service recommendation service.
- *
- * @hide
*/
public static final String SERVICE_INTERFACE =
"android.printservice.recommendation.RecommendationService";
diff --git a/packages/DocumentsUI/src/com/android/documentsui/dirlist/FragmentTuner.java b/packages/DocumentsUI/src/com/android/documentsui/dirlist/FragmentTuner.java
index e3eae33..ecdbe63 100644
--- a/packages/DocumentsUI/src/com/android/documentsui/dirlist/FragmentTuner.java
+++ b/packages/DocumentsUI/src/com/android/documentsui/dirlist/FragmentTuner.java
@@ -154,7 +154,8 @@
MenuItem rename = menu.findItem(R.id.menu_rename);
MenuItem selectAll = menu.findItem(R.id.menu_select_all);
- open.setVisible(true);
+ open.setVisible(mState.action == ACTION_GET_CONTENT ||
+ mState.action == ACTION_OPEN);
share.setVisible(false);
delete.setVisible(false);
rename.setVisible(false);
diff --git a/packages/PrintServiceRecommendationService/Android.mk b/packages/PrintRecommendationService/Android.mk
similarity index 100%
rename from packages/PrintServiceRecommendationService/Android.mk
rename to packages/PrintRecommendationService/Android.mk
diff --git a/packages/PrintServiceRecommendationService/AndroidManifest.xml b/packages/PrintRecommendationService/AndroidManifest.xml
similarity index 100%
rename from packages/PrintServiceRecommendationService/AndroidManifest.xml
rename to packages/PrintRecommendationService/AndroidManifest.xml
diff --git a/packages/PrintRecommendationService/CleanSpec.mk b/packages/PrintRecommendationService/CleanSpec.mk
new file mode 100644
index 0000000..c087cb8
--- /dev/null
+++ b/packages/PrintRecommendationService/CleanSpec.mk
@@ -0,0 +1,49 @@
+# Copyright (C) 2016 The Android Open Source Project
+#
+# 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.
+#
+
+# If you don't need to do a full clean build but would like to touch
+# a file or delete some intermediate files, add a clean step to the end
+# of the list. These steps will only be run once, if they haven't been
+# run before.
+#
+# E.g.:
+# $(call add-clean-step, touch -c external/sqlite/sqlite3.h)
+# $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libz_intermediates)
+#
+# Always use "touch -c" and "rm -f" or "rm -rf" to gracefully deal with
+# files that are missing or have been moved.
+#
+# Use $(PRODUCT_OUT) to get to the "out/target/product/blah/" directory.
+# Use $(OUT_DIR) to refer to the "out" directory.
+#
+# If you need to re-do something that's already mentioned, just copy
+# the command and add it to the bottom of the list. E.g., if a change
+# that you made last week required touching a file and a change you
+# made today requires touching the same file, just copy the old
+# touch step and add it to the end of the list.
+#
+# ************************************************
+# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
+# ************************************************
+
+# For example:
+#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/AndroidTests_intermediates)
+#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/core_intermediates)
+#$(call add-clean-step, find $(OUT_DIR) -type f -name "IGTalkSession*" -print0 | xargs -0 rm -f)
+#$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/*)
+
+# ************************************************
+# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
+# ************************************************
diff --git a/packages/PrintServiceRecommendationService/MODULE_LICENSE_APACHE2 b/packages/PrintRecommendationService/MODULE_LICENSE_APACHE2
similarity index 100%
rename from packages/PrintServiceRecommendationService/MODULE_LICENSE_APACHE2
rename to packages/PrintRecommendationService/MODULE_LICENSE_APACHE2
diff --git a/packages/PrintServiceRecommendationService/NOTICE b/packages/PrintRecommendationService/NOTICE
similarity index 100%
rename from packages/PrintServiceRecommendationService/NOTICE
rename to packages/PrintRecommendationService/NOTICE
diff --git a/packages/PrintServiceRecommendationService/res/values/donottranslate.xml b/packages/PrintRecommendationService/res/values/donottranslate.xml
similarity index 100%
rename from packages/PrintServiceRecommendationService/res/values/donottranslate.xml
rename to packages/PrintRecommendationService/res/values/donottranslate.xml
diff --git a/packages/PrintServiceRecommendationService/res/values/strings.xml b/packages/PrintRecommendationService/res/values/strings.xml
similarity index 100%
rename from packages/PrintServiceRecommendationService/res/values/strings.xml
rename to packages/PrintRecommendationService/res/values/strings.xml
diff --git a/packages/PrintServiceRecommendationService/res/xml/vendorconfigs.xml b/packages/PrintRecommendationService/res/xml/vendorconfigs.xml
similarity index 100%
rename from packages/PrintServiceRecommendationService/res/xml/vendorconfigs.xml
rename to packages/PrintRecommendationService/res/xml/vendorconfigs.xml
diff --git a/packages/PrintServiceRecommendationService/src/com/android/printservice/recommendation/PrintServicePlugin.java b/packages/PrintRecommendationService/src/com/android/printservice/recommendation/PrintServicePlugin.java
similarity index 100%
rename from packages/PrintServiceRecommendationService/src/com/android/printservice/recommendation/PrintServicePlugin.java
rename to packages/PrintRecommendationService/src/com/android/printservice/recommendation/PrintServicePlugin.java
diff --git a/packages/PrintServiceRecommendationService/src/com/android/printservice/recommendation/RecommendationServiceImpl.java b/packages/PrintRecommendationService/src/com/android/printservice/recommendation/RecommendationServiceImpl.java
similarity index 100%
rename from packages/PrintServiceRecommendationService/src/com/android/printservice/recommendation/RecommendationServiceImpl.java
rename to packages/PrintRecommendationService/src/com/android/printservice/recommendation/RecommendationServiceImpl.java
diff --git a/packages/PrintServiceRecommendationService/src/com/android/printservice/recommendation/RemotePrintServicePlugin.java b/packages/PrintRecommendationService/src/com/android/printservice/recommendation/RemotePrintServicePlugin.java
similarity index 100%
rename from packages/PrintServiceRecommendationService/src/com/android/printservice/recommendation/RemotePrintServicePlugin.java
rename to packages/PrintRecommendationService/src/com/android/printservice/recommendation/RemotePrintServicePlugin.java
diff --git a/packages/PrintServiceRecommendationService/src/com/android/printservice/recommendation/plugin/mdnsFilter/MDNSFilterPlugin.java b/packages/PrintRecommendationService/src/com/android/printservice/recommendation/plugin/mdnsFilter/MDNSFilterPlugin.java
similarity index 100%
rename from packages/PrintServiceRecommendationService/src/com/android/printservice/recommendation/plugin/mdnsFilter/MDNSFilterPlugin.java
rename to packages/PrintRecommendationService/src/com/android/printservice/recommendation/plugin/mdnsFilter/MDNSFilterPlugin.java
diff --git a/packages/PrintServiceRecommendationService/src/com/android/printservice/recommendation/plugin/mdnsFilter/VendorConfig.java b/packages/PrintRecommendationService/src/com/android/printservice/recommendation/plugin/mdnsFilter/VendorConfig.java
similarity index 100%
rename from packages/PrintServiceRecommendationService/src/com/android/printservice/recommendation/plugin/mdnsFilter/VendorConfig.java
rename to packages/PrintRecommendationService/src/com/android/printservice/recommendation/plugin/mdnsFilter/VendorConfig.java
diff --git a/packages/PrintServiceRecommendationService/src/com/android/printservice/recommendation/util/MDNSUtils.java b/packages/PrintRecommendationService/src/com/android/printservice/recommendation/util/MDNSUtils.java
similarity index 100%
rename from packages/PrintServiceRecommendationService/src/com/android/printservice/recommendation/util/MDNSUtils.java
rename to packages/PrintRecommendationService/src/com/android/printservice/recommendation/util/MDNSUtils.java
diff --git a/packages/PrintServiceRecommendationService/src/com/android/printservice/recommendation/util/NsdResolveQueue.java b/packages/PrintRecommendationService/src/com/android/printservice/recommendation/util/NsdResolveQueue.java
similarity index 100%
rename from packages/PrintServiceRecommendationService/src/com/android/printservice/recommendation/util/NsdResolveQueue.java
rename to packages/PrintRecommendationService/src/com/android/printservice/recommendation/util/NsdResolveQueue.java
diff --git a/packages/SettingsLib/res/layout/drawer_category.xml b/packages/SettingsLib/res/layout/drawer_category.xml
index b7b50d0..582821b 100644
--- a/packages/SettingsLib/res/layout/drawer_category.xml
+++ b/packages/SettingsLib/res/layout/drawer_category.xml
@@ -28,7 +28,8 @@
<TextView
android:id="@android:id/title"
android:layout_width="match_parent"
- android:layout_height="48dp"
+ android:layout_height="wrap_content"
+ android:minHeight="48dp"
android:paddingTop="16dp"
android:paddingBottom="16dp"
android:paddingStart="16dp"
diff --git a/packages/SettingsLib/res/layout/drawer_item.xml b/packages/SettingsLib/res/layout/drawer_item.xml
index 4b53049..e1f1ae5 100644
--- a/packages/SettingsLib/res/layout/drawer_item.xml
+++ b/packages/SettingsLib/res/layout/drawer_item.xml
@@ -17,7 +17,8 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/tile_item"
android:layout_width="match_parent"
- android:layout_height="48dp"
+ android:layout_height="wrap_content"
+ android:minHeight="48dp"
android:orientation="horizontal" >
<ImageView
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java b/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
index 1149c59..74f1b80 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
@@ -70,6 +70,7 @@
private QSCustomizer mCustomizePanel;
private Record mDetailRecord;
+ private boolean mTriggeredExpand;
public QSPanel(Context context) {
this(context, null);
@@ -384,8 +385,16 @@
}
protected void handleShowDetail(Record r, boolean show) {
- if (show && !mExpanded) {
- mHost.animateExpandQS();
+ if (show) {
+ if (!mExpanded) {
+ mTriggeredExpand = true;
+ mHost.animateToggleQSExpansion();
+ } else {
+ mTriggeredExpand = false;
+ }
+ } else if (mTriggeredExpand) {
+ mHost.animateToggleQSExpansion();
+ mTriggeredExpand = false;
}
if (r instanceof TileRecord) {
handleShowDetailTile((TileRecord) r, show);
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSTile.java b/packages/SystemUI/src/com/android/systemui/qs/QSTile.java
index 3e32905..7692598 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSTile.java
@@ -389,7 +389,7 @@
void startRunnableDismissingKeyguard(Runnable runnable);
void warn(String message, Throwable t);
void collapsePanels();
- void animateExpandQS();
+ void animateToggleQSExpansion();
void openPanels();
Looper getLooper();
Context getContext();
diff --git a/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java b/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java
index faa5283..41b49d8 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java
@@ -279,6 +279,7 @@
private void selectPosition(int position, View v) {
// Remove the placeholder.
+ notifyItemRemoved(mEditIndex);
mTiles.remove(mEditIndex--);
mAccessibilityMoving = false;
move(mAccessibilityFromIndex, position, v);
@@ -323,7 +324,7 @@
}
private boolean move(int from, int to, View v) {
- if (to >= mEditIndex) {
+ if (to > mEditIndex) {
if (from >= mEditIndex) {
return false;
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QSTileHost.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QSTileHost.java
index 82496ac..493b23f 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QSTileHost.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QSTileHost.java
@@ -209,7 +209,7 @@
// already logged
}
- public void animateExpandQS() {
+ public void animateToggleQSExpansion() {
// TODO: Better path to animated panel expansion.
mHeader.performClick();
}