Snap for 7328689 from 51991a7333 to sc-v2-release
Change-Id: Ideacc11fbf26d13105eab6de311b4bd0ed11bea4
This commit is contained in:
@@ -21,14 +21,18 @@ import static com.android.quickstep.views.OverviewActionsView.DISABLED_ROTATED;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.assist.AssistContent;
|
||||
import android.content.ContentResolver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Matrix;
|
||||
import android.net.Uri;
|
||||
import android.os.SystemClock;
|
||||
import android.provider.Settings;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
|
||||
import com.android.launcher3.BuildConfig;
|
||||
import com.android.launcher3.R;
|
||||
import com.android.quickstep.util.AssistContentRequester;
|
||||
import com.android.quickstep.views.OverviewActionsView;
|
||||
@@ -45,7 +49,12 @@ public final class TaskOverlayFactoryGo extends TaskOverlayFactory {
|
||||
public static final String ACTION_SEARCH = "com.android.quickstep.ACTION_SEARCH";
|
||||
public static final String ELAPSED_NANOS = "niu_actions_elapsed_realtime_nanos";
|
||||
public static final String ACTIONS_URL = "niu_actions_app_url";
|
||||
public static final String ACTIONS_ERROR_CODE = "niu_actions_app_error_code";
|
||||
public static final int ERROR_PERMISSIONS = 1;
|
||||
private static final String TAG = "TaskOverlayFactoryGo";
|
||||
private static final String URI_AUTHORITY =
|
||||
BuildConfig.APPLICATION_ID + ".overview.fileprovider";
|
||||
private static final String FAKE_FILEPATH = "shared_images/null.png";
|
||||
|
||||
// Empty constructor required for ResourceBasedOverride
|
||||
public TaskOverlayFactoryGo(Context context) {}
|
||||
@@ -64,6 +73,7 @@ public final class TaskOverlayFactoryGo extends TaskOverlayFactory {
|
||||
public static final class TaskOverlayGo<T extends OverviewActionsView> extends TaskOverlay {
|
||||
private String mNIUPackageName;
|
||||
private String mWebUrl;
|
||||
private boolean mAssistPermissionsEnabled;
|
||||
|
||||
private TaskOverlayGo(TaskThumbnailView taskThumbnailView) {
|
||||
super(taskThumbnailView);
|
||||
@@ -87,6 +97,11 @@ public final class TaskOverlayFactoryGo extends TaskOverlayFactory {
|
||||
boolean isAllowedByPolicy = mThumbnailView.isRealSnapshot();
|
||||
getActionsView().setCallbacks(new OverlayUICallbacksGoImpl(isAllowedByPolicy, task));
|
||||
|
||||
checkPermissions();
|
||||
if (!mAssistPermissionsEnabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
int taskId = task.key.id;
|
||||
AssistContentRequester contentRequester =
|
||||
new AssistContentRequester(mApplicationContext);
|
||||
@@ -112,7 +127,22 @@ public final class TaskOverlayFactoryGo extends TaskOverlayFactory {
|
||||
@VisibleForTesting
|
||||
public void sendNIUIntent(String actionType) {
|
||||
Intent intent = createNIUIntent(actionType);
|
||||
mImageApi.shareAsDataWithExplicitIntent(/* crop */ null, intent);
|
||||
// Only add and send the image if the appropriate permissions are held
|
||||
if (mAssistPermissionsEnabled) {
|
||||
mImageApi.shareAsDataWithExplicitIntent(/* crop */ null, intent);
|
||||
} else {
|
||||
intent.putExtra(ACTIONS_ERROR_CODE, ERROR_PERMISSIONS);
|
||||
// The Intent recipient expects an image URI, and omitting one or using a
|
||||
// completely invalid URI will cause the Intent parsing to crash.
|
||||
// So we construct a URI for a nonexistent image.
|
||||
Uri uri = new Uri.Builder()
|
||||
.scheme(ContentResolver.SCHEME_CONTENT)
|
||||
.authority(URI_AUTHORITY)
|
||||
.path(FAKE_FILEPATH)
|
||||
.build();
|
||||
intent.setData(uri);
|
||||
mApplicationContext.startActivity(intent);
|
||||
}
|
||||
}
|
||||
|
||||
private Intent createNIUIntent(String actionType) {
|
||||
@@ -129,6 +159,19 @@ public final class TaskOverlayFactoryGo extends TaskOverlayFactory {
|
||||
return intent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether the Assistant has screen context permissions
|
||||
*/
|
||||
@VisibleForTesting
|
||||
public void checkPermissions() {
|
||||
ContentResolver contentResolver = mApplicationContext.getContentResolver();
|
||||
boolean structureEnabled = Settings.Secure.getInt(contentResolver,
|
||||
Settings.Secure.ASSIST_STRUCTURE_ENABLED, 0) != 0;
|
||||
boolean screenshotEnabled = Settings.Secure.getInt(contentResolver,
|
||||
Settings.Secure.ASSIST_SCREENSHOT_ENABLED, 0) != 0;
|
||||
mAssistPermissionsEnabled = structureEnabled && screenshotEnabled;
|
||||
}
|
||||
|
||||
protected class OverlayUICallbacksGoImpl extends OverlayUICallbacksImpl
|
||||
implements OverlayUICallbacksGo {
|
||||
public OverlayUICallbacksGoImpl(boolean isAllowedByPolicy, Task task) {
|
||||
|
||||
@@ -20,7 +20,7 @@ import static com.android.launcher3.LauncherState.OVERVIEW;
|
||||
import static com.android.launcher3.anim.Interpolators.DEACCEL;
|
||||
import static com.android.launcher3.anim.Interpolators.FAST_OUT_SLOW_IN;
|
||||
import static com.android.launcher3.anim.Interpolators.FINAL_FRAME;
|
||||
import static com.android.launcher3.anim.Interpolators.INSTANT;
|
||||
import static com.android.launcher3.anim.Interpolators.LINEAR;
|
||||
import static com.android.launcher3.anim.Interpolators.clampToProgress;
|
||||
import static com.android.launcher3.states.StateAnimationConfig.ANIM_OVERVIEW_ACTIONS_FADE;
|
||||
import static com.android.launcher3.states.StateAnimationConfig.ANIM_OVERVIEW_FADE;
|
||||
@@ -109,7 +109,7 @@ public class OverviewToHomeAnim {
|
||||
? clampToProgress(FAST_OUT_SLOW_IN, 0, 0.75f) : FINAL_FRAME);
|
||||
config.setInterpolator(ANIM_OVERVIEW_TRANSLATE_Y, FINAL_FRAME);
|
||||
config.setInterpolator(ANIM_OVERVIEW_SCALE, FINAL_FRAME);
|
||||
config.setInterpolator(ANIM_OVERVIEW_ACTIONS_FADE, INSTANT);
|
||||
config.setInterpolator(ANIM_OVERVIEW_ACTIONS_FADE, LINEAR);
|
||||
if (!isLayoutNaturalToLauncher) {
|
||||
config.setInterpolator(ANIM_OVERVIEW_FADE, DEACCEL);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
/*
|
||||
**
|
||||
** Copyright 2021, 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.
|
||||
*/
|
||||
-->
|
||||
<selector
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:color="?android:attr/colorAccent" />
|
||||
</selector>
|
||||
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
/*
|
||||
**
|
||||
** Copyright 2021, 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.
|
||||
*/
|
||||
-->
|
||||
<selector
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:color="@android:color/white" />
|
||||
</selector>
|
||||
@@ -14,6 +14,6 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||
<solid android:color="?android:attr/colorAccent" />
|
||||
<solid android:color="@color/arrow_tip_view_bg" />
|
||||
<corners android:radius="8dp" />
|
||||
</shape>
|
||||
|
||||
@@ -14,6 +14,6 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||
<solid android:color="?android:attr/textColorPrimaryInverse" />
|
||||
<solid android:color="@color/widgets_picker_surface" />
|
||||
<corners android:radius="24dp" />
|
||||
</shape>
|
||||
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2021 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.
|
||||
-->
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="@android:color/transparent" />
|
||||
<corners android:radius="28dp" />
|
||||
<stroke android:width="2dp" android:color="?android:attr/colorAccent" />
|
||||
</shape>
|
||||
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2021 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.
|
||||
-->
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="?android:attr/colorAccent" />
|
||||
<corners android:radius="28dp" />
|
||||
</shape>
|
||||
@@ -14,10 +14,10 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportHeight="24.0"
|
||||
android:viewportWidth="24.0"
|
||||
android:width="20dp"
|
||||
android:height="20dp"
|
||||
android:viewportHeight="20.0"
|
||||
android:viewportWidth="20.0"
|
||||
android:tint="?android:attr/textColorPrimary">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:width="20dp"
|
||||
android:height="20dp"
|
||||
android:viewportHeight="24.0"
|
||||
android:viewportWidth="24.0"
|
||||
android:tint="?android:attr/textColorPrimary">
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0"
|
||||
android:width="20dp"
|
||||
android:height="20dp"
|
||||
android:viewportWidth="20.0"
|
||||
android:viewportHeight="20.0"
|
||||
android:tint="?android:attr/textColorPrimary" >
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
|
||||
@@ -36,6 +36,15 @@
|
||||
android:singleLine="true"
|
||||
android:maxLines="1" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:paddingVertical="8dp"
|
||||
android:text="@string/add_item_request_drag_hint"
|
||||
android:textSize="14sp"
|
||||
android:importantForAccessibility="no"/>
|
||||
|
||||
<include layout="@layout/widget_cell"
|
||||
android:id="@+id/widget_cell"
|
||||
android:layout_width="match_parent"
|
||||
@@ -53,6 +62,7 @@
|
||||
style="@style/Widget.DeviceDefault.Button.Rounded.Colored"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:onClick="onCancelClick"
|
||||
android:text="@android:string/cancel" />
|
||||
|
||||
@@ -64,7 +74,8 @@
|
||||
style="@style/Widget.DeviceDefault.Button.Rounded.Colored"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:onClick="onPlaceAutomaticallyClick"
|
||||
android:text="@string/place_automatically" />
|
||||
android:text="@string/add_to_home_screen" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
<merge
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content">
|
||||
|
||||
@@ -38,7 +39,7 @@
|
||||
android:paddingBottom="5dp"
|
||||
android:gravity="center"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:textColor="@android:color/white"
|
||||
android:textColor="@color/arrow_tip_view_content"
|
||||
android:textSize="16sp"/>
|
||||
<ImageView
|
||||
android:id="@+id/dismiss"
|
||||
@@ -50,7 +51,7 @@
|
||||
android:layout_marginEnd="2dp"
|
||||
android:alpha="0.7"
|
||||
android:src="@drawable/ic_remove_no_shadow"
|
||||
android:tint="@android:color/white"
|
||||
android:tint="@color/arrow_tip_view_content"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/accessibility_close"/>
|
||||
</LinearLayout>
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="1dp"
|
||||
android:background="@drawable/bg_widgets_searchbox"
|
||||
android:elevation="2dp">
|
||||
|
||||
@@ -24,8 +25,8 @@
|
||||
android:layout_weight="1"
|
||||
android:inputType="text"
|
||||
android:imeOptions="actionSearch"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:textColorHint="?android:attr/textColorTertiary"/>
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textColorHint="?android:attr/textColorSecondary"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/widgets_search_cancel_button"
|
||||
|
||||
+30
-46
@@ -26,47 +26,39 @@
|
||||
<string name="safemode_shortcut_error" msgid="9160126848219158407">"सुरक्षित मोडमा डाउनलोड गरेको एप अक्षम गरिएको छ"</string>
|
||||
<string name="safemode_widget_error" msgid="4863470563535682004">"सुरक्षित मोडमा विगेटहरू अक्षम गरियो"</string>
|
||||
<string name="shortcut_not_available" msgid="2536503539825726397">"सर्टकट उपलब्ध छैन"</string>
|
||||
<!-- no translation found for home_screen (5629429142036709174) -->
|
||||
<skip />
|
||||
<!-- no translation found for recent_task_option_split_screen (6690461455618725183) -->
|
||||
<skip />
|
||||
<!-- no translation found for long_press_widget_to_add (3587712543577675817) -->
|
||||
<skip />
|
||||
<!-- no translation found for long_accessible_way_to_add (2733588281439571974) -->
|
||||
<skip />
|
||||
<string name="home_screen" msgid="5629429142036709174">"होम"</string>
|
||||
<string name="recent_task_option_split_screen" msgid="6690461455618725183">"स्प्लिट स्क्रिन"</string>
|
||||
<string name="long_press_widget_to_add" msgid="3587712543577675817">"कुनै विजेट सार्न डबल ट्याप गरेर छोइराख्नुहोस्।"</string>
|
||||
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"कुनै विजेट सार्न वा आफ्नो रोजाइका कारबाही प्रयोग गर्न डबल ट्याप गरेर छोइराख्नुहोस्।"</string>
|
||||
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
|
||||
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d चौडाइ गुणा %2$d उचाइ"</string>
|
||||
<string name="add_item_request_drag_hint" msgid="5899764264480397019">"थप्न टच एण्ड होल्ड गर्नुहोस्"</string>
|
||||
<string name="place_automatically" msgid="8064208734425456485">"स्वतः थप्नुहोस्"</string>
|
||||
<!-- no translation found for widgets_count (656794749266073027) -->
|
||||
<!-- no translation found for shortcuts_count (8080294865447938455) -->
|
||||
<!-- no translation found for widgets_and_shortcuts_count (7209136747878365116) -->
|
||||
<skip />
|
||||
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
|
||||
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> वटा विजेट</item>
|
||||
<item quantity="one"><xliff:g id="WIDGETS_COUNT_0">%1$d</xliff:g> वटा विजेट</item>
|
||||
</plurals>
|
||||
<plurals name="shortcuts_count" formatted="false" msgid="8080294865447938455">
|
||||
<item quantity="other"><xliff:g id="SHORTCUTS_COUNT_1">%1$d</xliff:g> वटा सर्टकट</item>
|
||||
<item quantity="one"><xliff:g id="SHORTCUTS_COUNT_0">%1$d</xliff:g> वटा सर्टकट</item>
|
||||
</plurals>
|
||||
<string name="widgets_and_shortcuts_count" msgid="7209136747878365116">"<xliff:g id="WIDGETS_COUNT">%1$s</xliff:g>, <xliff:g id="SHORTCUTS_COUNT">%2$s</xliff:g>"</string>
|
||||
<string name="widget_button_text" msgid="2880537293434387943">"विजेटहरू"</string>
|
||||
<!-- no translation found for widgets_full_sheet_search_bar_hint (8484659090860596457) -->
|
||||
<skip />
|
||||
<!-- no translation found for widgets_full_sheet_cancel_button_description (5766167035728653605) -->
|
||||
<skip />
|
||||
<!-- no translation found for no_widgets_available (9140948620298620513) -->
|
||||
<skip />
|
||||
<!-- no translation found for no_search_results (6518732304311458580) -->
|
||||
<skip />
|
||||
<!-- no translation found for widgets_full_sheet_personal_tab (2743540105607120182) -->
|
||||
<skip />
|
||||
<!-- no translation found for widgets_full_sheet_work_tab (3767150027110633765) -->
|
||||
<skip />
|
||||
<!-- no translation found for widget_category_conversations (8894438636213590446) -->
|
||||
<skip />
|
||||
<string name="widgets_full_sheet_search_bar_hint" msgid="8484659090860596457">"खोज्नुहोस्"</string>
|
||||
<string name="widgets_full_sheet_cancel_button_description" msgid="5766167035728653605">"खोज बाकसमा भएको पाठ हटाउनुहोस्"</string>
|
||||
<string name="no_widgets_available" msgid="9140948620298620513">"कुनै पनि विजेट उपलब्ध छैन"</string>
|
||||
<string name="no_search_results" msgid="6518732304311458580">"कुनै पनि खोज परिणाम भेटिएन"</string>
|
||||
<string name="widgets_full_sheet_personal_tab" msgid="2743540105607120182">"व्यक्तिगत"</string>
|
||||
<string name="widgets_full_sheet_work_tab" msgid="3767150027110633765">"कामसम्बन्धी"</string>
|
||||
<string name="widget_category_conversations" msgid="8894438636213590446">"वार्तालापहरू"</string>
|
||||
<string name="all_apps_search_bar_hint" msgid="1390553134053255246">"खोजसम्बन्धी एपहरू"</string>
|
||||
<string name="all_apps_loading_message" msgid="5813968043155271636">"एपहरू लोड गर्दै…"</string>
|
||||
<string name="all_apps_no_search_results" msgid="3200346862396363786">"\"<xliff:g id="QUERY">%1$s</xliff:g>\" सँग मिल्दो कुनै एप भेटिएन"</string>
|
||||
<string name="all_apps_search_market_message" msgid="1366263386197059176">"थप एपहरू खोज्नुहोस्"</string>
|
||||
<string name="label_application" msgid="8531721983832654978">"एप"</string>
|
||||
<string name="notifications_header" msgid="1404149926117359025">"सूचनाहरू"</string>
|
||||
<!-- no translation found for long_press_shortcut_to_add (5405328730817637737) -->
|
||||
<skip />
|
||||
<!-- no translation found for long_accessible_way_to_add_shortcut (2199537273817090740) -->
|
||||
<skip />
|
||||
<string name="long_press_shortcut_to_add" msgid="5405328730817637737">"कुनै सर्टकट सार्न डबल ट्याप गरेर छोइराख्नुहोस्।"</string>
|
||||
<string name="long_accessible_way_to_add_shortcut" msgid="2199537273817090740">"कुनै सर्टकट सार्न वा आफ्नो रोजाइका कारबाही प्रयोग गर्न डबल ट्याप गरेर छोइराख्नुहोस्।"</string>
|
||||
<string name="out_of_space" msgid="4691004494942118364">"यो गृह स्क्रिनमा कुनै थप ठाउँ छैन।"</string>
|
||||
<string name="hotseat_out_of_space" msgid="7448809638125333693">"मन पर्ने ट्रे अब कुनै ठाँउ छैन"</string>
|
||||
<string name="all_apps_button_label" msgid="8130441508702294465">"एपको सूची"</string>
|
||||
@@ -124,8 +116,7 @@
|
||||
<string name="abandoned_search" msgid="891119232568284442">"खोजी गर्नुहोस्"</string>
|
||||
<string name="abandoned_promises_title" msgid="7096178467971716750">"यो एप स्थापित छैन"</string>
|
||||
<string name="abandoned_promise_explanation" msgid="3990027586878167529">"यो प्रतिमाका लागि एपलाई स्थापना गरिएको छैन। तपाईं यसलाई हटाउन, वा एप खोजी र स्वयं यो स्थापित गर्न सक्नुहुन्छ।"</string>
|
||||
<!-- no translation found for app_installing_title (5864044122733792085) -->
|
||||
<skip />
|
||||
<string name="app_installing_title" msgid="5864044122733792085">"<xliff:g id="NAME">%1$s</xliff:g> इन्स्टल गरिँदै छ, <xliff:g id="PROGRESS">%2$s</xliff:g> पूरा भयो"</string>
|
||||
<string name="app_downloading_title" msgid="8336702962104482644">"<xliff:g id="NAME">%1$s</xliff:g> डाउनलोड गर्दै, <xliff:g id="PROGRESS">%2$s</xliff:g> सम्पन्न"</string>
|
||||
<string name="app_waiting_download_title" msgid="7053938513995617849">"<xliff:g id="NAME">%1$s</xliff:g> स्थापना गर्न प्रतीक्षा गर्दै"</string>
|
||||
<string name="widgets_list" msgid="796804551140113767">"विजेटहरूको सूची"</string>
|
||||
@@ -165,20 +156,13 @@
|
||||
<string name="work_profile_edu_next" msgid="8783418929296503629">"अर्को"</string>
|
||||
<string name="work_profile_edu_accept" msgid="6069788082535149071">"बुझेँ"</string>
|
||||
<string name="work_apps_paused_title" msgid="2389865654362803723">"कार्यालयको प्रोफाइल अस्थायी रूपमा रोक्का गरिएको छ"</string>
|
||||
<!-- no translation found for work_apps_paused_body (4209084728264328628) -->
|
||||
<skip />
|
||||
<!-- no translation found for work_apps_paused_content_description (4473292417145736203) -->
|
||||
<skip />
|
||||
<!-- no translation found for work_apps_paused_edu_banner (8872412121608402058) -->
|
||||
<skip />
|
||||
<!-- no translation found for work_apps_paused_edu_accept (6377476824357318532) -->
|
||||
<skip />
|
||||
<!-- no translation found for work_apps_pause_btn_text (4669288269140620646) -->
|
||||
<skip />
|
||||
<!-- no translation found for work_apps_enable_btn_text (82111102541971856) -->
|
||||
<skip />
|
||||
<!-- no translation found for developer_options_filter_hint (5896817443635989056) -->
|
||||
<skip />
|
||||
<string name="work_apps_paused_body" msgid="4209084728264328628">"कामसम्बन्धी एपहरूले तपाईंलाई सूचना पठाउन, तपाईंको डिभाइसको ब्याट्री प्रयोग गर्न वा तपाईंको स्थान हेर्न सक्दैनन्"</string>
|
||||
<string name="work_apps_paused_content_description" msgid="4473292417145736203">"कामसम्बन्धी प्रोफाइल अस्थायी रूपमा रोक्का गरिएको छ। कामसम्बन्धी एपहरूले तपाईंलाई सूचना पठाउन, तपाईंको डिभाइसको ब्याट्री प्रयोग गर्न वा तपाईंको स्थान हेर्न सक्दैनन्"</string>
|
||||
<string name="work_apps_paused_edu_banner" msgid="8872412121608402058">"कामसम्बन्धी एपमा ब्याज अङ्कित हुन्छ र तपाईंका IT एड्मिन ती एप हेर्न सक्नुहुन्छ"</string>
|
||||
<string name="work_apps_paused_edu_accept" msgid="6377476824357318532">"बुझेँ"</string>
|
||||
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"कामसम्बन्धी एपहरू अस्थायी रूपमा रोक्का गर्नुहोस्"</string>
|
||||
<string name="work_apps_enable_btn_text" msgid="82111102541971856">"अन गर्नुहोस्"</string>
|
||||
<string name="developer_options_filter_hint" msgid="5896817443635989056">"फिल्टर"</string>
|
||||
<string name="work_switch_tip" msgid="808075064383839144">"कामसम्बन्धी एप र सूचनाहरू अस्थायी रूपमा रोक्का गर्नुहोस्"</string>
|
||||
<string name="remote_action_failed" msgid="1383965239183576790">"कार्य पूरा गर्न सकिएन: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
|
||||
</resources>
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
<string name="widgets_full_sheet_personal_tab" msgid="2743540105607120182">"Pessoal"</string>
|
||||
<string name="widgets_full_sheet_work_tab" msgid="3767150027110633765">"Trabalho"</string>
|
||||
<string name="widget_category_conversations" msgid="8894438636213590446">"Conversas"</string>
|
||||
<string name="all_apps_search_bar_hint" msgid="1390553134053255246">"Apps de pesquisa"</string>
|
||||
<string name="all_apps_search_bar_hint" msgid="1390553134053255246">"Pesquisar apps"</string>
|
||||
<string name="all_apps_loading_message" msgid="5813968043155271636">"Carregando apps…"</string>
|
||||
<string name="all_apps_no_search_results" msgid="3200346862396363786">"Nenhum app encontrado que corresponda a \"<xliff:g id="QUERY">%1$s</xliff:g>\""</string>
|
||||
<string name="all_apps_search_market_message" msgid="1366263386197059176">"Pesquisar mais apps"</string>
|
||||
|
||||
@@ -158,7 +158,7 @@
|
||||
<!-- Dragging -->
|
||||
<!-- Drag padding to add to the bottom of drop targets -->
|
||||
<dimen name="drop_target_drag_padding">14dp</dimen>
|
||||
<dimen name="drop_target_text_size">14sp</dimen>
|
||||
<dimen name="drop_target_text_size">20sp</dimen>
|
||||
<dimen name="drop_target_shadow_elevation">2dp</dimen>
|
||||
|
||||
<!-- the distance an icon must be dragged before button drop targets accept it -->
|
||||
|
||||
@@ -55,10 +55,11 @@
|
||||
<string name="widget_dims_format">%1$d \u00d7 %2$d</string>
|
||||
<!-- Accessibility spoken message format for the dimensions of a widget in the drawer -->
|
||||
<string name="widget_accessible_dims_format">%1$d wide by %2$d high</string>
|
||||
<!-- Message to tell the user to press and hold a widget/icon to add it -->
|
||||
<string name="add_item_request_drag_hint">Touch & hold to place manually</string>
|
||||
<!-- Button label to automatically add icon on home screen [CHAR_LIMIT=50] -->
|
||||
<string name="place_automatically">Add automatically</string>
|
||||
<!-- Message to tell the user to press and hold a widget/icon to add it to the home screen.
|
||||
[CHAR LIMIT=NONE] -->
|
||||
<string name="add_item_request_drag_hint">Touch & hold the widget to move it around the Home screen</string>
|
||||
<!-- Button label to automatically add a widget to home screen [CHAR_LIMIT=50] -->
|
||||
<string name="add_to_home_screen">Add to Home screen</string>
|
||||
<!-- Label for showing the number of widgets an app has in the full widgets picker.
|
||||
[CHAR_LIMIT=25] -->
|
||||
<plurals name="widgets_count">
|
||||
|
||||
@@ -258,14 +258,11 @@
|
||||
<item name="android:drawablePadding">7.5dp</item>
|
||||
<item name="android:paddingLeft">16dp</item>
|
||||
<item name="android:paddingRight">16dp</item>
|
||||
<item name="android:textColor">?attr/workspaceTextColor</item>
|
||||
<item name="android:textColor">?android:attr/textColorPrimary</item>
|
||||
<item name="android:textSize">@dimen/drop_target_text_size</item>
|
||||
<item name="android:singleLine">true</item>
|
||||
<item name="android:ellipsize">end</item>
|
||||
<item name="android:shadowColor">?attr/workspaceShadowColor</item>
|
||||
<item name="android:shadowDx">0.0</item>
|
||||
<item name="android:shadowDy">1.0</item>
|
||||
<item name="android:shadowRadius">4.0</item>
|
||||
<item name="android:background">@drawable/drop_target_frame</item>
|
||||
</style>
|
||||
|
||||
<style name="DropTargetButton" parent="DropTargetButtonBase" />
|
||||
|
||||
@@ -36,6 +36,8 @@ import android.view.accessibility.AccessibilityEvent;
|
||||
import android.widget.PopupWindow;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.appcompat.content.res.AppCompatResources;
|
||||
|
||||
import com.android.launcher3.anim.Interpolators;
|
||||
import com.android.launcher3.dragndrop.DragController;
|
||||
import com.android.launcher3.dragndrop.DragLayer;
|
||||
@@ -142,6 +144,11 @@ public abstract class ButtonDropTarget extends TextView
|
||||
}
|
||||
}
|
||||
|
||||
private void setBackgroundDrawable(int resId) {
|
||||
Drawable bd = AppCompatResources.getDrawable(getContext(), resId);
|
||||
setBackground(bd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void onDragEnter(DragObject d) {
|
||||
if (!mAccessibleDrag && !mTextVisible) {
|
||||
@@ -167,6 +174,7 @@ public abstract class ButtonDropTarget extends TextView
|
||||
}
|
||||
|
||||
d.dragView.setAlpha(DRAG_VIEW_HOVER_OVER_OPACITY);
|
||||
setBackgroundDrawable(R.drawable.drop_target_frame_hover);
|
||||
if (d.stateAnnouncer != null) {
|
||||
d.stateAnnouncer.cancel();
|
||||
}
|
||||
@@ -184,6 +192,7 @@ public abstract class ButtonDropTarget extends TextView
|
||||
|
||||
if (!d.dragComplete) {
|
||||
d.dragView.setAlpha(1f);
|
||||
setBackgroundDrawable(R.drawable.drop_target_frame);
|
||||
} else {
|
||||
d.dragView.setAlpha(DRAG_VIEW_HOVER_OVER_OPACITY);
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ public class DeleteDropTarget extends ButtonDropTarget {
|
||||
@Override
|
||||
protected void onFinishInflate() {
|
||||
super.onFinishInflate();
|
||||
setDrawable(R.drawable.ic_remove_shadow);
|
||||
setDrawable(R.drawable.ic_remove_no_shadow);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -388,7 +388,8 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou
|
||||
}
|
||||
|
||||
protected void pageEndTransition() {
|
||||
if (mIsPageInTransition) {
|
||||
if (mIsPageInTransition && !mIsBeingDragged && mScroller.isFinished()
|
||||
&& mEdgeGlowLeft.isFinished() && mEdgeGlowRight.isFinished()) {
|
||||
mIsPageInTransition = false;
|
||||
onPageEndTransition();
|
||||
}
|
||||
@@ -1740,6 +1741,7 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou
|
||||
public void draw(Canvas canvas) {
|
||||
super.draw(canvas);
|
||||
drawEdgeEffect(canvas);
|
||||
pageEndTransition();
|
||||
}
|
||||
|
||||
protected void drawEdgeEffect(Canvas canvas) {
|
||||
|
||||
@@ -108,13 +108,13 @@ public class SecondaryDropTarget extends ButtonDropTarget implements OnAlarmList
|
||||
mCurrentAccessibilityAction = action;
|
||||
|
||||
if (action == UNINSTALL) {
|
||||
setDrawable(R.drawable.ic_uninstall_shadow);
|
||||
setDrawable(R.drawable.ic_uninstall_no_shadow);
|
||||
updateText(R.string.uninstall_drop_target_label);
|
||||
} else if (action == DISMISS_PREDICTION) {
|
||||
setDrawable(R.drawable.ic_block_shadow);
|
||||
setDrawable(R.drawable.ic_block_no_shadow);
|
||||
updateText(R.string.dismiss_prediction_label);
|
||||
} else if (action == RECONFIGURE) {
|
||||
setDrawable(R.drawable.ic_setup_shadow);
|
||||
setDrawable(R.drawable.ic_setting);
|
||||
updateText(R.string.gadget_setup_text);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,6 @@ import android.graphics.Paint;
|
||||
import android.graphics.drawable.ShapeDrawable;
|
||||
import android.os.Handler;
|
||||
import android.util.Log;
|
||||
import android.util.TypedValue;
|
||||
import android.view.Gravity;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
@@ -108,10 +107,7 @@ public class ArrowTipView extends AbstractFloatingView {
|
||||
ShapeDrawable arrowDrawable = new ShapeDrawable(TriangleShape.create(
|
||||
arrowLp.width, arrowLp.height, false));
|
||||
Paint arrowPaint = arrowDrawable.getPaint();
|
||||
TypedValue typedValue = new TypedValue();
|
||||
context.getTheme()
|
||||
.resolveAttribute(android.R.attr.colorAccent, typedValue, true);
|
||||
arrowPaint.setColor(ContextCompat.getColor(getContext(), typedValue.resourceId));
|
||||
arrowPaint.setColor(ContextCompat.getColor(getContext(), R.color.arrow_tip_view_bg));
|
||||
// The corner path effect won't be reflected in the shadow, but shouldn't be noticeable.
|
||||
arrowPaint.setPathEffect(new CornerPathEffect(
|
||||
context.getResources().getDimension(R.dimen.arrow_toast_corner_radius)));
|
||||
@@ -148,6 +144,10 @@ public class ArrowTipView extends AbstractFloatingView {
|
||||
LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams) findViewById(
|
||||
R.id.arrow).getLayoutParams();
|
||||
lp.gravity = gravity;
|
||||
|
||||
if (parent.getLayoutDirection() == LAYOUT_DIRECTION_RTL) {
|
||||
arrowMarginStart = parent.getMeasuredWidth() - arrowMarginStart;
|
||||
}
|
||||
if (gravity == Gravity.END) {
|
||||
lp.setMarginEnd(parent.getMeasuredWidth() - arrowMarginStart);
|
||||
} else if (gravity == Gravity.START) {
|
||||
|
||||
@@ -76,6 +76,9 @@ LOCAL_PACKAGE_NAME := Launcher3Tests
|
||||
|
||||
LOCAL_INSTRUMENTATION_FOR := Launcher3
|
||||
|
||||
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
|
||||
LOCAL_LICENSE_CONDITIONS := notice
|
||||
LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../NOTICE
|
||||
include $(BUILD_PACKAGE)
|
||||
|
||||
include $(call all-makefiles-under,$(LOCAL_PATH))
|
||||
|
||||
@@ -28,7 +28,7 @@ import java.util.regex.Pattern;
|
||||
|
||||
public class AddToHomeScreenPrompt {
|
||||
private static final Pattern ADD_AUTOMATICALLY =
|
||||
Pattern.compile("^Add automatically$", CASE_INSENSITIVE);
|
||||
Pattern.compile("^Add to Home screen$", CASE_INSENSITIVE);
|
||||
private final LauncherInstrumentation mLauncher;
|
||||
private final UiObject2 mWidgetCell;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user