summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2021-06-21 14:34:34 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2021-06-21 14:34:34 +0000
commitee9e5eb92cb8d4e5bc4474486be5a604c849f05f (patch)
tree833eb2134f58a28ecd78f54e112e753684509ad7
parentd1ed658e4bd2e6e4d32fb9ebea9bcf8bfb48d78b (diff)
parent5729362442e88937f0d28853772c4b9cee5feddf (diff)
downloadCalendar-android12-mainline-documentsui-release.tar.gz
Snap for 7478028 from 5729362442e88937f0d28853772c4b9cee5feddf to mainline-documentsui-releaseandroid-mainline-12.0.0_r26android-mainline-12.0.0_r2aml_doc_310851020android12-mainline-documentsui-release
Change-Id: I84afe49616ed199a76855093b29bcded6e1b9a6f
-rw-r--r--Android.mk3
-rw-r--r--AndroidManifest.xml18
-rw-r--r--MODULE_LICENSE_APACHE20
-rw-r--r--res/layout-sw600dp-w960dp-h527dp-land/all_in_one.xml2
-rw-r--r--src/com/android/calendar/EventInfoFragment.java4
-rw-r--r--src/com/android/calendar/StickyHeaderListView.java18
-rw-r--r--src/com/android/calendar/widget/CalendarAppWidgetService.java3
-rw-r--r--tests/Android.mk3
8 files changed, 33 insertions, 18 deletions
diff --git a/Android.mk b/Android.mk
index 82d5d54a..dce26a46 100644
--- a/Android.mk
+++ b/Android.mk
@@ -34,6 +34,9 @@ LOCAL_SDK_VERSION := current
LOCAL_RESOURCE_DIR := $(addprefix $(LOCAL_PATH)/, $(res_dirs))
LOCAL_PACKAGE_NAME := Calendar
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/NOTICE
LOCAL_PROGUARD_FLAG_FILES := proguard.flags
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 1e78c72e..c9c5a04b 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -80,7 +80,8 @@
<activity android:name="EventInfoActivity"
android:parentActivityName="com.android.calendar.AllInOneActivity"
- android:theme="@style/CalendarTheme.WithActionBar">
+ android:theme="@style/CalendarTheme.WithActionBar"
+ android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
@@ -117,7 +118,8 @@
<activity android:name="GoogleCalendarUriIntentFilter" android:label="@string/app_label"
android:theme="@android:style/Theme.NoDisplay"
- android:configChanges="orientation|keyboardHidden">
+ android:configChanges="orientation|keyboardHidden"
+ android:exported="true">
<intent-filter
android:priority="50">
@@ -138,7 +140,8 @@
android:theme="@android:style/Theme.Holo.Dialog" android:excludeFromRecents="true"
android:label="@string/quick_response_dialog_title" />
- <receiver android:name=".alerts.AlertReceiver">
+ <receiver android:name=".alerts.AlertReceiver"
+ android:exported="true">
<intent-filter>
<action android:name="android.intent.action.EVENT_REMINDER" />
<action android:name="android.intent.action.TIME_SET" />
@@ -160,7 +163,8 @@
<receiver android:name=".alerts.GlobalDismissManager"
android:exported="false" />
- <receiver android:name=".UpgradeReceiver">
+ <receiver android:name=".UpgradeReceiver"
+ android:exported="true">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<category android:name="android.intent.category.DEFAULT" />
@@ -180,7 +184,8 @@
<service android:name=".alerts.InitAlarmsService" />
<!-- Declarations for the widget -->
- <receiver android:name=".widget.CalendarAppWidgetProvider" android:label="@string/gadget_title">
+ <receiver android:name=".widget.CalendarAppWidgetProvider" android:label="@string/gadget_title"
+ android:exported="true">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
<action android:name="com.android.calendar.APPWIDGET_UPDATE" />
@@ -188,7 +193,8 @@
<meta-data android:name="android.appwidget.provider" android:resource="@xml/appwidget_info" />
</receiver>
- <receiver android:name=".widget.CalendarAppWidgetService$CalendarFactory">
+ <receiver android:name=".widget.CalendarAppWidgetService$CalendarFactory"
+ android:exported="true">
<intent-filter>
<action android:name="android.intent.action.TIMEZONE_CHANGED"/>
<action android:name="android.intent.action.DATE_CHANGED"/>
diff --git a/MODULE_LICENSE_APACHE2 b/MODULE_LICENSE_APACHE2
deleted file mode 100644
index e69de29b..00000000
--- a/MODULE_LICENSE_APACHE2
+++ /dev/null
diff --git a/res/layout-sw600dp-w960dp-h527dp-land/all_in_one.xml b/res/layout-sw600dp-w960dp-h527dp-land/all_in_one.xml
index 7f64a7b2..5e315825 100644
--- a/res/layout-sw600dp-w960dp-h527dp-land/all_in_one.xml
+++ b/res/layout-sw600dp-w960dp-h527dp-land/all_in_one.xml
@@ -55,7 +55,7 @@
android:textSize="18sp" />
</LinearLayout>
- <!-- This is a dummy view to make hiding/unhiding easier -->
+ <!-- This is a nonessential view to make hiding/unhiding easier -->
<View
android:id="@+id/mini_month_container"
android:layout_below="@id/date_group"
diff --git a/src/com/android/calendar/EventInfoFragment.java b/src/com/android/calendar/EventInfoFragment.java
index b95c7c3d..0aa83d02 100644
--- a/src/com/android/calendar/EventInfoFragment.java
+++ b/src/com/android/calendar/EventInfoFragment.java
@@ -217,8 +217,8 @@ public class EventInfoFragment extends DialogFragment implements OnCheckedChange
static {
if (!Utils.isJellybeanOrLater()) {
- EVENT_PROJECTION[EVENT_INDEX_CUSTOM_APP_PACKAGE] = Events._ID; // dummy value
- EVENT_PROJECTION[EVENT_INDEX_CUSTOM_APP_URI] = Events._ID; // dummy value
+ EVENT_PROJECTION[EVENT_INDEX_CUSTOM_APP_PACKAGE] = Events._ID; // nonessential value
+ EVENT_PROJECTION[EVENT_INDEX_CUSTOM_APP_URI] = Events._ID; // nonessential value
}
}
diff --git a/src/com/android/calendar/StickyHeaderListView.java b/src/com/android/calendar/StickyHeaderListView.java
index 25955a05..981e7af7 100644
--- a/src/com/android/calendar/StickyHeaderListView.java
+++ b/src/com/android/calendar/StickyHeaderListView.java
@@ -58,7 +58,7 @@ public class StickyHeaderListView extends FrameLayout implements OnScrollListene
protected HeaderIndexer mIndexer = null;
protected HeaderHeightListener mHeaderHeightListener = null;
protected View mStickyHeader = null;
- protected View mDummyHeader = null; // A invisible header used when a section has no header
+ protected View mNonessentialHeader = null; // A invisible header used when a section has no header
protected ListView mListView = null;
protected ListView.OnScrollListener mListener = null;
@@ -269,11 +269,11 @@ public class StickyHeaderListView extends FrameLayout implements OnScrollListene
boolean newView = false;
if (sectionPos != mCurrentSectionPos) {
- // No header for current position , use the dummy invisible one, hide the separator
+ // No header for current position , use the nonessential invisible one, hide the separator
if (sectionPos == -1) {
sectionSize = 0;
this.removeView(mStickyHeader);
- mStickyHeader = mDummyHeader;
+ mStickyHeader = mNonessentialHeader;
if (mSeparatorView != null) {
mSeparatorView.setVisibility(View.GONE);
}
@@ -320,14 +320,14 @@ public class StickyHeaderListView extends FrameLayout implements OnScrollListene
}
} else if (stickyHeaderHeight != 0) {
mStickyHeader.setTranslationY(0);
- if (mSeparatorView != null && !mStickyHeader.equals(mDummyHeader)) {
+ if (mSeparatorView != null && !mStickyHeader.equals(mNonessentialHeader)) {
mSeparatorView.setVisibility(View.VISIBLE);
}
}
if (newView) {
mStickyHeader.setVisibility(View.INVISIBLE);
this.addView(mStickyHeader);
- if (mSeparatorView != null && !mStickyHeader.equals(mDummyHeader)){
+ if (mSeparatorView != null && !mStickyHeader.equals(mNonessentialHeader)){
FrameLayout.LayoutParams params =
new FrameLayout.LayoutParams(LayoutParams.MATCH_PARENT,
mSeparatorWidth);
@@ -382,12 +382,12 @@ public class StickyHeaderListView extends FrameLayout implements OnScrollListene
setListView(new ListView(mContext));
}
- // Create a dummy view , it will be used in case a section has no header
- mDummyHeader = new View (mContext);
+ // Create a nonessential view , it will be used in case a section has no header
+ mNonessentialHeader = new View (mContext);
ViewGroup.LayoutParams params = new LayoutParams(LayoutParams.MATCH_PARENT,
1, Gravity.TOP);
- mDummyHeader.setLayoutParams(params);
- mDummyHeader.setBackgroundColor(Color.TRANSPARENT);
+ mNonessentialHeader.setLayoutParams(params);
+ mNonessentialHeader.setBackgroundColor(Color.TRANSPARENT);
mChildViewsCreated = true;
}
diff --git a/src/com/android/calendar/widget/CalendarAppWidgetService.java b/src/com/android/calendar/widget/CalendarAppWidgetService.java
index 6329463b..ec702c7c 100644
--- a/src/com/android/calendar/widget/CalendarAppWidgetService.java
+++ b/src/com/android/calendar/widget/CalendarAppWidgetService.java
@@ -542,6 +542,9 @@ public class CalendarAppWidgetService extends RemoteViewsService {
}
AppWidgetManager widgetManager = AppWidgetManager.getInstance(mContext);
+ if (widgetManager == null) {
+ return;
+ }
if (mAppWidgetId == -1) {
int[] ids = widgetManager.getAppWidgetIds(CalendarAppWidgetProvider
.getComponentName(mContext));
diff --git a/tests/Android.mk b/tests/Android.mk
index bacb8c04..2d74b1ee 100644
--- a/tests/Android.mk
+++ b/tests/Android.mk
@@ -12,6 +12,9 @@ LOCAL_STATIC_JAVA_LIBRARIES := android.test.runner
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_PACKAGE_NAME := CalendarTests
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../NOTICE
LOCAL_INSTRUMENTATION_FOR := Calendar